بدون توضیح

Jing Yang 7b7857fd9c Refactor snapshot holder and merge methods. 4 سال پیش
kvraft 7b7857fd9c Refactor snapshot holder and merge methods. 4 سال پیش
linearizability 0c4beaf0f0 Add more debugging messages to linearizability. 4 سال پیش
src 87cec9b0e0 Remove a special case that will never happen. 4 سال پیش
tests bcd32724b4 Rename some tests so they are not prefixes of other tests. 4 سال پیش
.gitignore c5649d974f Ignore project files. 5 سال پیش
Cargo.toml a5806e1874 Implment linearizability module. 4 سال پیش
MIT-LICENSE f374ec7dce Add license file, update toml. 5 سال پیش
README.md 12b2c96aea Update readme. 5 سال پیش
rustfmt.toml 3c80c4ae2b Implement the RPC layer. 5 سال پیش

README.md

Ruaft: Raft implemented in Rust

Ruaft is a Rust version of the Raft consensus protocol. The name is clearly made up.

At the moment it is a gigantic class lives in a single file. It exposes 4 APIs, to create a Raft instance (new()), start a new contract (start()), get the current status (get_status()) and shut it down (kill()). When a consensus is reached, it notifies the clients via an apply_command callback. It saves its internal state to local disk via a persister, which is supplied at creation.

There are also two half-APIs: process_append_entries() and process_request_vote(), serving requests from other Raft instances of the same setup.

Testing

The implementation is thoroughly tested. I copied (and translated) the tests from an obvious source. To avoid being indexed by a search engine, I will not name the source. The testing framework from the same source is also translated from the original Go version. The code can be found at labrpc repo.

Running

It is close to impossible to run ruaft outside of the testing setup under tests. One would have to supply an RPC environment plus bridges, a persister and an apply_command callback.

Things would improve after I implement an RPC interface and improve the persister trait.

Next steps

  • Split into multiple files
  • Add public documentation
  • Add a proper RPC interface to all public methods
  • Benchmarks
  • Allow storing of arbitrary information, instead of a i32.