JRaftKV is a KV-storage based on Raft Consensus Algorithm(CP) in Java.
Project implementation design and details refer to the paper.
- Leader election
- Log replication
- Membership changes

- 
StateMachine: Log persistence module. 
- 
LogModule: Focus on maintaining log index. 
- 
Consensus: Including RequestVotes&AppendEntries.
- 
A NodeImplcontains StateMachine, LogModule, Consensus modules. Default indentity is 'Follower'. Nodes communicate with each other through RPC module.
- 
Start JRaftKV clusters with five nodes( JRaftNodeApplication). VM options:-DserverPort=8775 -DserverPort=8776 -DserverPort=8777 -DserverPort=8778 -DserverPort=8779.
- 
Watch terminal operation log to check the Leader election process. 
- 
Candidate send RequestVotesand become Leader if it receives more than half of votes.
- 
Leader send AppendEntriesempty package for heartbeat.
- Start JRaftKV clusters with five nodes(JRaftNodeApplication). VM options:-DserverPort=8775 -DserverPort=8776 -DserverPort=8777 -DserverPort=8778 -DserverPort=8779.
- Start Client and send request to leader or redirect to leader to handle it.
- Leader will replicate log to all of Followers eventually.