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§
- From
Sync - 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).
- Sync
Error - Errors which can occur during sync sessions.
Traits§
- Sync
Protocol - Traits to implement a custom sync protocol.
- Topic
Query - Identify the particular dataset a peer is interested in syncing.