-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add rate control event #421
Conversation
Meeting:
|
@pthatcher - while we debate this PR, can you fix the ipr issue signalled above? The system would like you to link your github accounts with your W3C account so that PRs can be automatically accepted. |
It's fixed now. |
I think we want a bitrate that means "if you write this much or less, you won't cause queueing", so you can go throttle you video encoder, for example.
I don't think we need anything more complex than the bitrate you should send at that will avoid queueing.
Does anyone do rate control that way (based on RTT)? It seems strange to me, but I suppose you could calculate it using the RTT.
I think it's less about an individual frame and more about bitrate over time. If you exceed the bitrate for a brief period (with a key frame), it will queue, so make sure you go lower than the target rate for a while after to a make sure it drains.
I think we should stick with the rate, not the window. In fact, many algorithms, like googcc calculate target rate directly, not a window. |
I think this is ready for more review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have any plans to write some prose to go with this?
Meeting:
|
I have added prose. |
All of these have been added/fixed. |
I've done my best to make WebTransport an EventTarget and define the ratecontrolfeedback event, copying off of the WebRTC and WebCodecs specs. Please let me know what I did wrong :). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is coming together! Lots of detail to work out here, so pardon all the comments.
index.bs
Outdated
attribute unsigned long? rateControlFeedbackMinInterval; | ||
attribute EventHandler onratecontrolfeedback; | ||
readonly attribute WebTransportRateControlFeedback rateControlFeedback; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the bikeshed logic for the difference here?
wt.rateControlFeedbackMinInterval
wt.rateControlFeedback.sendRate
Isn't the following simpler to remember?
wt.rateControlFeedback.minInterval
wt.rateControlFeedback.sendRate
Easier to read, and I don't see why we need to make a difference between input and output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lastly, to put in writing what I've advocated in meetings, I'd personally prefer something simpler like:
wt.rateControlMinInterval
wt.rateControlSendRate
...as this seems sufficient to satisfy the "capture any state information in the target object." design principle. I really don't see what the extra .
dot accomplishes, even if we add more attributes in the future. They're still attributes of the session.
I don't see them as something separate — I.e. the attributes will be readable and update whether one listens for the event or not.
I'd love to hear other opinions on this, to understand the benefit(s) of the .
dot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>
Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>
Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>
Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>
Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>
Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>
Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>
Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>
Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>
Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>
Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>
SHA: 6e4b8b7 Reason: push, by pthatcher Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
<td class="non-normative">A {{long}} indicating the maximum frequency | ||
that the {{WebTransport/ratecontrolfeedback}} will be fired. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this the minimum time between events? Or even the duration over which the event is suppressed after receiving another.
Sure interval is inversely proportional to rate, but only loosely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is incomplete, so I object to it having been merged.
which an application is sending data on another session, one session could learn about the | ||
the rate at which another application is sending data. To avoid this, a user agent | ||
can restrict access to information or modify information provided. For example, it could leave | ||
the send rate at an artifical value to make it more difficult to infer anything from it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems pretty loose. This boils down to "maybe the browser could work something out", which is pretty unsatisfying. We should be more concrete, either block access to the attribute (which reveals the presence of another entity, so that needs thought) or define an exemplar strategy for making it available.
When the user agent changes the rate at which it dequeues bytes for sending on a | ||
{{WebTransport}} |transport|'s [=WebTransport session=], | ||
it MUST [=queue a network task=] with |transport| to run these steps: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This requirement is impossible, or nearly so. How does the UA monitor the rate?
1. Set |transport|.{{WebTransport/rateControlFeedback}}.{{WebTransportRateControlFeedback/[[SendRate]]}} | ||
to the new rate for [=WebTransport session=]. | ||
1. Fire an event named {{WebTransport/ratecontrolfeedback}} at |transport|. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is the event limiting feature here?
Fixes #21 by adding an event to give RateControlFeedback to let the application know the maximum rate it should send at to avoid queuing.
Preview | Diff