W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > January 2018

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

From: Lennart Grahl via GitHub <sysbot+gh@w3.org>
Date: Fri, 26 Jan 2018 17:10:32 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-360845171-1516986630-sysbot+gh@w3.org>
@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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:21:58 UTC