persistant web state

Steve Holden sholden at holdenweb.com
Tue May 20 14:11:44 EDT 2003


"Jay O'Connor" <joconnor at nets.com> wrote ...
> All,
>
> I'm lloking for a technique to allow me to keep memory alive between
> invocations of a cgi program.    What I mean is that if I have two cgi
> requests come into a script, they should be able to access the same data
> in memory and not have to load from a database.
>
[...]

It would be well worth your while to look at the Xitami web server, even if
you only wanted it to serve a subset of your pages (you can always have
Apache or other front-end web server relay these requests).

Xitami is lgihtweight, and has a long-running web process interface that
would do exactly what you want. It even includes Python code to interface
LRWPs with the server (though it needs one tweak to the socket code to bring
it up to date).

Then of course there's mod-snake (depracated now?) and mod_python, and
possibly Fast CGI as well, all of which are usable with Apache.

I'd recommend against using the *HTTPServer libraries in production: they
aren't production-wuality code and weren't (I don't think) ever intended to
be more than demonstration code. It's amazing they've been pullaed as far as
they have intot he modern web world, but some of them are decidedly long in
the tooth.

regards
--
Steve Holden                                  http://www.holdenweb.com/
Python Web Programming                 http://pydish.holdenweb.com/pwp/







More information about the Python-list mailing list