Sync / Replicated state
Choose the owner first
Replication is not for every value that crosses the network. Ask who owns the fact and how it recovers:
| State | Authority | Recovery | Use |
|---|---|---|---|
| A route, a selection, a transient error | the local Model | nothing to recover | plain Foldkit |
| Data the server owns and the client may refetch | the server | refetch | foldkit-remote |
| Edits the user authored that must survive offline and converge | the durable log | replay and reconciliation | foldkit-sync + foldkit-durable |
| Edits to server-owned rows too many to replicate, offline and converging | the durable log, with the table its read model | replay; a reread of the rows | Editing server data through a journal |
| A filter in the URL, a draft on this device | the local Model | restore | foldkit-mirror |
The Remote and Sync line is the one to memorize: a Remote cache is disposable and refetch is recovery; a Sync outbox is user data and losing it loses edits.
One server decides the order of a document. Peers that must each accept writes and merge without a server are a different design (a CRDT), and Sync is not one.