You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> To fully replace the former `Latest` and `LatestMap` functions, you should import `StateFactory` and call `StateFactory.latest` and `StateFactory.latestMap` respectively. The new `Latest` and `LatestMap` APIs replace `LatestValueManager` and `LatestMapValueManager` respectively.
Copy file name to clipboardExpand all lines: docs/docs/build/presence.md
+24-24
Original file line number
Diff line number
Diff line change
@@ -19,13 +19,13 @@ The key scenarios that the new Presence APIs are suitable for includes:
19
19
20
20
## Concepts
21
21
22
-
A session is a period of time when one or more clients are connected to a Fluid service. Session data and messages may be exchanged among clients, but will disappear once the no clients remain. (More specifically once no clients remain that have acquired the session `IPresence` interface.) Once fully implemented, no client will require container write permissions to use Presence features.
22
+
A session is a period of time when one or more clients are connected to a Fluid service. Session data and messages may be exchanged among clients, but will disappear once no clients remain. (More specifically once no clients remain that have acquired the session `Presence` interface.) Once fully implemented, no client will require container write permissions to use Presence features.
23
23
24
24
### Attendees
25
25
26
-
For the lifetime of a session, each client connecting will be established as a unique and stable `ISessionClient`. The representation is stable because it will remain the same `ISessionClient` instance independent of connection drops and reconnections.
26
+
For the lifetime of a session, each client connecting will be established as a unique and stable `Attendee`. The representation is stable because it will remain the same `Attendee` instance independent of connection drops and reconnections.
27
27
28
-
Client Ids maintained by `ISessionClient` may be used to associate `ISessionClient` with quorum, audience, and service audience members.
28
+
Client IDs maintained by `Attendee` may be used to associate `Attendee` with quorum, audience, and service audience members.
29
29
30
30
### Workspaces
31
31
@@ -35,33 +35,33 @@ There are two types of workspaces: States and Notifications.
35
35
36
36
#### States Workspace
37
37
38
-
A states workspace, `PresenceStates`, allows sharing of simple data across attendees where each attendee maintains their own data values that others may read, but not change. This is distinct from a Fluid DDS where data values might be manipulated by multiple clients and one ultimate value is derived. Shared, independent values are maintained by value managers that specialize in incrementality and history of values.
38
+
A `StatesWorkspace` allows sharing of simple data across attendees where each attendee maintains their own data values that others may read, but not change. This is distinct from a Fluid DDS where data values might be manipulated by multiple clients and one ultimate value is derived. Shared, independent values are maintained by State objects that specialize in incrementality and history of values.
39
39
40
40
#### Notifications Workspace
41
41
42
-
A notifications workspace, `PresenceNotifications`, is similar to states workspace, but is dedicated to notification use-cases via `NotificationsManager`.
42
+
A `NotificationsWorkspace` is similar to states workspace, but is dedicated to notification use-cases via `NotificationsManager`.
43
43
44
-
### Value Managers
44
+
### States
45
45
46
-
#### LatestValueManager
46
+
#### Latest
47
47
48
-
Latest value manager retains the most recent atomic value each attendee has shared. Use `Latest` to add one to `PresenceStates` workspace.
48
+
`Latest`retains the most recent atomic value each attendee has shared. Use `StateFactory.latest` to add one to `StatesWorkspace`.
49
49
50
-
#### LatestMapValueManager
50
+
#### LatestMap
51
51
52
-
Latest map value manager retains the most recent atomic value each attendee has shared under arbitrary keys. Values associated with a key may be nullified (appears as deleted). Use `LatestMap` to add one to `PresenceStates` workspace.
52
+
`LatestMap`retains the most recent atomic value each attendee has shared under arbitrary keys. Values associated with a key may be nullified to represent deletetion. Use `StateFactory.latestMap` to add one to a `StatesWorkspace`.
53
53
54
54
#### NotificationsManager
55
55
56
-
Notifications value managers are special case where no data is retained during a session and all interactions appear as events that are sent and received. Notifications value managers may be mixed into a `PresenceStates` workspace for convenience. They are the only type of value managers permitted in a `PresenceNotifications` workspace. Use `Notifications` to add one to `PresenceNotifications` or `PresenceStates` workspace.
56
+
Notifications are special case where no data is retained during a session and all interactions appear as events that are sent and received. Notifications may be mixed into a `StatesWorkspace`for convenience. `NotificationsManager` is the only presence object permitted in a `NotificationsWorkspace`. Use `Notifications` to add one to a `NotificationsWorkspace` or `StatesWorkspace`.
57
57
58
58
## Onboarding
59
59
60
60
While this package is developing as experimental and other Fluid Framework internals are being updated to accommodate it, a temporary Shared Object must be added within container to gain access.
would be compatible with both of the prior schemas as "myState2" is a different name. Though in this situation none of the different clients would be able to observe each other.
@@ -114,12 +114,12 @@ Notifications are fundamentally unreliable at this time as there are no built-in
114
114
115
115
Presence updates are grouped together and throttled to prevent flooding the network with messages when presence values are rapidly updated. This means the presence infrastructure will not immediately broadcast updates but will broadcast them after a configurable delay.
116
116
117
-
The `allowableUpdateLatencyMs` property configures how long a local update may be delayed under normal circumstances, enabling grouping with other updates. The default `allowableUpdateLatencyMs` is **60 milliseconds** but may be (1) specified during configuration of a [States Workspace](#states-workspace) or [Value Manager](#value-managers) and/or (2) updated later using the `controls` member of Workspace or Value Manager. [States Workspace](#states-workspace) configuration applies when a Value Manager does not have its own setting.
117
+
The `allowableUpdateLatencyMs` property configures how long a local update may be delayed under normal circumstances, enabling grouping with other updates. The default `allowableUpdateLatencyMs` is **60 milliseconds** but may be (1) specified during configuration of a [States Workspace](#states-workspace) or [States](#states) and/or (2) updated later using the `controls` member of Workspace or States. The [States Workspace](#states-workspace) configuration is used when States do not have their own setting.
118
118
119
119
Notifications are never queued; they effectively always have an `allowableUpdateLatencyMs` of 0. However, they may be grouped with other updates that were already queued.
120
120
121
121
Note that due to throttling, clients will not receive updates for every intermediate value set by another client. For example,
122
-
with `Latest*ValueManagers`, the only value sent is the value at the time the outgoing grouped message is sent. Previous
122
+
with `Latest` and `LatestMap`, the only value sent is the value at the time the outgoing grouped message is sent. Previous
123
123
values set by the client will not be broadcast or seen by other clients.
124
124
125
125
#### Example
@@ -128,15 +128,15 @@ You can configure the grouping and throttling behavior using the `allowableUpdat
0 commit comments