Skip to content

daimaou92/ruft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What?

Learning rust - by implementing the raft protocol.

Goes without saying but - please don't use this anywhere.

Run

cargo build
./target/debug/ruft

This will start a server with the following default cluster configuration:

  1. 127.0.0.1:20000
  2. 127.0.0.1:20001
  3. 127.0.0.1:20002

This server itself will start on port :20000

Open up two new shells and run:

./target/debug/ruft -p 20001 in one and

./target/debug/ruft -p 20002 in the other

Watch the logs go and use Ctrl+C liberally.

What works?

The leadership and election bit. There's a leader lease in case only one member is active.

What doesn't work?

Anything else

Dependencies:

  1. tokio
  2. tarpc
  3. clap
  4. serde
  5. anyhow