Target signals to specific clients #795
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
targetClientId
at service level, this will work automatically.LiveEvent
anduseLiveEvent
to support optional targeting, and updated sample 04 with an example.LiveObjectSynchronizer
andLiveMediaSessionCoordinator
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):
![image](https://private-user-images.githubusercontent.com/11748606/363088795-173deca1-ae82-4543-9528-a04f3fecd295.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MzM2NDMsIm5iZiI6MTczOTYzMzM0MywicGF0aCI6Ii8xMTc0ODYwNi8zNjMwODg3OTUtMTczZGVjYTEtYWU4Mi00NTQzLTk1MjgtYTA0ZjNmZWNkMjk1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDE1MjkwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTViODhhOTRmMGQzNTA4YmJhYzJkOGJmNWU2ZWQxMTE3OGNiZTI3YWNmNDBiZTE4ZGEzOGRlNWYxNzg4ZDM5YTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Br_Y5dI3CpjcH-M7un5X_Krlb0BuNRsSU8u1TFU3HXM)
This is the behavior when no
targetClientId
is provided. All remote clients will receive the event.Target client behavior:
![image](https://private-user-images.githubusercontent.com/11748606/363089016-0bdda3f1-d5dc-455d-a8e8-443220a9b489.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MzM2NDMsIm5iZiI6MTczOTYzMzM0MywicGF0aCI6Ii8xMTc0ODYwNi8zNjMwODkwMTYtMGJkZGEzZjEtZDVkYy00NTVkLWE4ZTgtNDQzMjIwYTliNDg5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDE1MjkwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ2MDgyNjEyY2YzODAxY2FmZGIxMDJkYWEwNGE4YTNhNjkxMzVmOTM5N2I1MjZmNjQ4MGY4ODVjMDM0YmI0M2YmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.2bjoKbwYu41s_yLZagzrZ19_MzmJsmF7Fzlj4fdgWUU)
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.