• Stars
    star
    1,157
  • Rank 38,766 (Top 0.8 %)
  • Language
    Rust
  • License
    Apache License 2.0
  • Created over 1 year ago
  • Updated 10 months ago

Reviews

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

Repository Details

A tutorial of building an LSM-Tree storage engine in a week! (WIP)

LSM in a Week

CI (main)

Build a simple key-value storage engine in a week!

Tutorial

The tutorial is available at https://skyzh.github.io/mini-lsm. You can use the provided starter code to kick off your project, and follow the tutorial to implement the LSM tree.

Development

cargo x install-tools
cargo x check
cargo x book

If you changed public API in the reference solution, you might also need to synchronize it to the starter crate. To do this, use cargo x sync.

Progress

The tutorial has 8 parts (which can be finished in 7 days):

  • Day 1: Block encoding. SSTs are composed of multiple data blocks. We will implement the block encoding.
  • Day 2: SST encoding.
  • Day 3: MemTable and Merge Iterators.
  • Day 4: Block cache and Engine. To reduce disk I/O and maximize performance, we will use moka-rs to build a block cache for the LSM tree. In this day we will get a functional (but not persistent) key-value engine with get, put, scan, delete API.
  • Day 5: Compaction. Now it's time to maintain a leveled structure for SSTs.
  • Day 6: Recovery. We will implement WAL and manifest so that the engine can recover after restart.
  • Day 7: Bloom filter and key compression. They are widely-used optimizations in LSM tree structures.

We have reference solution up to day 4 and tutorial up to day 4 for now.

More Repositories

1

type-exercise-in-rust

Learn Rust black magics by implementing an expression framework in database systems
Rust
1,154
star
2

chicv

Chi CV Template (For Typst)
304
star
3

core-os-riscv

๐Ÿ–ฅ๏ธ An xv6-like operating system on RISC-V with multi-core support. Documentation available online.
Rust
276
star
4

canvas_grab

๐ŸŒ One-click script to synchronize files from Canvas LMS.
Python
209
star
5

RISCV-Simulator

๐Ÿ’ป RISC-V Simulator of RV32I ISA. 5-stage pipeline / out-of-order execution with Tomasulo algorithm and Speculation. Support runtime visualization. Project report available.
C++
154
star
6

raytracer.rs

โšก A high-performance path tracer implemented in Rust based on "Ray Tracing in One Weekend" featuring static dispatch, multi-threaded rendering and a variety of preset scenes.
Rust
92
star
7

HallOfShame

Hall of Shame
67
star
8

raytracer-tutorial

raytracer project for PPCA 2020
Rust
60
star
9

linux-kernel-labs

Linux kernel labs
C
53
star
10

make-a-fortune

An open-source anonymous forum frontend.
TypeScript
53
star
11

raft-kvs

โ›ต A distributed key-value store based on Raft. (WIP)
Rust
42
star
12

notes

Lecture notes at SJTU
C
40
star
13

mips-simulator

๐Ÿ’ป A 5-stage pipeline MIPS CPU design in Haskell.
Haskell
33
star
14

uring-positioned-io

Async positioned I/O with io_uring.
Rust
32
star
15

xv6-riscv-fall19

Each lab in its own branch. For code modified in each lab, refer to closed issues. This repo is a fork of https://github.com/mit-pdos/xv6-riscv-fall19
C
31
star
16

mips-cpu

๐Ÿ’ป A 5-stage pipeline MIPS CPU implementation in Verilog.
Verilog
26
star
17

BlueSense

๐ŸŒˆ BlueSense is a long-term project for monitoring Shanghai environment data.
Vue
25
star
18

fourier-transform-drawing

Inspired by 3Blue1Brown. Apply fourier transform to an SVG path and draw the result on canvas.
HTML
22
star
19

skyzh-site

Alex Chi's personal site
MDX
20
star
20

rust-ycsb

YCSB in Rust (WIP)
Rust
19
star
21

Meteor

๐Ÿš† Fine-grained analysis and visualization of Hangzhou Metro for efficient traveling in metro system. Project report, slide and presentation video included.
C++
18
star
22

zoom-url-generator

Generate Zoom URL
HTML
16
star
23

pg_poop

A Postgres extension that rewrites strings to ๐Ÿ’ฉ
C
16
star
24

bustub-web-shell

BusTub web shell
HTML
15
star
25

skyzh

12
star
26

SJTU_Diploma

ไบคๅคงๅญฆ็ง‘ไบคๆต็พคๅˆ—่กจ (Originally made by @LuminousXLB) ้กน็›ฎๅทฒ่ฟ็งปๅˆฐ @SJTU-Plus
HTML
11
star
27

BPlusTree

๐ŸŒฒ Fully unit-tested B+ tree with basic paging implemented in C++
C++
11
star
28

julia.metal

๐ŸŽ‡ Render Julia Sets in real-time with Metal API on macOS
Swift
8
star
29

go-dht

๐ŸŒŽ Chord in golang
Go
8
star
30

SJTU-RM-Hurricane

๐ŸŒช๏ธ An extensible task-based robot control system on STM32 embedded platforms made for SJTU RoboMaster Competition, using open-source toolchain OpenSTM32
C++
8
star
31

chaos-video

Course Project of CS339 Computer Networks
JavaScript
7
star
32

r-by-example

๐Ÿ“š Solutions for the book "R by Example"
R
6
star
33

tenitsu

๐ŸŽพ A robot automatically finds and fetches tennis balls on the ground. Use OpenCV on Android for computer vision. Final project for SJTU ME116 "IntroME".
Kotlin
6
star
34

fishing

Yet another boring fishing game
JavaScript
5
star
35

oom_killer

Project 2 of SJTU CS356 Operating System Projects
Makefile
5
star
36

data-structure-deque

A deque of O(sqrt n) complexity on access, insert and remove, with an optimization for O(log n) access based on fenwick tree.
C++
5
star
37

CloudOJ

๐ŸŒฉ๏ธ (DEPRECATED) An Online Judge. Deprecated due to low efficiency and security issues.
PHP
4
star
38

ddcm-protocol

๐ŸŒ A protocol based on Kademlia and designed for peer-to-peer distrubuted computing
Python
4
star
39

fish-agent-simulation-mcm2020

๐ŸŸ๐ŸŸ An agent-based model for simulating fish distribution in North Atlantic.
Rust
4
star
40

game-theory-on-matrix

An agent-based model for researching game theory dynamics on matrix-like structure.
Python
4
star
41

the-tale-of-slime

Yet another boring game. No textures, no graphics, just shapes. WIP. Working on this game only when I'm boring.
JavaScript
4
star
42

kvs

Key-Value Store [Practical Networked Applications in Rust]
Rust
3
star
43

BlueMarine

๐ŸŒƒ Collect climate data from embedded devices with serial connection and BLE. Part of the BlueSense project.
Python
2
star
44

bustub-btree-shell

2
star
45

bors-playground

Rust
2
star
46

lisp-interpreter

๐Ÿ’Ž A Lisp interpreter in Ruby
Ruby
2
star
47

MrSans

๐Ÿค– Mr. Sans is a bot reporter for BlueSense. Part of the BlueSense project.
Go
1
star
48

BlueMonitor

๐ŸŒƒ Blue Sense: Sense of Blue Sky. This is the Raspberry Pi part of Blue Sense.
Python
1
star
49

prosea

๐Ÿ“š A crowdsourced contest solution sharing platform built for online STEM test of Innovation Competition
JavaScript
1
star
50

sjtuctf-2019-writeup

โ“ Solutions and exploitation snippets for SJTU CTF 2019
Python
1
star
51

conway.ts

Conway's Game of Life in TypeScript
TypeScript
1
star
52

serialpb

Reliable packet transmission over serial interface
C++
1
star
53

FlyThat

Code for Kaggle in-class competition
Python
1
star