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

Extend websocket server to support message limits and throttling #116

Merged
merged 4 commits into from
Jun 9, 2021

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Jun 3, 2021

Summary

Added 3 new features:

  • setting max msg queue size

    • Msg published to websocket clients can now have a msg queue size limit to prevent the queue from infinitely growing. You can now set this by specifying:
      <queue_size_per_connection>10</queue_size_per_connection>
    
  • throttling publish rate for topics

    • Added a keyword throttle that can be used by clients to limit the publish rate of a specific topic. This is initiated by the websocket client and it affects all clients who are subscribed to that topic.
    • see related pull request in web app
  • limiting number of subscriptions per msg type

    • some msg types have large message size. So this configuration allows users to limit the number of subscriptions that each connection can open for a particular msg type, e.g. the following limits each client to subscribe to only 1 point cloud topic
    <subscription_limit_per_connection>
      <subscription>
        <msg_type>ignition.msgs.PointCloudPacked</msg_type>
        <limit>1</limit>
      </subscription>
    </subscription_limit_per_connection>
    

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge

iche033 added 2 commits June 1, 2021 20:07
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
ahcorde
ahcorde previously requested changes Jun 3, 2021
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Copy link
Contributor

@nkoenig nkoenig left a comment

Choose a reason for hiding this comment

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

One minor comment

Signed-off-by: Nate Koenig <nate@openrobotics.org>
@nkoenig nkoenig dismissed ahcorde’s stale review June 9, 2021 18:31

Changes resolved.

@nkoenig nkoenig merged commit c3dd804 into ign-launch3 Jun 9, 2021
@nkoenig nkoenig deleted the msg_rate_limit branch June 9, 2021 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔮 dome Ignition Dome
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants