FluidFramework
FluidFramework copied to clipboard
Audience consistency across Container serialization / rehydration
Make Audience more consistent across Container reloads (from serialized state), and by doing so - get one step closer to having stronger guarantees about Audience.getSelf() behaviors.
The primary motivation for this change - get one step closer to promising that if Audience.getSelf() returns non-undefined value, then Audience.getSelf().client !== undefined. I.e. that presence of new clientId means such user is actually present in Audience (including Audience.getMemeber(Audience.getSelf().clientId) !== undefined). Right now, it's not the case for two reasons:
- Broken by reloads from rehydrated state.
- "read" connections not waiting for join Signal for "self"
This PR fixes # 1, # 2 is coming next.
We should also expect that applications will have state on the side (in runtime memory) that has to be in sync with Audience (i.e. listen and react to audience events). And that applications could roundtrip such state through Container rehydration / reload process. It's clearly possible for applications to fixup such state through reload, but the less special application needs to do through reload, the better.
Related PR: https://github.com/microsoft/FluidFramework/pull/20768 (preserves clientId across reloads)
⯅ @fluid-example/bundle-size-tests: +570 Bytes
Metric Name | Baseline Size | Compare Size | Size Diff |
---|---|---|---|
aqueduct.js | 452.76 KB | 452.76 KB | ■ No change |
azureClient.js | 549.21 KB | 549.4 KB | ⯅ +192 Bytes |
connectionState.js | 680 Bytes | 680 Bytes | ■ No change |
containerRuntime.js | 256.01 KB | 256.01 KB | ■ No change |
fluidFramework.js | 339.57 KB | 339.57 KB | ■ No change |
loader.js | 133.01 KB | 133.19 KB | ⯅ +186 Bytes |
map.js | 41.42 KB | 41.42 KB | ■ No change |
matrix.js | 143.41 KB | 143.41 KB | ■ No change |
odspClient.js | 517.09 KB | 517.28 KB | ⯅ +192 Bytes |
odspDriver.js | 97.06 KB | 97.06 KB | ■ No change |
odspPrefetchSnapshot.js | 41.93 KB | 41.93 KB | ■ No change |
sharedString.js | 161.19 KB | 161.19 KB | ■ No change |
sharedTree.js | 339.57 KB | 339.57 KB | ■ No change |
Total Size | 3.15 MB | 3.15 MB | ⯅ +570 Bytes |
Baseline commit: fb1c1da1105b70cd7c3bec250bd8617a480005e8
Generated by :no_entry_sign: dangerJS against 7401db6f0a2ba9323777d626efd4b7e2dd86c278
Related internal document:
This PR has been automatically marked as stale because it has had no activity for 60 days. It will be closed if no further activity occurs within 8 days of this comment. Thank you for your contributions to Fluid Framework!