[Web-SIG] Pre-PEP: Python Web Container Interface v1.0
gstein at lyra.org
Mon Dec 8 19:54:00 EST 2003
On Mon, Dec 08, 2003 at 11:18:00AM -0500, A.M. Kuchling wrote:
> On Mon, Dec 08, 2003 at 10:35:47AM -0500, Phillip J. Eby wrote:
> > whatever they might be. Making the app or framework declare their safety
> > through a narrow interface on the application object seen by the container
> > incurs needlessly "lossy" transfer of information.
> And that convinces me; forget about threading.
I'm not convinced. If an application is designed with a per-process model
in mind (e.g. CGI), and then you drop it into a threaded model... BOOM!
The application needs to declare whether it is thread-safe. The container
can then verify whether that application can be run within the container
and the container's current configuration.
For example, if you drop a non-thread-safe app into a threaded mod_python,
then I would expect an error to be thrown, and the app to *not* be loaded.
The simple fact is that threading (and the execution model, in general) is
part of the environment. You can't limit it to just the three streams plus
some "environ" dictionary. There is a *very* real impact on the
application, based on how the container is executing those apps.
Greg Stein, http://www.lyra.org/
More information about the Web-SIG