From: Tatsuhiko Miyagawa <miyagawa@gmail.com>
To: Jakub Narebski <jnareb@gmail.com>
Cc: git@vger.kernel.org, Peter Vereshagin <peter@vereshagin.org>,
Petr Baudis <pasky@suse.cz>, Eric Wong <normalperson@yhbt.net>,
Sam Vilain <sam.vilain@catalyst.net.nz>,
Juan Jose Comellas <juanjo@comellas.org>,
John Goerzen <jgoerzen@complete.org>
Subject: Re: gitweb, FastCGI and PSGI/Plack
Date: Sun, 9 May 2010 17:59:11 -0700 [thread overview]
Message-ID: <t2n693254b91005091759ye577992y32d2b6a41d7d8c45@mail.gmail.com> (raw)
In-Reply-To: <201005100105.49985.jnareb@gmail.com>
On Sun, May 9, 2010 at 4:05 PM, Jakub Narebski <jnareb@gmail.com> wrote:
> Moving to PSGI, or adding possibility to run gitweb as PSGI script (like
> the series adds *ability* to run gitweb as FastCGI script) by modifying
> gitweb would not be that easy, even with help of CGI::PSGI.
You don't need it - since you can just use Plack::App::WrapCGI.
>
> CGI::Compile was referring to an alternate approach, where instead of
> modifying gitweb to be able to run it as FastCGI script (you can run it
> as CGI script and as ModPerl::Registry script from mod_perl) there was
> added gitweb.fcgi wrapper:
and the .fcgi wrapper can just use Plack::Loader, or the plackup
executable with FCGI environment variable set, to DWIM.
> One can of course use this approach wrapping gitweb to be run on PSGI,
> using CGI::Emulate::PSGI (via Plack::App::WrapCGI), which in turn uses
> CGI::Compile. The gitweb.fcgi wrapper could use CGI::Emulate::FCGI...
> if it existed.
Again, you still don't understand - once your CGI script is turned
into PSGI, plackup can take over the web server interface, including
the FastCGI interface. If you need .fcgi wrapper to be spawned from
web servers, just put plackup command line call (or Plack::Runner or
::Loader) in the .fcgi script.
> NB I use the following gitweb.psgi wrapper to run gitweb from "plackup"
> for tests (after running "make gitweb", of course, and with appropriate
> gitweb_config.perl, unversioned, in gitweb/ alongside gitweb.perl, the
> gitweb.psgi wrapper, and generated gitweb.cgi):
>> `plackup -s FCGI` makes your PSGI app a fastcgi handler using FCGI.pm,
>> or `plackup -s Net::FastCGI` does the same but using Net::FastCGI,
>> pure perl alternative.
>
> It is a pity that Plack::App::WrapFCGI / FCGI::Emulate::PSGI does not
> exist, so that gitweb.psgi wrapper would not require indirectly
> CGI::Compile.
it's not a pity - it's the simplification by wrapping CGI environment
into PSGI, which is a pure perl web server interface that then can be
turned into ANY web server handlers including standalone, CGI,
FastCGI, mod_perl and SCGI.
--
Tatsuhiko Miyagawa
next prev parent reply other threads:[~2010-05-10 0:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <g2s693254b91005091428ib188cbd1le5ffa90eace741a8@mail.gmail.com>
2010-05-09 23:05 ` gitweb, FastCGI and PSGI/Plack Jakub Narebski
2010-05-10 0:59 ` Tatsuhiko Miyagawa [this message]
2010-05-10 16:26 ` Jakub Narebski
2010-05-10 17:14 ` Tatsuhiko Miyagawa
2010-05-10 1:05 ` Tatsuhiko Miyagawa
2010-05-10 10:32 ` Jakub Narebski
2010-05-10 17:03 ` Tatsuhiko Miyagawa
2010-05-10 18:40 ` Jakub Narebski
2010-05-10 18:43 ` Tatsuhiko Miyagawa
2010-05-10 21:10 ` Jakub Narebski
2010-05-11 0:07 ` Tatsuhiko Miyagawa
2010-05-11 9:29 ` Jakub Narebski
2010-05-11 9:44 ` Peter Vereshagin
2010-05-11 18:56 ` Tatsuhiko Miyagawa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=t2n693254b91005091759ye577992y32d2b6a41d7d8c45@mail.gmail.com \
--to=miyagawa@gmail.com \
--cc=git@vger.kernel.org \
--cc=jgoerzen@complete.org \
--cc=jnareb@gmail.com \
--cc=juanjo@comellas.org \
--cc=normalperson@yhbt.net \
--cc=pasky@suse.cz \
--cc=peter@vereshagin.org \
--cc=sam.vilain@catalyst.net.nz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).