Skip to content

A distributed key value store in under 1000 lines. Used in production at comma.ai

Notifications You must be signed in to change notification settings

antferdom/minikeyvalue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API

  • GET /key
    • Supports range requests.
    • 302 redirect to volume server.
  • {PUT, DELETE} /key
    • Blocks. 200 = written, anythin else = nothing happened.

Start Master Server (default port 3000)

$ ./master /tmp/cachedb/

Sart Volume Server (default port 3001)

# Should create a temporal directoy at /tmp/volume1
$ ./volume
.. ..
hello volume 14845
FileCache in /tmp/volume1/

$ ./volume /tmp/volume1/ localhost:3000
PORT=3002 ./volume -p 3002 /tmp/volume2/ localhost:3000

Usage

# PUT "bigswag" in key "wehave"
$ curl -X PUT -d bigswag localhost:3000/wehave

# GET key "wehave" (should be "bigswag")
$ curl -X GET localhost:3000/wehave

# Delete key "wehave"
$ curl -X DELETE localhost:3000/wehave

Architecture

How volumes servers are discovered

About

A distributed key value store in under 1000 lines. Used in production at comma.ai

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published