W3C home > Mailing lists > Public > public-webrtc@w3.org > March 2014

Re: WebRTC and backpressure (how to stop reading? And how to start sending again?)

From: Wolfgang Beck <wolfgang.beck01@googlemail.com>
Date: Wed, 26 Mar 2014 17:22:19 +0100
Message-ID: <5332FEBB.1060304@gmail.com>
To: public-webrtc@w3.org
CC: harald@alvestrand.no

On 03/26/14 13:45, Harald Alvestrand wrote:
> Larger question:
> Is backpressure the right way to slow down the sender for reasons only 
> known to the application in an async-callback environment?
> From the design of the WebSockets API, I suspect that this was 
> considered and answered with "no" in that group, and we should avoid 
> revisiting that decision in this group.
> I could be wrong.
On way would be to have an event signalling "you can read some data now 
if you have time" instead of "here's some data, deal with it"

For the sending side, we need something similar: 'you can send at least 
one packet now' instead of just raising an unhelpful exception that 
doesn't tell you when you can try to send again. The File API has 
'onwriteend' for this purpose.

The libevent api (libevent.org) might be instructive.

The JS API as it is now is clearly broken.

Wolfgang Beck
Received on Wednesday, 26 March 2014 16:22:50 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:38 UTC