Ian Bicking: the old part of his blog

Re: The Concurrency Model Debate

In respect of your comment:

mod_python can use a single process with multiple interpreters, but I believe requests always are processed in separate interpreters

Creation of separate interpreters in mod_python is to do with management of your URL namespace and is nothing really to do with threading. That is, if you want web applications hosted in different parts of your URL namespace to not intefere with each other, you designate those different parts of the URL namespace as running in distinct interpreters.

For a particular instance of an interpreter within a process, whether it be managing the whole URL namespace or just a part, when using a multithreaded MPM in Apache such as the default for Win32 or the worker MPM for UNIX, there can be multiple requests within distinct threads active within the same interpreter at the same time.

The only catch with all of this is that there are a couple of thread bugs in mod_python which you would want to patch if wanting to seriously use threading in any way. These are currently documented at "http://www.dscpl.com.au/projects/vampire/patches.html".

Comment on The Concurrency Model Debate
by Graham Dumpleton


Thanks. I guess this means that (probably like mod_ruby, mod_php, and a bunch of others) that it's safest to keep to keep to the multiprocess model.
# Ian Bicking

It is always going to be safer to avoid multithreading, but that is more to do with people not appreciating what it takes to write a robust multithreaded application and nothing to do with any fixable bugs.:-)
# Graham Dumpleton