[streams] Clarify how/whether Stream/TransformStream may read/write "messages" (#249)

Use cases:
1. a stream-oriented protocol, such as HTTP, used for delivering messages between the client and server with an overlay protocol (e.g. different Push protocols tunneled over HTTP) 
2. a message-oriented L7 protocol, such as WebSocket

Proposed requirements under the Stream API model:
1. Message framing. 
1.1) by wire-level chunks, no-op, e.g. WebSocket
1.2) by MIME type, e.g. JSON array, multi-part, or any mark-up content-type
1.3) user supplied framing function (TBD) 
2. API - no change, messages are delivered as chunks, i.e. chunks respect the message boundary as decided by 1).
3. Buffering and back-pressure
3.1) only complete/atomic messages (i.e. chunks) can be read/written. I.e. bytes are buffered until the message boundary
3.2) flow-control is up to the implementation, by the # of chunks or # of bytes as understood by the underlying I/O layer

Thanks!





---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/249

Received on Thursday, 4 December 2014 19:48:46 UTC