Run Python as separate process with Apache?

Randall Parker rgparker at west.net
Sun Jul 9 20:26:11 EDT 2000


I've done a lot with Java servlets using Apache connected to Tomcat where 
Tomcat runs as a single persistent process that gets all requests meant 
for it. I am wondering if that same approach can be done with Python.

With Java servlets since the process that handles all servlets is 
persistent that makes it possible for the servlet container (eg Apache 
Jakarta Tomcat) to keep track of session ids and time them out for you 
without your even having to check. It is also pretty easy to have a 
shared database connection pool because, again, there is this single 
persistent process that instantiates and runs all servlet objects.

So I am wondering whether there is a way with Python and Apache to:

1) Have a persistent Python process that processes http requests.

2) Have that persistent process manage a database connection pool.

3) Have that persistent process hand out new session ids for new users, 
time them out automatically and all the other session management that 
servlet containers do for you.

ie can one create an environment in Python that is similar to what is 
available with Java servlets? 

Otherwise how is session tracking and database connection pooling done?




More information about the Python-list mailing list