Re: WSGI: allowing short reads

Robert Collins <[email protected]> Fri, 26 Sep 2014 20:06:58 +1200
Newsgroups gmane.comp.python.web
Message-ID <CAJ3HoZ22wOiQEPa-1QgiUPnweckCMYb36eQ314FWM5QS5r_LQQ@mail.gmail.com>
On 26 September 2014 18:16, Dirkjan Ochtman <[email protected]> wrote:
> On Fri, Sep 26, 2014 at 6:14 AM, Robert Collins
> <[email protected]> wrote:
>> I don't think we need read1 (perhaps I'm wrong) but making read
>> consistent with the io library would be good, I think - particularly
>> for websockets.
>
> I would agree, but for websockets, I'd really want a per-frame
> generator or something. I've always used JSON messages that fit in a
> WebSockets frame, so I don't actually need to look for message/object
> boundaries.

Ok, we can drill down into that more deeply in the websocket context.
I guess a bunch of context around here will depend on whether
websockets is implemented as a primitive or if we want to make it
possible to implement websockets on top of a more basic primitive.
mod_wsgi (and other containers) may not be able to expose a raw
'socket' at any point, so I'd lean towards exposing a structured
thing.

-Rob
-- 
Robert Collins <[email protected]>
Distinguished Technologist
HP Converged Cloud
_______________________________________________
Web-SIG mailing list
[email protected]
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe: https://mail.python.org/mailman/options/web-sig/gcpw-web-sig%40m.gmane.org