The envelope of a change to a document, the same for every engine:
%{
"id" => "4f1c…", # unique, chosen by the author; a retry reuses it
"epoch" => "9a0b…", # the document's epoch the author saw
"base_revision" => 41, # the revision the author saw
"ops" => [...] # the engine's operations, opaque to Issho
}The authority gives each accepted transaction the next revision and its author, and keeps a receipt of its id: the same transaction sent again (after a lost reply, or from an offline queue) is answered with its revision and applied once. A different transaction with an id already used is refused.
Summary
Functions
Checks a transaction's envelope against the document's epoch and revision.
A digest of what a transaction does and who made it, to tell a retry from a different transaction that reuses an id.
A new random id, for epochs and transactions.
The most operations in one transaction.
Types
Functions
@spec check(term(), String.t(), non_neg_integer()) :: :ok | {:error, atom()}
Checks a transaction's envelope against the document's epoch and revision.
A digest of what a transaction does and who made it, to tell a retry from a different transaction that reuses an id.
@spec id() :: String.t()
A new random id, for epochs and transactions.
@spec max_ops() :: pos_integer()
The most operations in one transaction.