Skip to content

Commit 8eab509

Browse files
authored
Merge pull request #333 from ably/PUB-1041/object-sync
[PUB-1041] OBJECT_SYNC spec
2 parents c1c981c + 4b7d70e commit 8eab509

2 files changed

Lines changed: 162 additions & 4 deletions

File tree

specifications/features.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ The key words "must", "must not", "required", "shall", "shall not", "should", "s
393393
- `(PC2)` No generic plugin interface is specified, and therefore there is no common API exposed by all plugins. However, for type-safety, the opaque interface `Plugin` should be used in strongly-typed languages as the type of the `ClientOptions.plugins` collection as per [TO3o](#TO3o).
394394
- `(PC3)` A plugin provided with the `PluginType` enum key value of `vcdiff` should be capable of decoding "vcdiff"-encoded messages. It must implement the `VCDiffDecoder` interface and the client library must be able to use it by casting it to this interface.
395395
- `(PC3a)` The base argument of the `VCDiffDecoder.decode` method should receive the stored base payload of the last message on a channel as specified by [RTL19](#RTL19). If the base payload is a string it should be encoded to binary using UTF-8 before being passed as base argument of the `VCDiffDecoder.decode` method.
396-
- `(PC5)` A plugin provided with the `PluginType` enum key value of `Objects` should provide the [RealtimeObjects](#RTO1) feature functionality for realtime channels ([RTL27](#RTL27)). The plugin object itself is not expected to provide a public API. The type of the plugin object, and how it enables the Objects feature for a realtime channel, are left for individual implementations to decide.
396+
- `(PC5)` A plugin provided with the `PluginType` enum key value of `Objects` should provide the [RealtimeObjects](../objects-features#RTO1) feature functionality for realtime channels ([RTL27](#RTL27)). The plugin object itself is not expected to provide a public API. The type of the plugin object, and how it enables the Objects feature for a realtime channel, are left for individual implementations to decide.
397397
- `(PC4)` A client library is allowed to accept plugins other than those specified in this specification, through the use of additional `ClientOptions.plugins` keys defined by that library. The library is responsible for defining the interface of these plugins, and for making sure that these keys do not clash with the keys defined in this specification.
398398

399399
### PluginType {#plugin-type}
@@ -689,7 +689,7 @@ The threading and/or asynchronous model for each realtime library will vary by l
689689
### RealtimeChannel {#realtime-channel}
690690

691691
- `(RTL23)` `RealtimeChannel#name` attribute is a string containing the channel's name
692-
- `(RTL1)` As soon as a `RealtimeChannel` becomes attached, all incoming messages and presence messages (where 'incoming' is defined as 'received from Ably over the realtime transport') are processed and emitted where applicable. `PRESENCE` and `SYNC` messages are passed to the `RealtimePresence` object ensuring it maintains a map of current members on a channel in realtime
692+
- `(RTL1)` As soon as a `RealtimeChannel` becomes attached, all incoming messages, presence messages and object messages (where 'incoming' is defined as 'received from Ably over the realtime transport') are processed and emitted where applicable. `PRESENCE` and `SYNC` messages are passed to the `RealtimePresence` object ensuring it maintains a map of current members on a channel in realtime. `OBJECT` and `OBJECT_SYNC` messages are passed to the `RealtimeObjects` object ensuring it maintains an up-to-date representation of objects on a channel in realtime
693693
- `(RTL2)` The `RealtimeChannel` implements `EventEmitter` and emits `ChannelEvent` events, where a `ChannelEvent` is either a `ChannelState` or `UPDATE`, and a `ChannelState` is either `INITIALIZED`, `ATTACHING`, `ATTACHED`, `DETACHING`, `DETACHED`, `SUSPENDED` and `FAILED`
694694
- `(RTL2a)` It emits a `ChannelState` `ChannelEvent` for every channel state change
695695
- `(RTL2g)` It emits an `UPDATE` `ChannelEvent` for changes to channel conditions for which the `ChannelState` (e.g. `ATTACHED`) does not change, unless explicitly prevented by a more specific condition (see [RTL12](#RTL12)). (The library must never emit a `ChannelState` `ChannelEvent` for a state equal to the previous state)
@@ -788,7 +788,7 @@ The threading and/or asynchronous model for each realtime library will vary by l
788788
- `(RTL9)` `RealtimeChannel#presence` attribute:
789789
- `(RTL9a)` Returns the `RealtimePresence` object for this channel
790790
- `(RTL27)` `RealtimeChannel#objects` attribute:
791-
- `(RTL27a)` Returns the `RealtimeObjects` object for this channel [RTO1](#RTO1)
791+
- `(RTL27a)` Returns the `RealtimeObjects` object for this channel [RTO1](../objects-features#RTO1)
792792
- `(RTL27b)` It is a programmer error to access this property without first providing the `Objects` plugin ([PC5](#PC5)) in the client options. This programmer error should be handled in an idiomatic fashion; if this means accessing the property should throw an error, then the error should be an `ErrorInfo` with `statusCode` 400 and `code` 40019.
793793
- `(RTL10)` `RealtimeChannel#history` function:
794794
- `(RTL10a)` Supports all the same params as `RestChannel#history`
@@ -947,7 +947,7 @@ The threading and/or asynchronous model for each realtime library will vary by l
947947

948948
### RealtimeObjects {#realtime-objects}
949949

950-
Reserved for `RealtimeObjects` feature specification. Reserved spec points: `RTO`, `RTLO`, `RTLC`, `RTLM`
950+
Reserved for `RealtimeObjects` feature specification, see [objects-features](../objects-features). Reserved spec points: `RTO`, `RTLO`, `RTLC`, `RTLM`
951951

952952
### RealtimeAnnotations {#realtime-annotations}
953953

0 commit comments

Comments
 (0)