Crate p2panda_sync

Crate p2panda_sync 

Source
Expand description

Data- and transport-agnostic interface to implement custom sync protocols, compatible with p2panda-net or other peer-to-peer networking solutions.

Sync or “synchronisation” protocols (also known as “replication protocols”) are used to efficiently exchange data between peers.

Unlike gossip protocols, sync protocols are better solutions to “catch up on past state”. Peers can negotiate scope and access in a sync protocol for any type of data the remote peer currently knows about.

In addition to the generic definition of the SyncProtocol trait, p2panda-sync includes optional implementations for efficient sync of append-only log-based data types. These optional implementations may be activated via feature flags. Finally, p2panda-sync provides helpers to encode wire messages in CBOR.

Modules§

cbor
Utility methods to encode or decode wire protocol messages in CBOR format.
log_sync
Efficient bidirectional sync protocol for append-only log data types.
test_protocols
Sync protocol implementations for testing purposes.

Enums§

FromSync
Messages which can be sent to the higher application layers (for further validation or persistance) and the underlying transport layer (for managing the sync session).
SyncError
Errors which can occur during sync sessions.

Traits§

SyncProtocol
Traits to implement a custom sync protocol.
TopicQuery
Identify the particular dataset a peer is interested in syncing.