Crate sdcons[−][src]
Expand description
sdcons
sdcons
is an implementation of geo-replicated distributed consensus
algorithm. It is based on the paper:
SDPaxos: Building Efficient Semi-Decentralized Geo-replicated State Machines (ACM Symposium on Cloud Computing 2018, SoCC ’18)
Like original SDPaxos, sdcons
provides one-round-trip latency reading and
writing capabilities under realistic configurations (deployed with three or
five nodes).
In addition, I ported some optimizations mentioned in the raft algorithm to SDPaxos. Including:
- log term
- leader election
- leadership transfering
- membership configuration (joint consensus)
- batched & pipelined log replication
- lease reading
These optimizations make SDPaxos easier to implement and verify.
However, the current sdcons
has not yet implemented the Straggler
detection mentioned in the SDPaxos paper.
Unlike SDPaxos, sdcons
uses the term channel
to represent the paxos
commiting progress. The Ordering instance is represented as Index, the
Command instance is represented as Entry. Because the term index is used to
represent Ordering instance, I choose term id to represent the index in
raft.
Re-exports
pub use crate::storage::LogMetaView;
Modules
The crate constant
defines a set constant used by sdcons.
The crate storage
defines a set of structs and traits which are used to
store/access log sequences.
The crate types
defines a set types used by sdcons.
Structs
A helper struct contains all infos about how to create a message.
A struct records info generated by RawNode::advance()
and used in
RawNode::post_advance()
.
A structure that users can use directly, and any sdcons-related operations need to be forwarded through this structure.
The options for create a sdcons node.
WriteTask records all info to persistent.
Enums
Traits
A template-method trait descript the actions used in RawNode::advance()
.
A trait is used by RawNode
to load logs from persistent device.
A trait describes a set observer function invoked when a channel role is changed.