[mod_python] communication between main_interpreter and subinterpreters

Graham Dumpleton grahamd at dscpl.com.au
Wed Feb 23 16:45:41 EST 2005


On Thursday, February 24, 2005, at 06:35  AM, Andy Cavatorta wrote:

> Hi Folks,
> I'm working on a server push framework that keeps subinterpreters open 
> and serving for indefinitly long periods of time.  The main program 
> control is a command-line script, which keeps track of the 
> subinterpreters and communicates with them via UDP sockets.  That 
> works in my tests,  but that UDP layer is a *lot* of overhead.
> Is there another way that a command-line script or main_interpreter 
> can track and reference instances of subinterpreters?

I have had some work on the back burner for a while which may achieve
what you want, but there is equally going to be some overhead where
communication goes outside of the process and a bit less where the
sub-interpreters are within the same process.

Which version of Apache are you using? If using 2.0, what MPM model
are you using, prefork, worker or something else? If not a threaded
MPM, is your Python version and mod_python still built for threading?

Overall, what I am working on may just be excessive for your needs as
it delves into the bigger area of using Apache/mod_python to interact
with a distributed system using request/reply and publish/subscribe
type mechanisms and with support for concepts of presence etc.

BTW, can you be a bit clearer in what you mean when you say "that
keeps subinterpreters open and serving for indefinitly long periods
of time". An interpreter once created will already exist for the life
of the process, over that time, possibly serving up many many distinct
requests. Do you actually mean that a specific request is kept open
for a long period of time?

Graham



More information about the Mod_python mailing list