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.


> > If we were going to try to implement an asynchronous WSGI, what we would
> > *really* need to do is discard the app_iter and make write() the
> > standard way of sending the body.  This would let us implement a CPS
> > (continuation-passing style) API.
>
>But isn't this possible just using a generator?

No, because using a generator means there needs to be a separate 
callback to force the generator to be reiterated.  Hence the 
complexity of adding an async API to the existing WSGI model.


> > We would also have to change the
> > input stream so that instead of reading from it, we instead passed it
> > functions to be called when input was available,
>
>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.  :)

_______________________________________________
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe: 
http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com

Reply via email to