ViewstampedReplication. StateMachine behaviour
(viewstamped_replication v0.1.0)
Copy Markdown
View Source
Contract for a deterministic service replicated by VSR.
The runtime invokes apply/3 only after an operation is committed and in
operation-number order. Implementations must return the same result and state
for the same metadata, operation, and prior state. They must not rely on
clocks, randomness, process identity, or external side effects.
Snapshots are state-machine-owned terms. Implementations should keep their encoding stable or version snapshots explicitly.
Summary
Types
Callbacks
@callback apply(ViewstampedReplication.ApplyMetadata.t(), operation(), state()) :: {result(), state()}