Skip to content

nuvic/kvs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kvs

This is a simple key/value store based off of pingcap's project

Core concepts implemented

Persistent storage with Log-Structured File I/O

Command Serialization using Serde

In-memory key-value index with disk backed values

  • Maintained an in-memory index that maps keys to log pointers so that value retrieval is efficient and memory usage is minimized

Log Compaction

  • Once a threshold is reached, log compaction will remove stale records and reclaim disk space

Stateful and Stateless Modes

  • Works both as a stateful type for library use and stateless CLI context

Installation

cargo build -- release

The compiled binary will be at target/release/kvs

Usage

Set a value:

./target/release/kvs set newkey newvalue

Get a value:

./target/release/kvs get newkey

Remove a value:

./target/release/kvs remove newkey

Tests

cargo test

About

Simple key/value store

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages