This is a example implementation of the raft consensus protocol for educations proposes only:
- Compile the project:
javac *.java- Configure the number of instances (list of local ports):
config.conf - Configure general settings:
config.properties - Run the instances:
java FollowerMain <follower number, e.g., 0, 1, ...>- Run the client application:
java Client [serverNumber] <put|get|del|cas|list> <numberOfRequests>- Run Raft cluster:
docker compose up --build- Manual Test:
docker run --network host -it --rm --entrypoint bash $(docker build -q .)
java Client 0 list 1
java Client 0 put 1
java Client 0 get 1