-
-
Notifications
You must be signed in to change notification settings - Fork 423
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
Pluggable congestion control #759
Conversation
7c7cf6d
to
cbb56b6
Compare
33e5c5a
to
8a108ea
Compare
Codecov Report
@@ Coverage Diff @@
## master #759 +/- ##
==========================================
- Coverage 70.90% 70.74% -0.17%
==========================================
Files 73 74 +1
Lines 12917 12960 +43
==========================================
+ Hits 9159 9168 +9
- Misses 3758 3792 +34
Continue to review full report at Codecov.
|
I think I'm okay with the config (Otherwise, things look pretty good to me, though I'll do a final pass once we figure out the factory thing.) |
The explicit trait approach: pub trait CongestionControllerFactory {
fn new_controller(&self) -> Box<dyn CongestionController>;
}
// ...
impl CongestionControllerFactory for Arc<NewRenoConfig> {
fn new_controller(&self) -> Box<dyn CongestionController> {
Box::new(NewReno::new(self.clone(), Instant::now()))
}
} In use: config.congestion_controller_factory(Arc::new(config)); |
How would the |
Between the two, I'm leaning towards the explicit trait right now, because |
Cool, I think I agree. |
Updated with an explicit factory trait. I also refactored things to make the |
fad6fea
to
dc01790
Compare
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.
Sorry, reviewed the trait in a little more detail.
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.
Awesome work!
As discussed in #693.
Draft until the abstractness of the interface has been validated by the addition of at least one other controller (probably CUBIC/HyStart++).