Skip to main content

Module protocol

Module protocol 

Source
Expand description

Prolly Tree sync protocol for non-git event replication.

Two replicas exchange Prolly Tree root hashes, identify divergent subtrees in O(log N), and transfer only the missing events.

The protocol is transport-agnostic: any type implementing SyncTransport can be used (TCP, HTTP, MCP, USB drive via file exchange, etc.).

Structs§

InMemoryError
Error type for in-memory transport (should never happen in tests).
InMemoryTransport
A pair of in-memory channels for testing sync without real I/O.
SyncInMemoryResult
Result of an in-memory sync between two replicas.
SyncReport
Summary of a completed sync operation.

Traits§

SyncTransport
Abstraction over the wire protocol.

Functions§

serve_sync
Respond to a sync request as the remote side.
sync
Synchronise local events with a remote replica.
sync_in_memory
Run a full sync between two event sets using in-memory transport.