Sync / foldkit-durable
The model
sequence: 1 2 3 4
log: op A op B op C op D
^
cursor 3
snapshot at cursor 3 = reduce(reduce(reduce(empty, A), B), C)| Name | Meaning |
|---|---|
| Document | One independently ordered stream of operations, a DocumentId. |
| Operation | One durable change a client submitted. The application defines its shape. |
opId | The operation's stable identity. A retry reuses it. |
| Sequence | The gap-free position the journal assigns when an operation commits. |
| Cursor | A position a reader has reached; "what came after N?" |
| Snapshot | The reduced state of the committed prefix its cursor names. |
| Epoch | The identity of a document's history; new after a reset. |
The log and the snapshot answer different questions. A far-behind or brand-new replica starts from the snapshot; an up-to-date one asks for the log after its cursor.