16. A change is a batch of edits, not a state
Inside an envelope is a batch of per-record, per-path edits on one dataset of one object; devices exchange edits, never rows; a new record's id comes from the envelope's hash.

16. A change is a batch of edits, not a state

Inside an envelope is a batch of per-record, per-path edits on one dataset of one object; devices exchange edits, never rows; a new record's id comes from the envelope's hash.

It bridges the protocol to the data model.

Open an envelope. What is inside is not a document. It is a batch of edits.

Set this field to this value. Unset that one. Add to this set. Increment this counter. Delete this record.

An object keeps its records in named datasets. A chat has its messages. A page has its blocks. Each edit names a record and a path inside it. One envelope touches one dataset of one object. It may touch many records.

Devices exchange edits. Nobody sends rows. Rows are what you get by applying the edits.

A new record needs no id from you. It gets one from the envelope's hash. Unique everywhere, with no coordination.

Apply every envelope, and you have a table of rows.

Check yourself. What travels between devices?

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime

Attributes
name
16. A change is a batch of edits, not a state
summary
Inside an envelope is a batch of per-record, per-path edits on one dataset of one object; devices exchange edits, never rows; a new record's id comes from the envelope's hash.