PaxosKV.Proposer (paxos_kv v0.3.0)
Summary
Functions
Returns a specification to start this module under a supervisor.
Asks the local Proposer to convince the cluster about a value.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Asks the local Proposer to convince the cluster about a value.
When it detects that there are other Proposer(s) trying to do the same, and the liveness property of Paxos is in danger, it falls back to a primary proposer (running on a node that is determined by the key) instead of the local service.
Return values:
{:ok, value}: thevalueis the chosen (consensus) value for thekey{:error, :no_quorum}: there are't enough nodes participating in the cluster{:error, :invalid_value}: thepidornodeprovided inoptsis not alive