[albatross-users] Re: FastCGI Implementation

Dave Cole djc at object-craft.com.au
Thu Jun 5 11:42:33 EST 2003


>>>>> "Tim" == Tim Churches <tchur at optushome.com.au> writes:

Tim> Matt Goodall <matt at 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?

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

I am very interested in seeing the results of this investigation.
Having a FastCGI capability in Albatross would open up all sort of
possibilities.

>>  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 ;-).

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

I could not agree more.

- Dave

-- 
http://www.object-craft.com.au




More information about the Albatross-users mailing list