Skip to content

A fault tolerant architecture to achieve consensus of updates amongst replicated state machine KV-store servers using Paxos.

Notifications You must be signed in to change notification settings

riccardoprosdocimi/paxos-key-value-stores

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Multiple key-value stores that reach consensus using Paxos

A fault-tolerant architecture to achieve consensus of updates amongst replicated state machine KV-store nodes using Paxos.

It's set up to allow multiple concurrent clients to communicate with any of the servers and perform three basic operations:

  • PUT(key, value)
  • GET(key)
  • DELETE(key)

Usage (locally):

  1. Open up two terminal windows and navigate to /Project4/src
  2. In one window, type javac node/*.java utils/*.java main/PaxosServerCreator.java (hit ), followed by java main.PaxosServerCreator (hit )
  3. The nodes are now running
  4. In the other window, type javac client/*.java utils/*.java main/ClientMain.java (hit ), followed by java main.ClientMain <hostname> <port> (hit )
  5. The client is now running
  6. The predefined protocol is:
    • PUT:key:value(hit )
    • GET:key(hit )
    • DELETE:key(hit )
  7. To pre-populate the nodes, type pp (hit )
  8. To shut down the application, type stop (hit ) or shutdown (hit )

SIDE NOTES
  • Each node has a 10% chance of randomly failing in the prepare and accept phases.
  • Other failure cases are the following:
    • A client tries to delete a nonexistent key.
    • A client tries to add an already existent key.
  • At boot up, the user has to specify which node to connect to.

About

A fault tolerant architecture to achieve consensus of updates amongst replicated state machine KV-store servers using Paxos.

Topics

Resources

Stars

Watchers

Forks

Languages