Raft Lite
Raft Lite is a very simple and understandable implementation of the Raft consensus algorithm. It is intended to be used as a learning tool for those who are interested in understanding how Raft works internally.
The algorithm is implemented in a event-driven way, which is different from the original paper. The idea is borrowed from my master supervisor Martin Kleppmann's course "Distributed Systems".
Usage
Add this to your Cargo.toml:
[]
= "0.1.0"
To use it in your project, you can initialize a Raft instance with a RaftConfig. The way you interact with the Raft instance is to send messages to it and receive messages from it. The message type is Vec<u8>. The Raft protocol will guarantee the message delivery is in total order. The following example shows how to use it:
use ;
use AsyncFilePersister;
use Raft;
async
License
The project is under MIT license.
Related Projects
TODO