Skip to content
This repository was archived by the owner on May 19, 2024. It is now read-only.
/ kvservice Public archive

Variations on a simple key-value service, demonstrating failure recovery strategies

License

Notifications You must be signed in to change notification settings

msayson/kvservice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kvservice

A simple key-value service, with variations demonstrating different failure recovery strategies.

Client command line interface:

CommandDescription
get(id)returns value for id
set(id,val)sets value for id
testset(id,testVal,newVal)if id has testVal as its value, set to newVal
exitshuts down client

Variation 1 - single server

A simple client/server system in which clients can send requests to read/write key-values.

alt-text

Variation 2 - dynamic chain of servers (in progress)

A simple key-value service with data replication across a chain of N back-end servers.

  • Client interacts with the front-end server exactly as in Variation 1
  • A chain of N back-end servers store identical copies of all key-values
  • Key-value write operations are performed on each back-end server, passed from one to the next until all are updated
  • Key-value read operations are performed on the first back-end server in the chain
  • Back-end nodes may join or leave the network at any time

Failure recovery strategy:

  • Each server is aware of the next two nodes in the chain
  • If one back-end server fails, its predecessor links to the next known node to reconnect the chain

Design properties:

  • Robust to one back-end failing at a time, up to a maximum of N-1 back-end failures
  • Not robust to the front-end server failing
  • If two adjacent back-end nodes fail simultaneously, then subsequent back-end nodes will be stranded. However, if at least one of the first two back-end nodes survives the failure, we can continue operating without a break in service.

Disclaimer

This project was developed for educational purposes, and comes without warrantee or support. However, feel free to copy and modify its code and ideas as you wish.

About

Variations on a simple key-value service, demonstrating failure recovery strategies

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages