Module svs_sync

Module svs_sync 

Source
Expand description

SVS network protocol — wires SvsNode to Interest/Data exchange. SVS (State Vector Sync) network protocol.

Runs a background task that periodically multicasts Sync Interests containing the local state vector, merges received vectors, and emits SyncUpdates for detected gaps.

§Wire format (ndnSVS-compatible)

Sync Interest name: /<group-prefix>/svs

The state vector is carried in ApplicationParameters (TLV type 0x24) as a StateVector TLV (type 201). Each entry is a StateVectorEntry TLV (type 202) containing a full NDN Name (type 7) and a SeqNo NonNegativeInteger (type 204).

Optional MappingData (type 205) follows the StateVector in ApplicationParameters when the publisher supplied mapping metadata.

AppParameters    ::= StateVector [MappingData]
StateVector      ::= 0xC9 TLV-LENGTH StateVectorEntry*
StateVectorEntry ::= 0xCA TLV-LENGTH NodeID SeqNo
NodeID           ::= Name  (TLV type 0x07)
SeqNo            ::= 0xCC TLV-LENGTH NonNegativeInteger
MappingData      ::= 0xCD TLV-LENGTH MappingEntry*
MappingEntry     ::= 0xCE TLV-LENGTH NodeID SeqNo AppData
AppData          ::= bytes  (application-defined)

§Suppression

When a peer sends a sync Interest that fully covers the local state vector, the local periodic timer is reset to a fresh [interval±jitter] window. This prevents Interest storms in large groups.

Structs§

RetryPolicy
Exponential back-off policy for retrying gap-fetch Interests.
SvsConfig
Configuration for an SVS sync group.

Functions§

fetch_with_retry
Retry fetch with exponential back-off according to policy.
join_svs_group
Join an SVS sync group.