Re: gitweb, FastCGI and PSGI/Plack

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, May 9, 2010 at 4:05 PM, Jakub Narebski <jnareb@xxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]