CGI speedup strategies
Skip Montanaro
skip at mojam.com
Wed Sep 1 10:27:51 EDT 1999
Ian> Has anyone tried actually implementing a Python webserver which
Ian> just starts a new thread and runs a piece of Python code in it
Ian> every time someone makes a HTTP request? This server could then
Ian> cache any objects (such as files, or SQL connections) in memory to
Ian> be used by any Python scripts (this would obviously require all
Ian> code to be thread-safe).
Ian,
This is precisely what I do on Musi-Cal. I run Apache with the proxy and
rewrite modules enabled. I then have a ZServer (Zope's web server layered
atop Medusa) listening to port 9673 of 127.0.0.2. The appropriate types of
requests to Apache get routed to the ZServer. It is then free to contact
the real database server, do SSI-type stuff on files, cache results, yadda,
yadda, yadda.
As an aside, communication between my ZServer and my database server is
XML-RPC. The database server also receives requests from Perl and Java
clients. It's not perfect (in particular, we seem to have problems with
character encodings at the moment), but it does work.
you-want-servers?-i-got-servers-ly y'rs
Skip Montanaro | http://www.mojam.com/
skip at mojam.com | http://www.musi-cal.com/~skip/
847-971-7098 | Python: Programming the way Guido indented...
More information about the Python-list
mailing list