mod_python confusion

Tuure Laurinolli tuure at laurinolli.net
Sat May 29 18:10:26 EDT 2004


Kylotan wrote:

> I thought mod_python would be the answer to my CGI performance issue,
> but I can't seem to make much sense out of it. All the examples are
> too trivial to be of much use.

I recommend using some framework that abstracts the web server - page 
code interface out of the way. Jonpy is very lightweight, can be used 
with standard CGI, FastCGI or mod_python without many changes and has 
pretty nice interface. It is probably relatively easy to write a new 
"backend" for it if you ever need to.


> Given that I have an application consisting of several CGI scripts,
> what is the simplest way to go about converting it to run on
> mod_python, not using the CGI-handler which is allegedly slow and
> buggy? Everything seems to suggest a major rewrite because I not only

Converting some simple speed-needing CGI script into something jonpy can 
handle should be trivial - and with FastCGI it really helps the speed 
when the interpreter starting overhead is the biggest cause for slowness.

Then there are more comprehensive frameworks, which usually have their 
own server processes to which the webserver of your choice proxies the 
requests. I don't know much about those, and converting to them probably 
isn't as easy.



More information about the Python-list mailing list