-
Notifications
You must be signed in to change notification settings - Fork 2
Move GCC rewrite from interceptor to this repo #61
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
Conversation
|
@mengelbart, I like the new, cleaner BWE interface. I want to understand the implementation more deeply, so I might need an additional 1-2 days for review, if that's not a problem. |
|
Yes, please take all the time you need. We don't need to rush and it's much better if there's someone else looking over this, too! Please let me know if anything is unclear. |
| ECNCE // 11 | ||
| ) | ||
|
|
||
| type Acknowledgment struct { |
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.
Perhaps we could move this to a separate package? This would allow us to:
- Define a generic interface for estimators (currently
OnAcks(arrival time.Time, rtt time.Duration, acks []Acknowledgment) int). - Extend the interface later (e.g. provide more data).
- Support multiple estimators under a unified pattern.
| Arrival: time.Time{}.Add(30 * time.Millisecond), | ||
| }, | ||
| }, | ||
| }, |
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.
Could you clarify how out-of-order packets are being handled? I notice this packet appears in the expected output, which suggests it's being processed normally rather than ignored.
| for len(*e.history) > 0 && (*e.history)[0].arrival.Before(deadline) { | ||
| heap.Pop(e.history) | ||
| } | ||
| earliest := e.latestArrival |
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.
If we:
- Track the earliest timestamp in the heap (O(1) access)
- Maintain a running sum of values in the heap
Then GetRate() could run in O(1) time since we'd just need to:
return 8*sum / (now - earliest)
| Departure time.Time | ||
| Arrived bool | ||
| Arrival time.Time | ||
| ECN ECN |
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.
Is there a specific reason we’re avoiding rtcp.ECN?
|
|
||
| import "time" | ||
|
|
||
| func MeasureRTT(reportSent, reportReceived, latestAckedSent, latestAckedArrival time.Time) time.Duration { |
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 doesn't appear to be directly related to congestion control. Could we move this computation to the caller instead?
gcc/delay_rate_controller.go
Outdated
| "github.com/pion/logging" | ||
| ) | ||
|
|
||
| const maxSamples = 1000 |
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 constant seems unused
|
@aalekseevx Thanks for reviewing and sorry I didn't look at it yet. I will probably have some time to continue working on this soon but I'd like to get pion/interceptor#300 done first because it blocks this PR. |
5b89400 to
b5bd729
Compare
abc63d2 to
5362b62
Compare
|
Moving this here: pion/bwe#2 |
Description
Moves refactored BWE implementation from interceptors to this repo (as discussed here).