Atomic Attributes in Local-First Sync

When we set out to build device-sync in Muse, we had a very strict requirement at the outset: it should be local-first.

Most apps work by storing all of your data on the server, and send only little bits of it to each device as you use it. Then, if a document is modified on two devices at once causing a conflict, the server is the mediator to choose the winner.

With local-first sync, the world gets much more complicated. Every device you use contains a full copy of your data. If you edit the same document from multiple devices, there is no server to mediate which device wins. Instead, both devices get a full copy of each other’s changes, and they need to independently resolve to the same state.

Continue reading "Atomic Attributes in Local-First Sync"