[Web-SIG] Pre-PEP: Python Web Container Interface v1.0

Titus Brown titus at caltech.edu
Mon Dec 8 20:12:02 EST 2003

-> > > 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.

I agree; often only a little bit of thought is needed to make sure
something is thread safe, but that thought should be added into
the framework ahead of time.


More information about the Web-SIG mailing list