AI agents: fetch the documentation index at llms.txt. Markdown versions are available by appending .md to any page URL, including this page's markdown.
Sync protocol
How Strata Sync's server-sequenced sync protocol works, including the monotonic sync log, delta streaming, and bootstrap process.
The server assigns a monotonically increasing syncId to every committed change, creating a single global ordering that all clients follow.
Design lineage
Based on the server-sequenced sync architecture Linear described but never open-sourced. Extended with Yjs CRDT integration, undo/redo, and pluggable adapters.
The sync log
A monotonic append-only log of sync actions. Each action represents a single change to a single model row.
| Field | Description |
|---|---|
id | The syncId: a monotonically increasing integer assigned by the server. |
modelName | Which model changed (for example, "Task" or "User"). |
modelId | The primary key of the affected row. |
action | The change type: "I" (insert), "U" (update), "D" (delete), "A" (archive), "V" (unarchive). |
data | The changed fields (for inserts and updates) or null (for deletes). |
groups | Optional sync group memberships for access control. |
A delta packet bundles sync actions with a lastSyncId watermark:
interface DeltaPacket {
lastSyncId: number