Matt Goodall <matt@pollenation.net> wrote:
> 
> Hi all,
> 
> I've finished the FastCGI support module, it's attached. It was very
> easy and seems to work ok :). I've run both stateful and random apps
> here although they're not very complicated.
> 
> The fcgiapp module contains the usual class, Request, and a method,
> running(). I chose to extend cgiapp.Request since the implementation
> is
> mostly identical.
> 
> The fcgiapp module uses Robin Dunn's fcgi.py, available via the
> FastCGI
> site, http://www.fastcgi.com. Here's the direct link -
> http://alldunn.com/python/fcgi.py.
> 
> To use fcgiapp, change your application startup code to:
> 
>	  import fcgiapp
>	  app = App()
>	  while fcgiapp.running():
>	      app.run(fcgiapp.Request())
> 
> The while loop runs until running() returns 0, i.e. until the web
> server's FastCGI module decides to shut you down. fcgi also supports
> straight CGI so you can use the same code when running as a CGI. All
> that happens for CGI is that the loop only runs once.
> 
> Tim - since you expressed an interest in this, could you try some
> more
> realistic tests?

Fabulous! Yes, when Andrew comes in next week (he is doing Albatross contract 
work with us, the results of which we hope to be able to open source and which 
are very, very cool - at least I think so) we might take an hour out to try to quickly 
FastCGI-enable an existing Albatross-based statistical analysis application we 
have. We'll let you know how it goes.

> 
> Dave, Andrew - If you want this, it's yours. Feel free to repackage
> it,
> rewrite it, refactor it with cgiapp etc. Heck, you can even add some
> comments if you want ;-).

I think this would be a fabulous addition to the core Albatross library (assuming it 
works OK - we'll see next week - but it is beautifully simple, so I suspect it will).

Tim C

