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

A subscriptions transport coalescer #3316

Open
wants to merge 1 commit into
base: 10-02_Convert_websocket_transport_to_channel
Choose a base branch
from

Conversation

steveluscher
Copy link
Collaborator

Summary

Given two identical subscriptions, we should not send the request to the server twice. This higher-order transport watches for identical subscriptions over the same transport and returns the same DataPublisher to both.

Note

It is true that the server coalesces subscriptions on the backend, but coalescing them on the client is still worthwhile in that it reduces chatter over the wire (ie. the subsequent subscription requests don't even get made) and speeds up subscription time on the client for identical subscriptions.

Copy link

changeset-bot bot commented Oct 4, 2024

⚠️ No Changeset found

Latest commit: f77f8a0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Collaborator Author

steveluscher commented Oct 4, 2024

@steveluscher steveluscher force-pushed the 10-02-fix_lint_in_version_header branch from f44efa0 to 46b9944 Compare October 4, 2024 06:16
@steveluscher steveluscher force-pushed the 10-02-a_subscriptions_transport_coalescer branch from 1d43b65 to 280bb5c Compare October 4, 2024 06:16
@steveluscher steveluscher force-pushed the 10-02-fix_lint_in_version_header branch from 46b9944 to 7d7c686 Compare October 4, 2024 17:56
@steveluscher steveluscher force-pushed the 10-02-a_subscriptions_transport_coalescer branch from 280bb5c to 4d8926d Compare October 4, 2024 17:56
@steveluscher steveluscher force-pushed the 10-02-fix_lint_in_version_header branch from 7d7c686 to 977e753 Compare October 4, 2024 18:08
@steveluscher steveluscher force-pushed the 10-02-a_subscriptions_transport_coalescer branch from 4d8926d to 02f25ce Compare October 4, 2024 18:08
@steveluscher steveluscher force-pushed the 10-02-fix_lint_in_version_header branch from 977e753 to 28aad7a Compare October 4, 2024 19:27
@steveluscher steveluscher force-pushed the 10-02-a_subscriptions_transport_coalescer branch from 02f25ce to 670630c Compare October 4, 2024 19:27
@steveluscher steveluscher force-pushed the 10-02-fix_lint_in_version_header branch from 28aad7a to eef971e Compare October 4, 2024 19:34
@steveluscher steveluscher force-pushed the 10-02-a_subscriptions_transport_coalescer branch from 670630c to 10fbbcf Compare October 4, 2024 19:35
@steveluscher steveluscher force-pushed the 10-02-fix_lint_in_version_header branch from eef971e to 4e1350c Compare October 4, 2024 21:06
@steveluscher steveluscher force-pushed the 10-02-a_subscriptions_transport_coalescer branch from 10fbbcf to 43deb1c Compare October 4, 2024 21:06
@steveluscher steveluscher force-pushed the 10-02-fix_lint_in_version_header branch from 4e1350c to 5b6a7be Compare October 4, 2024 21:10
@steveluscher steveluscher force-pushed the 10-02-a_subscriptions_transport_coalescer branch from 43deb1c to 59c3fa8 Compare October 4, 2024 21:10
@steveluscher steveluscher changed the base branch from 10-02-fix_lint_in_version_header to 10-02_Convert_websocket_transport_to_channel October 4, 2024 21:10
@steveluscher steveluscher force-pushed the 10-02_Convert_websocket_transport_to_channel branch from e927f6c to 100141c Compare October 4, 2024 21:17
@steveluscher steveluscher force-pushed the 10-02-a_subscriptions_transport_coalescer branch from 59c3fa8 to 4b1de9b Compare October 4, 2024 21:18
@steveluscher steveluscher force-pushed the 10-02_Convert_websocket_transport_to_channel branch from 100141c to 859d964 Compare October 4, 2024 21:21
@steveluscher steveluscher force-pushed the 10-02-a_subscriptions_transport_coalescer branch from 4b1de9b to 04d3cc9 Compare October 4, 2024 21:22
@steveluscher steveluscher force-pushed the 10-02_Convert_websocket_transport_to_channel branch from 859d964 to 7557358 Compare October 4, 2024 21:25
@steveluscher steveluscher force-pushed the 10-02-a_subscriptions_transport_coalescer branch from 04d3cc9 to d64134f Compare October 4, 2024 21:25
@steveluscher steveluscher force-pushed the 10-02_Convert_websocket_transport_to_channel branch 2 times, most recently from 4518435 to c3a3253 Compare October 4, 2024 22:50
@steveluscher steveluscher force-pushed the 10-02-a_subscriptions_transport_coalescer branch from d64134f to f840323 Compare October 4, 2024 22:50
@steveluscher steveluscher force-pushed the 10-02_Convert_websocket_transport_to_channel branch from c3a3253 to 6974ccf Compare October 5, 2024 01:51
@steveluscher steveluscher force-pushed the 10-02-a_subscriptions_transport_coalescer branch from f840323 to f77f8a0 Compare October 5, 2024 01:51
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.

1 participant