What both modes share
The server–client and the relay mode store and merge in different places, but most of the package is the same for both. The pages of this group apply whatever mode you picked.
| Page | What it covers | Notes per mode |
|---|---|---|
| Server frameworks | serve the sync from Dart Frog or Serverpod: routes, authentication, lifecycle | one section per mode: server–client, relay |
| Plugins and awareness | extend the client and the server; presence and remote cursors | a relay rebroadcasts awareness and stores none of it |
| Connection and errors | connection status, reconnection, liveness, the data that did not make it in | the relay client retries forever, with backoff |
| Versions and compatibility | the handshake, what it refuses, the wire format | a relay checks the protocol version only |
| Compression | plug a compressor into the clients and the servers | a relay in another language must decode it too |
| Custom transport | the protocol on a transport you do not own, or one the host binds | DocumentSessionHost or RelaySessionHost |
Also shared:
- The client side of an app.
CRDTReplicaopens the document, its storage and its client in the right order, with aWebSocketClientor aWebSocketRelayClient. - The wire format and the plugin system. Each mode has its own range of message type codes (see Wire format).
- The offline rule. Open the document from its storage before you connect, and the client sends whatever the server is missing.