Skip to content
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

Added draft of an article about QoS #36

Merged
merged 1 commit into from
Oct 8, 2015
Merged

Added draft of an article about QoS #36

merged 1 commit into from
Oct 8, 2015

Conversation

esteve
Copy link
Member

@esteve esteve commented Jun 27, 2015

Draft of an article about QoS

Comments and questions are more than welcome.

@esteve esteve added in progress Actively being worked on (Kanban column) in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Jun 27, 2015
@esteve esteve self-assigned this Jun 29, 2015
@tfoote
Copy link
Contributor

tfoote commented Jun 29, 2015

I think this might be a good place to define our standard set of QoS profiles.

@esteve
Copy link
Member Author

esteve commented Jun 29, 2015

@tfoote agreed. I'm adding a few to the proposed implementation and experimenting with them to have a sense of what they may look like. So far I have:

  • sensor data (last history, depth size 5, best effort)
  • parameters (last history, depth size 10, reliable)
  • client/service (last history, depth 10, reliable)
  • default (all history, depth 10, reliable)


DDS provides fine-grained control over the Quality of Service (QoS) setting for each of the entities involved in the system.
Common entities whose behavior can be modified via QoS settings include: Topic, DataReader, DataWriter, Publisher and Subscriber.
QoS is enforced based on a Request vs Offerent Model, however Publications and Subscriptions will only match if the QoS settings are compatible.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless I'm mistaken, in English I believe this is Offerer rather than Offerent.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks!

@wjwwood
Copy link
Member

wjwwood commented Jun 29, 2015

What's there looks good to me, but without more it's hard for me to see where this article is going. Maybe it would help me if you could add some more skeleton structure to the document with TODO's to fill it with details like the different proposed built-in QoS defaults.

@esteve
Copy link
Member Author

esteve commented Jun 29, 2015

@wjwwood yeah, I just used this PR to structure my thoughts a bit. I'm making the API changes in the following PRs and will reflect them in this document:

ros2/rmw_opensplice#42
ros2/rmw#15
ros2/rmw_connext#42

Both PrismTech OpenSplice and RTI Connext support loading of QoS policies via an external XML file.
In environments where DDS is already deployed and also to enable more extensibility other than the offered by the ROS 2.0 and the predefined profiles, ROS 2.0 may provide loading of the QoS settings via the same mechanisms the underlying DDS implementations use.

## References
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for references!

While reviewing the realtime article, Adolfo encouraged me to cite sources inline. I like the idea of mapping information directly to sources, and I think we should come up with a unified way of doing it (if you want to do it in this article).

I see two options for this:

@dirk-thomas dirk-thomas added in progress Actively being worked on (Kanban column) ready Work is about to start (Kanban column) and removed in review Waiting for review (Kanban column) in progress Actively being worked on (Kanban column) labels Jul 28, 2015

## ROS 2.0 proposal

Given the complexity of choosing the correct QoS settings for a given scenario, it may make sense for ROS 2.0 to provide a set of predefined QoS profiles for common usecases (e.g. sensor data, real time, etc.), while at the same time give the flexibility to control specific features of the QoS policies for the most common entities.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of providing good defaults for different use cases, rather than a global set of defaults expected to be used everywhere. An integrator will be able to say "This topic is carrying range data; I shall use the sensor data QoS set."

@BobDean
Copy link

BobDean commented Aug 6, 2015

What us the reasoning for the chosen depth sizes? And given the history settings, does this mean the dds layer us handling all message queuing, that there will not be a node level "callback queue"?

@wjwwood
Copy link
Member

wjwwood commented Aug 11, 2015

@BobDean I think the current defaults are pretty arbitrary, and @esteve is looking into the best defaults for a few cases. DDS is handling all of the queueing, though we might have a ring buffer, whose size is driven by the depth setting, which is used for intra process communications. That's all still up in the air at the moment though.

@wjwwood wjwwood closed this Sep 1, 2015
@wjwwood wjwwood removed the ready Work is about to start (Kanban column) label Sep 1, 2015
@wjwwood wjwwood reopened this Sep 1, 2015
@wjwwood wjwwood added in progress Actively being worked on (Kanban column) ready Work is about to start (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Sep 1, 2015
@jacquelinekay
Copy link
Contributor

Now that the QoS API has been designed and iterated over, it seems like a good time to make this design document more specific so that future changes we make are consistent with each other.

Here are a few questions that have been raised about the current prototype during the review process:

  1. What are the default QoS profiles for pub/sub and services and what is the justification for choosing these values?
  2. What is the behavior for overriding system defaults for certain QoS profiles? Should it be uniform for all entities? For example, in rmw_connext, the behavior for the depth setting for Publishers and Subscriptions is confusing.
  3. Should the QoS settings passed to DDS also affect the client library layer (e.g. depth determines the size of ring buffer for intra-process communication)?

@esteve
Copy link
Member Author

esteve commented Sep 15, 2015

@jacquelinekay thanks for summarizing the discussion, I'll update the document to address these questions.

@esteve esteve removed the ready Work is about to start (Kanban column) label Sep 22, 2015
@esteve esteve added the in progress Actively being worked on (Kanban column) label Sep 22, 2015
@esteve
Copy link
Member Author

esteve commented Sep 25, 2015

I've added a section about QoS profiles. I don't know how intraprocess should honor (or if it should) the QoS settings, so I added that as an open question.

Does anyone think it'd worth adding a terminology section explaining every QoS setting implemented in the current API? I think it'd be useful, but I worried this would make the article too long.

@tfoote
Copy link
Contributor

tfoote commented Sep 25, 2015

Does anyone think it'd worth adding a terminology section explaining every QoS setting implemented in the current API? I think it'd be useful, but I worried this would make the article too long.

Terminology might be good, but I'd suggest linking to a DDS documentation of QoS definitions, just clearly state which ones we're supporting maybe?

@wjwwood
Copy link
Member

wjwwood commented Sep 25, 2015

I actually think this article should stand on it's own and that readers should not have to go to a set of DDS documentation to understand what QoS settings ROS is providing and what they do.

@esteve
Copy link
Member Author

esteve commented Sep 25, 2015

I agree with @wjwwood , I prefer documentation that doesn't force me to jump to external resource for core topics. I can add links to the QoS section of the DDS spec in case the readers want to know more.

@esteve
Copy link
Member Author

esteve commented Sep 25, 2015

I updated the document removing the QoS profile and instead explained it can store and how the values affect its behavior.

* Reliable: guarantee that samples are delivered, may retry multiple times.
* Durability.
* Transient local: *only applies to `DataWriter`s*. `DataWriter` becomes responsible of persisting samples until a corresponding `DataReader` becomes available.
* Volatile: no attempt is made to persist samples.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For each of the main bullets there is also the option of "system default".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added note about this. Thanks.

@esteve esteve added in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Sep 28, 2015
@esteve
Copy link
Member Author

esteve commented Sep 28, 2015

I've rebased this branch and squashed the commits. Is there anything that needs improving?


* Default QoS settings for publishers and subscriptions.
In order to make the transition from ROS1 to ROS2, exercising a similar network behavior is desirable.
By default, publishers and subscriptions are reliable in ROS2.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add note here that this default value won't work for larger messages for all rmw implementations atm?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, will update the document to reflect this.

@esteve
Copy link
Member Author

esteve commented Sep 29, 2015

Addressed @dirk-thomas 's latest feedback, squashed again and pushed.

* Default QoS settings for publishers and subscriptions.
In order to make the transition from ROS1 to ROS2, exercising a similar network behavior is desirable.
By default, publishers and subscriptions are reliable in ROS2.
However, many DDS vendors don't support publishing large messages (e.g. images) with reliable connections.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sentence is a bit misleading. Connext does support publishing large messages with reliable connections. But we have to use a different API for that.

@wjwwood
Copy link
Member

wjwwood commented Oct 7, 2015

Todo:

  • @esteve to address one more comment
  • Link to each current profile with a justification and a note that these are subject to suggestion and feedback.

@esteve
Copy link
Member Author

esteve commented Oct 8, 2015

Updated the article with the most recent feedback. I'm going to squash and merge this PR soon unless there are more comments.

esteve added a commit that referenced this pull request Oct 8, 2015
Added article about QoS
@esteve esteve merged commit f0119e0 into gh-pages Oct 8, 2015
@esteve esteve removed the in review Waiting for review (Kanban column) label Oct 8, 2015
@esteve esteve deleted the qos branch October 8, 2015 01:02
@dirk-thomas
Copy link
Member

Currently the article does not mention the parameter related profiles. Is that intentional? If not, I think especially the depth of 1000 could use some rational.

@dirk-thomas
Copy link
Member

@esteve Can you please comment on the previous question.

@esteve
Copy link
Member Author

esteve commented Oct 22, 2015

The parameters profile is not mentioned in the article because we still haven't officially released the support for parameters. In any case, the value in there is purely arbitrary, the parameters profile has a priori the same rationale as the services one, so it may make sense to use the same values.

@dirk-thomas
Copy link
Member

Since the parameters are scheduled for the upcoming alpha next week I think the article should be updated to cover the QoS setting for services (and parameters).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants