Skip to content

seonWKim/mini-lsm-kotlin

Repository files navigation

Mini LSM in Kotlin

⭐️⭐️ Note that this is not production ready yet ⭐️⭐

LSM database written in kotlin. Inspired by mini-lsm which is implemented in Rust.

Table of Contents

Modules

  • cli: Provides command-line interface commands to interact with the LSM database.
  • core: A production-ready implementation of the LSM database. Currently, it's a mirror of mini-lsm-mvcc module.
  • mini-lsm-starter: A Kotlin rewrite for week1 and week2 of MINI-LSM project.
  • mini-lsm-mvcc: A Kotlin rewrite of the week3 of MINI-LSM project.

Cli

Requirements

  • Use java 21

How to start

# build jar 
$ ./gradlew :cli:build

# run cli application 
$ java -jar cli/build/libs/cli.jar

Examples

# put key value  
$ put <key> <value>  

# get key  
$ get <key>

# delete key 
$ delete <key> 

# force freeze memtable  
$ freeze 

# force flush memtable, note that this command only flushes the earliest memtable only 
$ flush  

What is LSM?

Reference

LSM or LSM tree is a data structure that efficiently stores key-value pairs for retrieval in disk or flash based storage systems.Log structured merge trees optimize both read and write operations using a combination of in-memory and disk-based structures.

About

Production ready LSM database written in kotlin

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages