QuiltMessage

@Serializable
sealed class QuiltMessage<S>

Wire messages exchanged between Quilter instances.

Delta carries a lattice fragment tagged with the sender's monotonic sequence number. Ack tells the sender that the acker has absorbed all deltas through seq, enabling GC of the delta buffer. FullState ships the entire current state and is sent once on first contact with a new peer.

Type Parameters

Inheritors

Types

Link copied to clipboard
@Serializable
@SerialName(value = "ack")
class Ack<S>(val acker: ReplicaId, val sender: ReplicaId, val seq: Long) : QuiltMessage<S>

Acknowledgement: acker has absorbed all deltas from sender through seq, so sender may GC every pending delta with seq ≤ seq.

Link copied to clipboard
@Serializable
@SerialName(value = "delivered")
class Delivered<S>(val sender: ReplicaId, val vector: VersionVector) : QuiltMessage<S>

A delivered-version-vector gossip from sendersender's whole-room contiguous delivered VersionVector (`author → highest gap-free seq it has applied), the per-replica row of the matrix clock that decides causal stability for RGA GC (ADR-003 addendum v3, #262).

Link copied to clipboard
@Serializable
@SerialName(value = "delta")
class Delta<S>(val sender: ReplicaId, val seq: Long, val delta: S) : QuiltMessage<S>

A lattice delta broadcast by sender, tagged with sender's monotonic per-seam sequence number.

Link copied to clipboard
@Serializable
@SerialName(value = "fullState")
class FullState<S>(val sender: ReplicaId, val state: S) : QuiltMessage<S>

The complete current state — sent once on first contact with a peer that has never been seen before. The recipient absorbs it with us.tractat.kuilt.crdt.Quilted.piece.

Link copied to clipboard
@Serializable
@SerialName(value = "resend")
class Resend<S>(val requester: ReplicaId, val sender: ReplicaId, val fromSeq: Long, val toSeq: Long) : QuiltMessage<S>

Gap retransmission request: requester has detected that it is missing deltas from sender in the range [fromSeq..toSeq] inclusive. sender should re-broadcast each buffered delta in that range.