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

Justin Holmes justin at justinholmes.com
Tue Oct 14 20:57:01 CEST 2014


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.

I guess if we're really talking about this, the lowest common
denominator is a set of cognizable abstractions for HttpRequest and
HttpResponse, right?

On Tue, Oct 14, 2014 at 11:54 AM, Sylvain Hellegouarch <sh at defuze.org> wrote:
> 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
>
> _______________________________________________
> Web-SIG mailing list
> Web-SIG at python.org
> Web SIG: http://www.python.org/sigs/web-sig
> Unsubscribe:
> https://mail.python.org/mailman/options/web-sig/justin%40justinholmes.com
>



-- 
jMyles Holmes
Chief Chocobo Breeder, slashRoot

slashRoot: Coffee House and Tech Dojo
New Paltz, NY 12561
845.633.8330


More information about the Web-SIG mailing list