Module identity
Expand description
What replication moves, and how far it has got.
§The identity is the contract’s
SequencePosition is meaningful only inside one store, so a peer cannot
use it to recognise an event it has already ingested. Something stable and
globally unique is needed, and the specification’s answer (VT-5) is the pair
(StoreId, SequencePosition) — the store that minted the event, plus where
it landed in that store’s log.
That pair is happenstance_core::EventId, beside
StoreId and RecordedAt, and this module uses them as they are. It
used to carry placeholders of all three, sketched here at phase 2 so that the
port could compile before the contract had an identity, and marked for
deletion once it did. They outlived phase 4 by thirteen phases, and the cost
of that was not cosmetic: the placeholder RecordedAt was a u64, and the
contract’s is an i64, so a pre-1970 recording could not travel through
ReplicatedEvent unchanged — which is VT-9’s restated falsifier, fired by
construction. Phase 17 deleted them, because an ingest path that writes a
foreign identity into a real store has to speak the store’s own types.
What remains here is genuinely replication’s own: ReplicatedEvent, the
unit a peer moves, and Watermark, the version vector it resumes against.
The contract defines nothing of either kind, and both are re-exported from
the crate root.
Structs§
- Replicated
Event - An event on the wire: an
Eventplus the two facts its origin store assigned to it. - Watermark
- A per-store high-water mark: the last position this side has seen from each origin store it knows about.