Expand description
Shared order book synchronization, recovery, and conformance checks.
syncholds the per-book synchronization lifecycle and its contract.recoveryowns recovery episodes, the retry budget, and the retry ceiling that follows it.snapshotcoordinates subscription write confirmation with snapshot acceptance and deadlines.BookSequenceOutcomeandBookSyncSignaldescribe validation decisions and monitoring signals without carrying venue-specific sequence fields or channel types.conformance(test support) checks emitted book output against the book stream contract.
§Recovery Lifecycle
The adapter validates incoming book frames and marks gaps through BookSync,
which requests recovery while nothing owns the book. A request grants no ownership: the adapter
then claims an episode and runs it. The recovery runner requests replacement snapshots through
an adapter-supplied operation until the adapter accepts one or the episode is cancelled; a book
never ends in a terminal failure state. A confirmed write opens the snapshot gate; only an
accepted fresh snapshot completes recovery.
§Adapters
Adapters retain sequence rules, venue positions, buffers, socket routing, wire commands,
acknowledgement correlation, and error classification. They keep BookSync
under their existing lock or owning task.
A monitoring signal does not itself start recovery; the adapter decides how to respond.
Modules§
- conformance
- Output checks for the order book stream contract.
- recovery
- Recovery ownership and replacement attempts for one book.
- snapshot
- Subscription write gates and pending snapshot lifetimes.
- sync
- Synchronization lifecycle of one subscribed book.
Structs§
- Book
Sync Signal - A monitoring signal for one book.
Enums§
- Book
Sequence Outcome - Decision from an adapter’s book sequence validation.
- Book
Sync Signal Kind - Condition reported while monitoring book synchronization.
Constants§
- DEFAULT_
BOOK_ SNAPSHOT_ TIMEOUT_ SECS - Default wait for an initial, post-reconnect, or recovery order book snapshot, in seconds.