On Mar 27, 12:41 pm, "Graham Dumpleton" <[EMAIL PROTECTED]> wrote: > On the other hand, it might be useful in a standalone Python based > WSGI web server which you have more direct control over. It might > take a bit of design work as to how to do it in practice, but you > could create different sub interpreters through the module for > distinct WSGI applications. The main interpreter could be running the > web server and somehow then hand off a WSGI environ etc off to a > manager module in the other sub interpreter that then deals with > communicating with the WSGI application in that sub interpreter for > that specific request. You could conceivably have a hand off > arrangement whereby when an application code base changes that you > start routing requests for URL subset to new instance of application > in new sub interpreter and kill off old sub interpreter when able to. > Would certainly be an interesting area to look at. For mod_wsgi at > least though I ruled out allowing sub interpreters to be killed off > and allowing reloading of a complete application by such a handoff > mechanism as too dangerous a feature in an ISP based web hosting > environment as user code could too easily hang the Apache process when > trying to kill off the sub interpreter.
One more thought. It would actually be quite cute if you could make this whole encapsulation of pushing a WSGI request into a distinct sub interpreter a WSGI middleware component. That way you could just drop it into any existing web server infrastructure that supports WSGI. Now I'm getting really interested to have a play. :-) Graham -- http://mail.python.org/mailman/listinfo/python-list