Replication and backup
EDGE keeps a copy of every space that replicates through it. Devices sync with that copy whenever they are online, so two devices that never meet still converge.
The data lives on the devices, and EDGE holds one more copy that is always online.
Two replicators per space. A replicator is a Durable Object, a small server with its own storage, that keeps EDGE’s copy of one kind of data in sync with the devices. A space holds two kinds of data, so it has two:
| Data | Replicator | Protocol |
|---|---|---|
| Automerge documents | SubductionAutomergeReplicator |
Subduction, which syncs a space’s documents by comparing compact summaries of their history |
| Feeds | FeedReplicator |
Appends each feed’s new blocks |
A copy, not the authority. EDGE merges changes the same way every device does. A conflict between two devices resolves the same on EDGE as on each device, so EDGE never has to decide who wins.
The diagram follows one change from a laptop to a phone. Each box holds a copy of the space, and each arrow is a route the change takes. The solid arrows pass through EDGE’s copy. The dashed arrow is the direct link that MESH opens while both devices are online.
Turning it off
Section titled “Turning it off”Space.setEdgeReplication turns replication through EDGE on or off for one space. With it off:
- The space syncs only between devices online at the same time.
- EDGE stops receiving the space’s changes, so they are not backed up there and EDGE cannot index or run compute on them.
- A device that recovers the identity gets the space only from another device.
Archives, backups and deletion
Section titled “Archives, backups and deletion”Space.exportSpacereturns a space as an archive, andSpace.importSpacecreates a new space from one. Both work with or without EDGE.- EDGE’s copy is the backup for a space whose devices are all lost. A recovered identity syncs its spaces from it.
- When you delete a space, EDGE’s copy is queued for deletion too.
Behavior
Section titled “Behavior”- A change that reaches EDGE reaches every member’s device that later connects.
- The same change may arrive both from EDGE and over a direct link. It is applied once.
Limits
Section titled “Limits”- EDGE’s copy trails the devices by however long they take to send it. A change made offline is on EDGE only after the device reconnects.
- With only
pullaccess, the lowest access level, EDGE relays a space without reading it. Indexing and compute need more. See HALO’s Spaces and membership.