/Mencius

Multi-leader state machine replication protocol.

Primary LanguageC++GNU General Public License v3.0GPL-3.0

Mencius

Implementation of Mencius, a Paxos-like state machine replication protocol, for CSE 552 19sp. Both UDP and TCP variants are included.

Run

  • Run make to build the project.
  • The only dependency is Boost 1.68.

Four executables will be created in bin: client (TCP client), server (TCP server), client_udp (UDP client), server_udp (UDP server).

TCP

To run the TCP server, run the executable server and pass a port to listen on.

./bin/server 11111

To run the TCP client, run the executable client with the following arguments:

./bin/client <number-of-servers> <server-drop-rate> <random-failure-bit> <operations>

where <operations> is a series of comma separated operations. For example, you could pass PUT foo bar,GET foo.

UDP

Follow the instructions for TCP but replace the client executable with client_udp and the server executable with server_udp.

A helper script scripts/launch.py will simultaneously launch multiple server instances.