-
Notifications
You must be signed in to change notification settings - Fork 68
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 'best available' QoS policies #320
Conversation
The best available policy should select the highest level of service for the QoS setting while matching with the majority of endpoints. For example, in the case of a DDS middleware subscription, this means: - Prefer reliable reliability if all existing publishers on the same topic are reliable, otherwise use best effort. - Prefer transient local durability if all existing publishers on the same topic are transient local, otherwise use volatile. - Prefer manual by topic liveliness if all existing publishers on the same topic are manual by topic, otherwise use automatic. - Use a deadline that is equal to the largest deadline of existing publishers on the same topic. - Use a liveliness lease duration that is equal to the largest lease duration of existing publishers on the same topic. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
The implementation for DDS middlewares is in ros2/rmw_dds_common#60 I still need to:
|
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.
lgtm
One comment about the naming, "best" seems natural, but technically there's no reason to consider some of these better than the alternative.
For example, we could say RMW_QOS_POLICY_RELIABILITY_RELIABLE_IF_POSSIBLE
instead of RMW_QOS_POLICY_RELIABILITY_BEST_AVAILABLE
and it would be more accurate I think. I'm not sold on that name really, but "best" is definitely ambiguous to me, especially for things like duration and lifespace, etc. Not a blocker, just wanted to bring it up.
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 proposed interface sounds pretty reasonable.
We should really document that this options should be used with care.
Abusing it can create issues of qos profiles changing randomly when launching a bunch of nodes together (because of discovery timing).
True. It could be misleading to users who may think this is the "best" option. While a name like |
I think there is something nice about using the same term for all policy types, e.g. how should we name the functions introduced in ros2/rmw_dds_common#60? |
Maybe instead of "best available" we call it "highest available" (as in highest level of service, while matching the most endpoints)? |
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
PTAL at the latest changes to the documentation. |
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
If users set certain a QoS policy to 'best available', then the middleware will query the graph for endpoint info before creating a subscription or publisher. A QoS policy will be selected such that is matches the majority of endpoints while maintaining the highest level of service possible. Connects to ros2/rmw#320 Signed-off-by: Jacob Perron <jacob@openrobotics.org>
If users set a policy as 'best available', then the middleware will pick a policy that is most compatible with the current set of discovered endpoints while maintaining the highest level of service possible. For details about the expected behavior, see connected changes: - ros2/rmw#320 - ros2/rmw_dds_common#60 Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Testing feature added in ros2/rmw#320 for all supported rmw implementations. Test creating a subscription and publisher with 'best available' policies and confirm the actual QoS policies are what we expect (adapting to an existing endpoint). Signed-off-by: Jacob Perron <jacob@openrobotics.org>
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 only open discussion is #320 (comment), otherwise it looks good to me
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.
A few comments, but generally lgtm, nothing blocking.
* Avoid changing existing enum values * Clarify that actual reported QoS may be best effort or other values Signed-off-by: Jacob Perron <jacob@openrobotics.org>
In case users are relying on integer values. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
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.
lgtm
After thinking about it, I can't come up with a better name than "best available", we'll just want to document it well.
If the other discussions are resolved, then this is g2g for me.
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
I added a note about services: 492c48f |
CI is passing for all connected PRs 🎉 #320 (comment) |
Run an smoke CI on ci_linux with |
If users set a policy as 'best available', then the middleware will pick a policy that is most compatible with the current set of discovered endpoints while maintaining the highest level of service possible. For details about the expected behavior, see connected changes: - ros2/rmw#320 - ros2/rmw_dds_common#60 Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Expose 'best available' QoS policies If users set certain a QoS policy to 'best available', then the middleware will query the graph for endpoint info before creating a subscription or publisher. A QoS policy will be selected such that is matches the majority of endpoints while maintaining the highest level of service possible. Connects to ros2/rmw#320 * Add BEST_AVAILABLE to QoSPresetProfiles enum Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Add tests for 'best available' QoS policies Testing feature added in ros2/rmw#320 for all supported rmw implementations. Test creating a subscription and publisher with 'best available' policies and confirm the actual QoS policies are what we expect (adapting to an existing endpoint). * Add tests for services and clients Signed-off-by: Jacob Perron <jacob@openrobotics.org>
The best available policy should select the highest level of service for the QoS setting while matching with the majority of endpoints. For example, in the case of a DDS middleware subscription, this means: - Prefer reliable reliability if all existing publishers on the same topic are reliable, otherwise use best effort. - Prefer transient local durability if all existing publishers on the same topic are transient local, otherwise use volatile. - Prefer manual by topic liveliness if all existing publishers on the same topic are manual by topic, otherwise use automatic. - Use a deadline that is equal to the largest deadline of existing publishers on the same topic. - Use a liveliness lease duration that is equal to the largest lease duration of existing publishers on the same topic. * Add note about durability behavior with transient local publishers * Add note about getting actual QoS policy * Make best available enum value last to minimize disruption In case users are relying on integer values. * Document behavior for services Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Resolves #304
Alternative to #319
The best available policy should select the highest level of service for the QoS setting while matching with the majority of endpoints.
For example, in the case of a DDS middleware subscription, this means:
Connected PRs:
CI:
I've created branches named
jacob/qos_best_available
from PRs which are not using that name so CI will pick up the relevant changes.