7. Stores join like sets, and forget
A store is a set of entries under the two rules; joining stores is order-independent; a store holds the present state and no history.

7. Stores join like sets, and forget

A store is a set of entries under the two rules; joining stores is order-independent; a store holds the present state and no history.

It explains why sync never needs a server to decide, and why there is no log to replay.

A store is a set of entries from one namespace. Two rules hold inside it: newer wins, and prefixes prune.

To sync, two stores are joined. Pour both sets together. Apply the two rules.

Join them in either order, any number of times. You get the same store.

Mathematicians call that a join semilattice. Programmers call it a state based CRDT.

What it does not keep is history. A store is what is true now. Not how it got there.

Check yourself. Join store A with B, then with B again. What changes the second time?

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

Unsubscribe anytime