# skyzh/mini-lsm

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/skyzh-mini-lsm).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

4,034 stars · 614 forks · Rust · Apache-2.0

## Links

- GitHub: https://github.com/skyzh/mini-lsm
- Homepage: https://skyzh.github.io/mini-lsm/
- awesome-repositories: https://awesome-repositories.com/repository/skyzh-mini-lsm.md

## Topics

`database` `key-value-store` `kv-store` `lsm` `lsm-tree` `rust` `storage` `tutorial`

## Description

Mini-LSM is an educational storage engine and key-value database library designed to demonstrate the implementation of log-structured merge-tree architecture. It serves as a pedagogical resource for understanding how to build high-performance storage systems from the ground up, focusing on the mechanics of persistent data structures and disk-based storage.

The project provides a functional framework for managing data through memory-to-disk flushing and multi-version concurrency control. It distinguishes itself by implementing snapshot-based isolation, which allows for consistent views of the database state during concurrent operations, and utilizes leveled compaction strategies to organize data files and optimize read performance.

The engine covers a broad range of storage management capabilities, including write-ahead logging for crash recovery and probabilistic indexing to minimize disk input and output. It also includes a suite of verification utilities and testing tools intended to validate the integrity of storage operations and assist in diagnosing concurrency-related issues.

## Tags

### Data & Databases

- [LSM-Tree Storage Engines](https://awesome-repositories.com/f/data-databases/storage-engines/key-value/log-structured-merge-trees/lsm-tree-key-value-stores/lsm-tree-storage-engines.md) — Implements a log-structured merge-tree database engine designed for learning key-value storage architecture.
- [Log-Structured Merge-Trees](https://awesome-repositories.com/f/data-databases/storage-engines/b-tree/log-structured-merge-trees.md) — Implements a log-structured merge-tree architecture to manage data persistence through memory-to-disk flushing. ([source](https://github.com/skyzh/mini-lsm#readme))
- [Embedded Key-Value Stores](https://awesome-repositories.com/f/data-databases/storage-engines/key-value/embedded-key-value-stores.md) — Provides an embedded storage framework that organizes data into sorted immutable files for efficient operations.
- [Snapshot Isolation Techniques](https://awesome-repositories.com/f/data-databases/acid-transactional-cores/concurrent-read-write-transactions/snapshot-isolation-techniques.md) — Maintains data consistency during concurrent operations using snapshot isolation techniques.
- [Compaction Strategies](https://awesome-repositories.com/f/data-databases/compaction-strategies.md) — Reorganizes and merges sorted data files to reclaim disk space and optimize read performance. ([source](https://github.com/skyzh/mini-lsm#readme))
- [Database Systems](https://awesome-repositories.com/f/data-databases/database-management-systems/database-systems-management/database-systems.md) — Provides a framework for implementing core database components like logging, memory tables, and disk storage.
- [Level-Based Compaction Strategies](https://awesome-repositories.com/f/data-databases/multi-level-caching/tiered-compaction-strategies/level-based-compaction-strategies.md) — Organizes data files into distinct levels and merges them to reclaim space and maintain read performance bounds.
- [Multi-Version Concurrency Control](https://awesome-repositories.com/f/data-databases/multi-version-concurrency-controls/multi-version-concurrency-control.md) — Maintains multiple versions of data records to enable non-blocking read and write operations. ([source](https://github.com/skyzh/mini-lsm#readme))
- [Bloom Filters](https://awesome-repositories.com/f/data-databases/query-filters/bloom-filters.md) — Uses probabilistic membership testing to quickly determine if a key exists in a file before performing disk I/O.
- [Educational Database Systems](https://awesome-repositories.com/f/data-databases/relational-database-management-systems/educational-database-systems.md) — Serves as a pedagogical resource for learning the internals of storage engine implementation and database systems.
- [Storage Optimizations](https://awesome-repositories.com/f/data-databases/storage-engines/key-value/log-structured-merge-trees/lsm-tree-key-value-stores/storage-optimizations.md) — Applies compaction and merging strategies to improve disk space efficiency and read performance.
- [Serializable Snapshot Isolation](https://awesome-repositories.com/f/data-databases/strict-serializability/serializable-snapshot-isolation.md) — Provides consistent views of the database state for long-running transactions using timestamp-based snapshot isolation.
- [Write-Ahead Logging](https://awesome-repositories.com/f/data-databases/write-ahead-logging.md) — Records incoming write operations to a persistent log to ensure durability and crash recovery. ([source](https://github.com/skyzh/mini-lsm#readme))

### Web Development

- [LSM Memtables](https://awesome-repositories.com/f/web-development/client-side-storage/memory-buffering/sorted-memory-buffers/lsm-memtables.md) — Buffers writes in sorted in-memory structures before flushing them as immutable files to persistent storage.
