• Stars
    star
    194
  • Rank 196,221 (Top 4 %)
  • Language
    Rust
  • License
    Apache License 2.0
  • Created almost 8 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

On-Disk B+ Tree implemented in Rust

Log Structured Merge B+ Tree (LSMBT)

This an implementation of two different data structures:

The implementation also leverages a write-ahead log to ensure that data is not lost.

Basic Architecture

When you create a LSMBT 2 files are created: a blank B+ Tree file, and a blank WAL file. An in-memory BTreeMap is also constructed. Each method of the LSMBT is outlined below

Insert (key,value)

When a (key,value) pair is added to the LSMBT the following occurs:

  1. The (key,value) pair is written to the WAL file.
  2. The (key,value) pair is added to the in-memory BTree. If the size of the in-memory BTree hits a particular threshold, then
  3. The in-memory BTree is merged with the on-disk B+Tree to create a new on-disk B+Tree.
  4. The in-memory BTree and the WAL file are both truncated.

Get Values

Because a key can be associated with a set (no duplicate values per key) of values, the get method returns a list of values:

  1. Collect all of the values associated with a given key in the in-memory BTree.
  2. Collect all of the values associated with a given key in the on-disk B+Tree.
  3. Return all the unique values

Delete Value

Again, because a key can be associated with a set of values, the value to be removed must be supplied during a delete:

  1. Remove the value from the in-memory BTree. If it is the only value associated with the key, then remove the key as well.
  2. Mark the value in the on-disk B+Tree as deleted. (The value isn't actually removed until a compaction occurs.)

More Repositories

1

rust-compare

A site that compares Rust to C++ and Java
HTML
13
star
2

sop4j-dbutils

A fork of Apache's commons-dbutils
Java
8
star
3

mws-sdk

Amazon Marketplace Web Service SDK
Java
6
star
4

Mooose

A Modular Object Oriented Operating System for Education
C++
6
star
5

usbd

User-space block device
C
4
star
6

logstore

A distributed log storage database
Rust
3
star
7

wicket-web-beans

Fork of wicket-web-bean from Google Code
Java
3
star
8

kvs

Key-Value Store Library for Rust
Rust
2
star
9

chess

Simple chess program
Java
2
star
10

PHAAAS

The Plugable Http Authentication Authorization and Auditing System
Java
2
star
11

qcp

Quick-Copy, tool for quickly copying large or many files between computers.
Rust
1
star
12

large_table

An in-memory table modeled after Pandas
Rust
1
star
13

Flood-It-Simulator

A simulator for the Flood It game
Java
1
star
14

family_tree

Takes a CSV file of family members, and creates a GraphViz file for rendering the tree
Rust
1
star
15

JevelDB

Java Implementation of LevelDB
1
star
16

php_linter

Python
1
star
17

fishermann

Chess engine
Rust
1
star
18

Java-Utilities

Random Java classes
Java
1
star
19

MathBlotter

A Computer Algebra System (an attempt at a clone of Maple/Mathematica)
Java
1
star
20

BigNumbers

Big Integer and Rational Number Libraries
C
1
star
21

memrocksdb

memcached API backed by rocksdb
C++
1
star
22

gnuradio-projects

GNU Radio project files
1
star
23

GamingSimulation

Classes for simulating gaming games.
Java
1
star
24

kbd_logger

Linux Kernel Module for Keyboard Logging
C
1
star
25

NineSquare

Hyper-local events tracking app
JavaScript
1
star
26

wicket-details-table

A Wicket DataTable that shows a detail row for each row in the table.
Java
1
star