-
Notifications
You must be signed in to change notification settings - Fork 172
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
Select links based on message Priority & Reliability #1360
Conversation
f873bc9
to
91ee110
Compare
Preliminary throughput measurements for 743c199 and db099c1
|
91ee110
to
743c199
Compare
/// 3. QoS is enabled and priority range is available but reliability is unavailable | ||
/// 4. QoS is enabled and reliability is available but priority range is unavailable | ||
/// 5. QoS is enabled and both priority range and reliability are available | ||
fn to_u64(&self) -> u64 { |
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.
Should not this be in zenoh-codec/zenoh-protocol cartes ?
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.
According to @Mallets only StateAccept
could have a codec implementation as it's serialized on the wire. Otherwise this function is used for creating the ZExtZ64
and ZExtUnit
extensions.
Other establishment
extensions also just put their codec implementations in the same file. Even if everything were to have a codec I would still keep the try_from_64
/to_u64
functions because it's the same logic.
tracing::trace!("Scheduled: {:?}", $msg); | ||
return pl.push_network_message($msg); | ||
}; | ||
/// Returns the index of the best matching [`Reliability`]-[`PriorityRange`] pair. |
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.
The 'smaller range' rule prevents us from returning as soon as we find a matching range. Is it worth it ?
Even with this rule we could return as soon as we find a full match with a range of 1 (cannot find a smaller range later).
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 to disappoint but the search isn't even short-circuiting. It searches for three kinds of matches at the same time.
You could do search for link matching Priority and Reliability and early return on a result, but if you don't find any result you need to search by Reliability only. And if you don't find any result either you pick any link.
The search uses a fold to keep track of all three kinds of matches.
6c48058
to
7ccb394
Compare
7ccb394
to
b18e8d5
Compare
Closed in favor of #1398. |
The goal of this pull request is to enable users to choose the link on which a message is sent as a function of the message's Priority & Reliability.
Supersedes #1324 and #1356.