Module extensions

Module extensions 

Source
Available on crate feature extensions only.
Expand description

NOMAD Protocol - Extensions

Implements protocol extensions for enhanced functionality beyond the core sync.

§Core Extensions

IDModuleDescription
0x0001compressionzstd payload compression
0x0002priorityUpdate priority levels (critical → background)
0x0003batchingCombine multiple updates into single frame
0x0004rate_hintsServer hints for acceptable update frequency
0x0005selective_syncSubscribe to specific state regions
0x0006checkpointFull state snapshots for recovery/initial sync
0x0007metadataTimestamps, user IDs, causality tracking

§Extension Negotiation

Extensions are negotiated during handshake using TLV (Type-Length-Value) format. See [negotiation] module for details.

§Reserved Ranges

  • 0x0001-0x00FF: Core protocol extensions
  • 0x0100-0x0FFF: Application-specific extensions
  • 0xF000-0xFFFF: Experimental/private extensions

Modules§

checkpoint_config_flags
Checkpoint negotiation flags
checkpoint_frame_flags
Checkpoint frame flags
ext_type
Extension type identifiers
metadata_config_flags
Metadata configuration flags
metadata_presence_flags
Metadata presence flags (in wire format)
rate_hint_flags
Rate hint flags
selective_sync_flags
Selective sync flags

Structs§

Batch
A batch of updates ready for transmission
BatchingConfig
Batching extension configuration
Checkpoint
A complete checkpoint (header + payload)
CheckpointConfig
Checkpoint configuration
CheckpointHeader
A checkpoint frame header
CompressionConfig
Compression configuration
CompressionStats
Statistics for compression operations
Compressor
Compressor for sync payloads
Extension
Extension TLV (Type-Length-Value) format
ExtensionSet
Extension set for negotiation
Metadata
Metadata attached to a sync message
MetadataConfig
Metadata configuration
PriorityConfig
Priority extension configuration
PrioritySupportBitmap
Bitmap of supported priority levels
RateHint
A dynamic rate hint sent during the session
RateHintsConfig
Rate hints configuration for negotiation
SelectiveSyncConfig
Selective sync configuration
SubscriptionState
Tracks active subscriptions for a client
VectorClock
A vector clock for causality tracking

Enums§

CheckpointRequest
Request for a checkpoint
CompressResult
Result of compression attempt
CompressionError
Errors from compression operations.
NegotiationError
Errors from extension negotiation.
Priority
Priority levels for state updates
RateHintType
Type of rate hint
SubscriptionChange
A subscription change request
SubscriptionOp
Subscription operation type

Constants§

CHECKPOINT_HEADER_SIZE
Header for a checkpoint frame
DEFAULT_COMPRESSION_LEVEL
Default zstd compression level (1-22, higher = smaller but slower)
DEFAULT_MAX_BATCH_BYTES
Default maximum batch payload size (16 KB)
DEFAULT_MAX_BATCH_SIZE
Default maximum updates per batch
DEFAULT_MAX_DELAY_MS
Default maximum delay before flushing batch (50ms)
EXTENSION_HEADER_SIZE
Header size for extension TLV
MIN_COMPRESS_SIZE
Minimum payload size to attempt compression

Functions§

negotiate
Negotiate extensions between client and server offers