Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simpleDB

A persistent key-value store implementation from the paper "A simple and efficient implementation of a small database".

Data is stored in a builtin map and a write-ahead-log is used to ensure atomic updates. Restarts/crashes will use any available logs and checkpoints stored in ./data to reload state during startup. The structure of this directory closely matches the implementation guidelines in the end of Section 3 of the paper.

The client/server communicatation uses gob over HTTP.

Usage

Start the DB server with:

$ make server

Commands can be issued using the client CLI:

$ make client

-- SimpleDB CLI --

Available commands:
     help
     exit or CTRL+C
     get <key>
     set <key> <value>
     delete <key>
simpleDB >

Automated Run

You can also run an automated simulation which forks and runs a separate server process and issues random client load. A very simple form of process supervision of the server allows for random crashing. The intention of this is to test fault-tolerance and also ensure race conditions are not possible with many concurrent operations. This runs indefinitely and needs to be killed to exit. Start with:

make sim

About

Simple persistent key-value database from scratch

Resources

Stars

1 star

Watchers

1 watching

Forks

Used by

Contributors

Languages