[Web-SIG] WSGI 2.0

Phillip J. Eby pje at telecommunity.com
Fri Oct 5 19:35:33 CEST 2007


At 05:34 PM 10/5/2007 +0100, Robin Bryce wrote:
>Is there a means to support a non blocking read on wsgi.input ?

No.  Some ideas have been proposed, but nobody has shown a practical 
scenario where it is useful.

For it to be useful, you would have to have an asynchronous server 
that is interleaving in its main thread, and therefore requires 
applications to be non-blocking.

However, to run "normal" WSGI applications, such a server has to 
*allow* them to block, so it is going to have to run them in a 
different thread anyway.

This is why the whole idea of creating an async *variant* of WSGI is 
moot - an async WSGI protocol is essentially 100% incompatible with 
synchronous WSGI, since any async WSGI components can't use 
synchronous WSGI components, unless they spawn another thread or process.

The whole thing is an exercise in futility, until/unless there is 
more than one such server and application, at which point they could 
get together and create AWSGI or WSGI-A or something of that sort.



More information about the Web-SIG mailing list