For AI agents: the documentation index is 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
Strata Sync is an open-source implementation of the sync engine Linear described but never released. The protocol below follows that architecture: a global syncId, bootstrap in three modes, partial indexes, a durable transaction queue, delta packets of sync actions, and sync groups as the permission boundary.
Linear's sync engine, open-sourced maps each part of Linear's published design onto the module that implements it, and lists what Strata Sync adds on top (Yjs collaboration, undo/redo, swappable 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 |
|---|---|
syncId | A monotonically increasing integer assigned by the server, encoded as a string on the wire. |
modelName | Which model changed (for example, "Task" or "User"). |
modelId | The primary key of the affected row. |
action | The change type. See the action letters below. |
data | The changed fields (for inserts and updates) or null (for deletes). |
groupId | The sync group the row belongs to, when the model is group-scoped. Used for access control. |
Action letters
Five letters carry a row and are applied to it:
| Letter | Meaning |
|---|---|
"I" | Insert |
"U" | Update |
"D" | Delete |
"A" | Archive |
"V" | Unarchive |
Three more carry no row. A client routes them rather than applying them, and a client that rejects an unknown letter will fail the whole delta packet the first time one arrives — so an implementation must accept all eight:
Published with Edda