[Web-SIG] Inviting feedback on my proposed "ASGI" spec

Robert Collins robertc at robertcollins.net
Thu Mar 10 17:07:48 EST 2016


On 11 March 2016 at 10:34, Andrew Godwin <andrew at aeracode.org> wrote:
>>
>>
>> I realise this may sound bikesheddy, but it would be really good to
>> not call it ASGI. From your docs "
>> Despite the name of the proposal, ASGI does not specify or design to
>> any specific in-process async solution, such as asyncio, twisted, or
>> gevent. Instead, the receive_many function can be switched between
>> nonblocking or synchronous. This approach allows applications to
>> choose what’s best for their current runtime environment; further
>> improvements may provide extensions where cooperative versions of
>> receive_many are provided."
>>
>> I'm worried that folk will assume a parallel between ASGI and asyncio,
>> but there appears to be none... which is only a problem due to the
>> room for confusion.
>
>
> Better names are welcome, but I quite like ASGI's similarity to WSGI, and
> the fact it's pronounceable as a single word. The "Asynchronous" part covers
> the way the whole system operates; async is already an overloaded term, and
> while there might be initial confusion, I think "async" also has strong
> associations with the sort of problems ASGI solves (like websockets), which
> I think is useful.

Perhaps thats a particularly browser-centric view? There's nothing
that strongly associates TCP with Python's slant on 'async' for me -
interfaces on top of message passing can be sync or async - as in fact
the switch you've got demonstrates :).

Other names?

quick thoughts...
WSGP (web services gateway protocol)
MuPGI (multiple protocol gateway interface)



>>  For consistency, why not a dict unicode -> List[bytes]
>
> I personally think this is worse than a list of tuples (which you can at
> least feed straight into dict()) - the only header that comes through as
> multiple, ever, is Set-Cookie, after all.

I think you're wrong about that 'only header' statement.

rfc 7230 3.2.2 permits multiple header fields with the same field name
for all field values defined as comma separated lists, and for
set-cookie.

So  you can't feed it straight into dict, unless you place a
requirement on the server to always fold together multiple header
fields with the same field name.... and clients to not use that
either. Oh, and special case Set-cookie.

-Rob


-- 
Robert Collins <rbtcollins at hpe.com>
Distinguished Technologist
HP Converged Cloud


More information about the Web-SIG mailing list