[Web-SIG] [extension] x-wsgiorg.flush

Manlio Perillo manlio_perillo at libero.it
Thu Oct 4 17:00:35 CEST 2007

Phillip J. Eby ha scritto:
> [...]
>> However I have to admit that developing a full asynchronous application
>> is not easy, notably when we have to interact with a database and a
>> transaction.
> Right - in practice, there is not enough of a common async API for 
> Python to make it practical to implement asynchronousness in WSGI 
> itself.  At least, in the last three years nobody has made a practical 
> proposal for it.  In practice, if you want to write a fully-async web 
> app you must use Twisted or a similar framework and commit to using its 
> API.  

I want to add asynchronous API support to nginx mod_wsgi because I 
*want* to use a more agile web server for my applications, using Twisted 
only when I need an enterprise environment!

> You can of course still use WSGI components, but your application 
> will not be able to run on a server that doesn't provide your async 
> framework's API.

That's not a problem.
Asynchronous support will be available in nginx mod_wsgi and in Twisted 
(if I found the time to write an alternative implementation of the WSGI 
support, but this is not a priority for me).

>> It is really so hard to implement WSGI 1.0 and to write middlewares 
>> for it?
> Absolutely.  Most of the time I see someone post example middleware 
> code, it is not WSGI compliant in some fashion.

Your are making a critical decision here.
You are lowering the level of WSGI to match the level of average WSGI 
middlewares programmers.

This can have disastrous conseguences if Python will gain a large user 
base in the future (and, of course, with a large user base, the majority 
of the users will have a low profile).

>> It's very unfortunate that the WSGI implementation in Twisted just uses
>> threads instead of doing some experimentation.
> You're making the assumption that no experimentation was done.  Check 
> the Web-SIG archives from three years ago and see the discussions about 
> async APIs.

I have read a lot of archived messages, and all I have seen are 
*discussions* about asynchronous extensions, but no working implementations.

Regards   Manlio Perillo

More information about the Web-SIG mailing list