This is a poor mans implementation of leader-centric replication for the ITU Distributed Systems course. It assumes a perfect network where no packets are dropped and supports at most one crash. Leader selection is done by finding the node with the lowest port.
- run
protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative grpc/proto.protoin the root of the project
- Open a terminal and navigate to the node directory (e.g.
cd node) - Start the three nodes by running the appropriate command (
go run main.go) 3 times. This likely requires three terminals - Start a new terminal and navigate to the client directory (e.g.
cd client) - Start client by runng the appropriate command (
go run main.go <username>)
node:
Usage:
start start an auction (only works on the leader node)
crash crash this node
client:
Usage:
bid <amount> bid the given amount
result get the result of the auction