[albatross-users] SCGI

Matt Goodall matt at pollenation.net
Tue Sep 23 23:23:05 EST 2003


Not feeling too well today so I'm having a day "working" from home. What
a good chance to do some playing :).

I've noticed that some people consider SCGI superior to FastCGI, mostly
due to simplicity, so I thought I'd find out more. Attached is a simple
Albatross app plus SCGI handler. Seems to work ok with
apache-1.3.27.1-3,  libapache-mod-scgi-1.1-1 and python2.3-scgi (Debian
packages). Anything else is completely untested.

This is definitely a work in progress -- it needs splitting up into an
scgiapp module and an al-scgi script -- but I thought you might be
interested to know how it's done and how simple it is. Now I've written
a couple of these CGI-like adapters it's clear that a small amount of
refactoring to cgiapp could simplify FastCGI and SCGI support.

FYI, SCGI works by sending a CGI-like environment and the HTTP request
from the Apache process to an _already running_ SCGI server (an
Albatross application in this case).

The SCGIServer I've extended is a preforking thingy so I don't think
it's going to work on Windows ... sorry!

I don't have any strong opinions about SCGI vs FastCGI yet. They seem to
perform about the same on my machine. However. a couple of advantages I
can see with SCGI are:

      * Number of children is defined by the application. No need to
        touch Apache config once SCGI has been enabled.
      * It's simpler to deploy a new version of the code - just kill and
        restart the Python app. No need to restart Apache. This makes
        things easier during development.

Now it's time to see what patches Dave missed in the new release ... ;-)

Cheers, Matt

-- 
Matt Goodall, Pollenation Internet Ltd
w: http://www.pollenationinternet.com
e: matt at pollenation.net
t: +44 (0)113 2252500
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.object-craft.com.au/pipermail/albatross-users/attachments/20030923/849f3cb4/attachment.html>


More information about the Albatross-users mailing list