Skip to content

logan-bobo/spark-kv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spark-kv

A simple persistent key value store, with an in memory index, implemented in Rust.

Goals of this project

The goal of this project is to improve my system programing knowledge through building a networked key-value database, with multithreading and asynchronous I/O1.

high level sequence

sequenceDiagram
  participant cli as cli
  participant server as server
  participant disk as disk

  cli ->> server: startup kv server
  server ->> disk: replay WAL to build in memory index
  cli ->> server: set key hello with value world
  server ->> disk: persists key and value to WAL and updates index
  server ->> cli: exit 0
  cli ->> server: get key hello
  server ->> server: Look up file pointer in memory
  server ->> disk: read line from WAL containing value
  server ->> cli: return value for given key, exit 0
  cli ->> server: rm key hello
  server ->> disk: write rm command to disk
  server ->> server: remove key from in memory index
  server ->> cli: exit 0
Loading

Footnotes

  1. Most of the learnings for this were derived from pingcap/talent-plan it's a seriously good resource so check it out!

About

A key-value store implementation in Rust, inspired by Bitcask

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages