git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: gitweb, FastCGI and PSGI/Plack

From
Jakub Narebski <jnareb@gmail.com>
Date
May 11, 2010, 09:29 UTC
Message-ID
<201005111129.10931.jnareb@gmail.com>
In-Reply-To
<AANLkTimypauJKP-ifPKDmM9TK0u0JsSG5PlcpWdkkbVd@mail.gmail.com>
On Mon, 10 May 2010, Tatsuhiko Miyagawa wrote:
Show 8 quoted lines
> On Mon, May 10, 2010 at 2:10 PM, Jakub Narebski <jnareb@gmail.com> wrote:
> >
> > Well, the support for 'plackup' in git-instaweb is / would be done not
> > by converting gitweb from CGI to PSGI app, but by using gitweb.psgi
> > wrapper.
> 
> Wrapping gitweb.cgi with gitweb.psgi is a legitimate way to say
> "converting CGI to PSGI app".
I have misunderstood you then, I'm sorry.
 
Show 7 quoted lines
> > I also wonder how running via wrapper script affect performance, as
> > compared to modified gitweb running as FastCGI script, using CGI::Fast
> > and FCGI.
> 
> Based on my experience CGI::Emulate::PSGI doesn't have much of an
> overhead because it's just swapping STDIN and STDOUT handles and
> doesn't require stuff like tie or overload which tends to be slower.
Nice to know.
Unfortunately I don't have mod_fcgid / mod_fastcgi installed, so I can't
do a benchmark comparing PSGI wrapper + FCGI handler with modified
gitweb running as FastCGI script (using ab, ApacheBench).  Do you know
any pure-Perl FastCGI server with minimal dependencies, and pure-Perl
HTTP server benchmarking tool (like ab and httperf)?
 
Show 13 quoted lines
> > P.P.S. One of constraints to gitweb development is that it should run
> > with minimal set of non-core modules.  Some people even complain that
> > gitweb (or was it about git in general?) requires at least Perl 5.8.6 or
> > about (because of Encode module and Unicode support).
> 
> I know, but git-instaweb is a different story, since you rely on the
> fact that the system has one of web servers like apache, lighttpd or
> mongrel.
> 
> And that's exactly why I've been suggesting to you use WrapCGI
> (CGI::Emulate::PSGI + CGI::Compile) instead of converting gitweb.cgi
> to natively support PSGI. We're on the same page and I don't
> understand why you keep disagreeing with me :)

I might have misunderstand you as arguing against modifying gitweb to add FastCGI support via CGI::Fast...

P.S. discussion != disagreeing ;-)
-- 
Jakub Narębski
Poland
Previous: Tatsuhiko MiyagawaNext: Peter Vereshagin
Message 12 of 14 in “Re: gitweb, FastCGI and PSGI/Plack”
  1. Jakub NarebskiMay 9, 2010
  2. Tatsuhiko MiyagawaMay 10, 2010
  3. Jakub NarebskiMay 10, 2010
  4. Tatsuhiko MiyagawaMay 10, 2010
  5. Tatsuhiko MiyagawaMay 10, 2010
  6. Jakub NarebskiMay 10, 2010
  7. Tatsuhiko MiyagawaMay 10, 2010
  8. Jakub NarebskiMay 10, 2010
  9. Tatsuhiko MiyagawaMay 10, 2010
  10. Jakub NarebskiMay 10, 2010
  11. Tatsuhiko MiyagawaMay 11, 2010
  12. Jakub NarebskiMay 11, 2010
  13. Peter VereshaginMay 11, 2010
  14. Tatsuhiko MiyagawaMay 11, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.