recife spec of the verdict-handoff CAS/idempotence protocol as a safety + liveness model (a plan->commit handoff).
REQUIRES recife on the classpath — load it LAZILY (never require this ns from
hive-recife.core). safety-spec yields a hive-recife.schema/ModelSpec ready
for hive-recife.core/check!.
Protocol: a verdict is planned over a content-hash snapshot; files may DRIFT;
the verdict may EXPIRE; COMMIT is a compare-and-swap that applies the patch
ONLY when the verdict is still planned and the plan-hash still matches the
file-hash. The safety invariant never-apply-stale asserts a stale verdict is
never applied; commit freezes the observed hash into ::applied-hash so the CAS
precondition is inductively checkable.
recife spec of the verdict-handoff CAS/idempotence protocol as a safety + liveness model (a plan->commit handoff). REQUIRES recife on the classpath — load it LAZILY (never require this ns from hive-recife.core). `safety-spec` yields a hive-recife.schema/ModelSpec ready for hive-recife.core/check!. Protocol: a verdict is planned over a content-hash snapshot; files may DRIFT; the verdict may EXPIRE; COMMIT is a compare-and-swap that applies the patch ONLY when the verdict is still planned and the plan-hash still matches the file-hash. The safety invariant `never-apply-stale` asserts a stale verdict is never applied; commit freezes the observed hash into ::applied-hash so the CAS precondition is inductively checkable.
(_COLON_hive_recife___examples___verdict_handoff_SLASH_eventually_committed100
main-var
extra-args)(_COLON_hive_recife___examples___verdict_handoff_SLASH_never_apply_stale2
main-var)(_COLON_hive_recife___examples___verdict_handoff_SLASH_step2 self
main-var
extra-args)Bounded global state (namespaced = global per recife convention). Hashes are kept in {0 1} so the state space is finite.
Bounded global state (namespaced = global per recife convention). Hashes are
kept in {0 1} so the state space is finite.(safety-spec)A hive-recife.schema/ModelSpec for the safety model (process + the never-apply-stale invariant). Expected result: :ok (the CAS holds).
A hive-recife.schema/ModelSpec for the safety model (process + the never-apply-stale invariant). Expected result: :ok (the CAS holds).
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |