[Web-SIG] WSGI 2.0

Manlio Perillo manlio_perillo at libero.it
Sat Oct 6 17:48:40 CEST 2007

Phillip J. Eby ha scritto:
> At 11:04 AM 10/6/2007 +0200, Manlio Perillo wrote:
>> As an example, the WSGI write callable cannot be implemented in a
>> conforming way in Nginx.
> ...unless you use a separate thread or process.

I'm insisting about asynchronous support in WSGI because
Nginx *does not supports threads*.

It has some thread support but it is *broken*.
Even if in future the problems are solved, the threading model of Nginx 
*will break* many existing WSGI applications, since the WSGI iteration 
can be resumed in different threads.

Of course, a WSGI application can use threads, but i think that it 
*needs* a wsgi.pause_output extension, for synchronization.

 > [...]
>> Another possible solution is that reading from input is allowed to raise
>> an EAGAIN exception, like in the previous example.
> Which is *way* more complex than the CPS approach.  If we're going to 
> make it *harder* to write applications, there's no point to having a 
> WSGI 2.0, since 1.0 is already hard enough to implement.  :)

It is a know fact that asynchronous programming is hard.
Multithread programming is even more harder, but nobody seems to care.

Regards  Manlio Perillo

More information about the Web-SIG mailing list