Raft is a distributed consensus algorithm widely used nowadays to build distributed applications like etcd. However, while it is even understandable than notorious Paxos algorithm it is still difficult to implement correct and efficient implementation.
This library is a Raft implementation based on Tonic, a gRPC library based on Tokio. By exploiting gRPC features like streaming, the inter-node log replication and snapshot copying is very efficient. Also, zero-copy ser/desr between replication stream and the log entries is another goal of this library in term of efficiency.
Simple and backward-compatible RaftApp trait.
Utilities for connection.
The request and response that RaftCore talks.
Utilities to interact with the cluster.
Proto file compiled.
The snapshot abstraction and some basic implementations.
The abstraction for the backing storage and some implementations.
Static configuration in initialization.
RaftCore is the heart of the Raft system. It does everything Raft should do like election, dynamic membership change, log replication, sending snapshot in stream and interaction with user-defined RaftApp.
Plan to make a new snapshot.
The abstraction for user-defined application runs on the RaftCore.