Re: [webrtc-pc] WHATWG streams for data channel messages

@alvestrand What @annevk said.

Blob is too high level and will create backpressure on the receiver side because the data is gathered in RAM until it's complete. One can argue about the sender side but it very likely will also create backpressure there.

Streams on the other hand are able to handle backpressure, so the underlying transport can be paused and resumed. They are high-level when possible (using `.pipeTo`) and low-level when required (using reader/writer). Data can be handed out with the first bytes received. For example it would be easy to upload a large file efficiently using the [fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch) to make a HTTP request coming from a data channel's message directly without having to store the data in RAM at once.

-- 
GitHub Notification of comment by lgrahl
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1732#issuecomment-360845171 using your GitHub account

Received on Friday, 26 January 2018 17:10:42 UTC