Expand description
§spacedb-consistency — SpaceDB Layer 3 (consistency tiers)
Consistency is a per-field choice, declared in the schema, because in a partition-prone world one global setting is always wrong. Three tiers:
Tier::Convergent— CRDT, the default: always available, auto-merging.Tier::Causal— session read-your-writes / monotonic reads via aCausalSession, cheap and partition-tolerant, no consensus.Tier::Strong— linearizable, a quorum that fails safe under partition (M7-S2).
And the honesty contract: every op returns the Outcome it actually achieved
— Committed{tier} / Local / Stale{lag} / Unavailable{reason} — so an app
can never mistake a local-only write for a durable one or a lagging read for a
current one.
M7-S1 ships the tier annotations, the honesty contract, and the Causal+ tier; the Strong quorum tier is S2. Open-core (MIT).
Structs§
- Causal
Session - A causal-consistency session over one or more replicas of a document.
- Consistency
Schema - Which tier each field is served at; everything defaults to
Tier::Convergent. - Quorum
Group - A quorum of members holding versioned registers for strong-tier keys.
Enums§
- Outcome
- The consistency a read or write actually achieved.
- Reject
Reason - Why a strong op was refused by the invariant (the quorum was reached).
- Strong
Result - The result of a strong op.
Committed/Rejectedmean the quorum was reached and gave a definitive, linearizable answer;Unavailablemeans it was not reached and nothing was committed. - Tier
- The consistency a field is served at.
- Unavailable
Reason - Why a (strong) op could not be served.