Skip to content

Commit eb8ab6e

Browse files
committed
improvement(client-presence): improve join response scalability and reliability
- In broadcast join responses: - include list of Client Connection Ids that the broadcast response covers. This will prevent hole where existing client sees a broadcast result too soon after a Join message and assumes it contains all sufficient and timely data. - potential join respondents will only reply if they have received a join response (or appear to have same or more requests that other audience members indicating complete knowledge) - Increase trust of Audience (dictated by service) and select some of its member for named (primary) join responders when no Quorum members are known. - Delay Join response messages for scalability - *Important* Do not broadcast a join response immediately even when selected as a named responder. Wait 200ms for others that may join. - Add telemetry events for join handling: - `JoinDeferred` - client has chosen not to request join immediately - `JoinRequested` - client has broadcast Join signal - `JoinResponse` - client is responding to join request Each event includes attendee and connection ids. `JoinResponse` additionally contains lists for whom they are responding to. Update tests for higher client counts and delayed join responses and enable previously failing test. Limit higher client count (longer duration) tests to dedicated CI pipelines.
1 parent 015f48a commit eb8ab6e

File tree

13 files changed

+661
-403
lines changed

13 files changed

+661
-403
lines changed

.changeset/floppy-sides-hammer.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@fluidframework/presence": minor
3+
"__section": feature
4+
---
5+
Improved join scalability
6+
7+
Protocol for attendees joining has been updated to more efficiently accommodate a larger number of attendees, including when few-to-none have write access.

examples/apps/presence-tracker/tests/presenceTracker.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ describe("presence-tracker", () => {
178178
expected: Record<string, string>,
179179
) => boolean
180180
)(expectation),
181-
{ timeout: 100 },
181+
{ timeout: 300 },
182182
expected,
183183
)
184184
.catch(async () => {

0 commit comments

Comments
 (0)