Skip to content
/ kiwi Public

B+ tree based persistent key-value store. Course project for Functional Programming (CS653).

License

Notifications You must be signed in to change notification settings

shivansh/kiwi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Persistent key-value store

The aim of this project is to implement a persistent key-value store in Haskell and Go, and compare the two implementations based on metrics such as performance, memory usage and challenges encountered during the implementation.

Made as a course project for Functional Programming (CS653).

Directory structure

├── ref ...................... Reference implementations
│   ├── bplustree
│   │   └── .................. B+ Tree based persistent key-value store in Go
│   └── btree
│       └── .................. B Tree implementation in Haskell and Go
└── src
    └── ...................... B+ Tree based persistent key-value store in Haskell

Instructions

From the project root, execute -

cabal run

This will configure the relevant dependencies and run the test file Main.hs.

Usage

import BPlusTree
import Types

main :: IO ()
main = do
    t <- BPlusTree.create 3           -- create a B+ Tree of degree 3
    t1 <- BPlusTree.insert t 1 "v1"   -- insert key-value pair {1, "v1"}
    t2 <- BPlusTree.insert t1 2 "v2"
    t3 <- BPlusTree.insert t2 3 "v3"
    t4 <- BPlusTree.insert t3 4 "v4"
    t5 <- BPlusTree.insert t4 5 "v5"
    t6 <- BPlusTree.insert t5 6 "v6"
    print $ search (Types.root t6) 3  -- lookup value corresponding to key 3

About

B+ tree based persistent key-value store. Course project for Functional Programming (CS653).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published