[Web-SIG] WSGI and asyncio (tulip)?

Sylvain Hellegouarch sh at defuze.org
Tue Oct 14 20:54:39 CEST 2014


Hi,

2014-10-14 18:47 GMT+02:00 Guido van Rossum <guido at python.org>:

>
>
> I'm wondering if a small extension to the WSGI protocol might be
> sufficient to support this: the special environ variable "wsgi.async_input"
> could optionally be tied to a standard asyncio stream reader (
> https://docs.python.org/3/library/asyncio-stream.html#streamreader), from
> which bytes can be read using "yield from stream.read([nbytes])" or "yield
> from stream.readline()".
>
>
If we support async backends by simply escaping WSGI, don't you feel it
kind of make most of the whole discussion moot?

To me, asyncio already provides a de-facto standard API for asynchronous
backends and Tornado/Twisted provide a high level API on top of it. I have
to say, I don't precisely grasp what WSGI actually wishes to bring to the
table.

As I said in a different thread, most frameworks seem eager to wrap the
environ dictionary and hide away all of the WSGI internals (wasting CPU
cycles in the process). Is there rationale for continuining down that road?

-- 
- Sylvain
http://www.defuze.org
http://twitter.com/lawouach
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/web-sig/attachments/20141014/01859116/attachment-0001.html>


More information about the Web-SIG mailing list