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

Target signals to specific clients #795

Merged
merged 6 commits into from
Aug 30, 2024

Conversation

ryanbliss
Copy link
Contributor

  • Added ability to send signals to specific clients, for drivers that support it (e.g., odsp-driver).
  • Once azure-client and tinylicious supports targetClientId at service level, this will work automatically.
  • For unsupported drivers, the behavior is simulated appropriately such that events are only handled from the targeted client.
  • Updated LiveEvent and useLiveEvent to support optional targeting, and updated sample 04 with an example.
  • Implement targeting out of box for LiveObjectSynchronizer and LiveMediaSessionCoordinator connect events out of the box. For supported drivers, this will decrease COGS and server load considerably in larger session sizes (no N^2).

Non-targeted behavior (existing):
This is the behavior when no targetClientId is provided. All remote clients will receive the event.
image

Target client behavior:
This is the behavior when targetClientId is provided (left side is targeting top-right). Notice how the top-right received the most recent message sent by the top-left.
image

Copy link
Contributor

@huntj88 huntj88 left a comment

Choose a reason for hiding this comment

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

Looks good, would add a couple unit tests

@ryanbliss
Copy link
Contributor Author

Looks good, would add a couple unit tests

Added UTs to LiveEvent and LiveObjectSynchronizer, which should give us more or less complete coverage for the scenarios at hand.

@ryanbliss ryanbliss merged commit 2db81b7 into mainv2 Aug 30, 2024
7 checks passed
@ryanbliss ryanbliss deleted the ryanbliss/mainv2-target-client-id branch August 30, 2024 22:39
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.

2 participants