relicense mini-lsm-book to CC BY-NC-SA 4.0 (#118)

* relicense mini-lsm-book to CC BY-NC-SA 4.0

Signed-off-by: Alex Chi Z <iskyzh@gmail.com>

* clearify license

Signed-off-by: Alex Chi Z <iskyzh@gmail.com>

* fix fmt

Signed-off-by: Alex Chi Z <iskyzh@gmail.com>

* fix fmt

Signed-off-by: Alex Chi Z <iskyzh@gmail.com>

---------

Signed-off-by: Alex Chi Z <iskyzh@gmail.com>
This commit is contained in:
Alex Chi Z.
2025-01-19 19:24:12 -05:00
committed by GitHub
parent d9d12815d8
commit 7f4b204064
152 changed files with 2105 additions and 9 deletions

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Environment Setup
The starter code and reference solution is available at [https://github.com/skyzh/mini-lsm](https://github.com/skyzh/mini-lsm).

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Mini-LSM Course Overview
## Tutorial Structure

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Preface
![Banner](./mini-lsm-logo.png)
@@ -64,7 +68,7 @@ The long story of why we rewrote it: The tutorial was originally planned as a ge
### License
The source code of this course is licensed under Apache 2.0, while the author owns the complete copyright of the tutorial itself (markdown files + figures).
The source code of this course is licensed under Apache 2.0, while the book is licensed under CC BY-NC-SA 4.0.
### Will this tutorial be free forever?

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Mini-LSM v1
This is a legacy version of the Mini-LSM tutorial and we will not maintain it anymore. We now have a new version of this tutorial. We keep the legacy version in this book so that the search engine can keep the pages in the index and users can follow the links to the new version of the tutorial.

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Block Builder and Block Iterator
<div class="warning">

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# SST Builder and SST Iterator
<div class="warning">

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Mem Table and Merge Iterators
<div class="warning">

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Storage Engine and Block Cache
<div class="warning">

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Leveled Compaction

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Write-Ahead Log for Recovery
<div class="warning">

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Bloom Filters

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Key Compression
<div class="warning">

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# What's Next
We did not finish this chapter as part of Mini-LSM v1.

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# LSM in a Week
[Preface](./00-preface.md)

View File

@@ -1 +1,5 @@
<p style="text-align: center; margin-top: 3em"><small>Your feedback is greatly appreciated. Welcome to join our <a href="https://skyzh.dev/join/discord">Discord Community</a>.<br>Found an issue? Create an issue / pull request on <a href="https://github.com/skyzh/mini-lsm">github.com/skyzh/mini-lsm</a>.<br>Copyright © 2022 - 2024 Alex Chi Z. All Rights Reserved.</small></p>
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
<p style="text-align: center; margin-top: 3em"><small>Your feedback is greatly appreciated. Welcome to join our <a href="https://skyzh.dev/join/discord">Discord Community</a>.<br>Found an issue? Create an issue / pull request on <a href="https://github.com/skyzh/mini-lsm">github.com/skyzh/mini-lsm</a>.<br>mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0.</small></p>

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Memtables
![Chapter Overview](./lsm-tutorial/week1-01-overview.svg)

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Merge Iterator
![Chapter Overview](./lsm-tutorial/week1-02-overview.svg)

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Block
![Chapter Overview](./lsm-tutorial/week1-03-overview.svg)

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Sorted String Table (SST)
![Chapter Overview](./lsm-tutorial/week1-04-overview.svg)

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Read Path
![Chapter Overview](./lsm-tutorial/week1-05-overview.svg)

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Write Path
![Chapter Overview](./lsm-tutorial/week1-05-overview.svg)

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Snack Time: SST Optimizations
![Chapter Overview](./lsm-tutorial/week1-07-overview.svg)

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Week 1 Overview: Mini-LSM
![Chapter Overview](./lsm-tutorial/week1-overview.svg)

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Compaction Implementation
![Chapter Overview](./lsm-tutorial/week2-01-full.svg)

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Simple Compaction Strategy
![Chapter Overview](./lsm-tutorial/week2-02-simple.svg)

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Tiered Compaction Strategy
![Chapter Overview](./lsm-tutorial/week2-00-tiered.svg)

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Leveled Compaction Strategy
![Chapter Overview](./lsm-tutorial/week2-04-leveled.svg)

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Manifest
![Chapter Overview](./lsm-tutorial/week2-05-overview.svg)

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Write-Ahead Log (WAL)
![Chapter Overview](./lsm-tutorial/week2-06-overview.svg)

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Batch Write and Checksums
<!-- ![Chapter Overview](./lsm-tutorial/week2-07-overview.svg) -->

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Week 2 Overview: Compaction and Persistence
![Chapter Overview](./lsm-tutorial/week2-overview.svg)

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Timestamp Key Encoding + Refactor
In this chapter, you will:

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Snapshot Read - Memtables and Timestamps
In this chapter, you will:

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Snapshot Read - Engine Read Path and Transaction API
In this chapter, you will:

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Watermark and Garbage Collection
In this chapter, you will implement necessary structures to track the lowest read timestamp being used by the user, and collect unused versions from SSTs when doing the compaction.

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Transaction and Optimistic Concurrency Control
In this chapter, you will implement all interfaces of `Transaction`. Your implementation will maintain a private workspace for modifications inside a transaction, and commit them in batch, so that all modifications within the transaction will only be visible to the transaction itself until commit. We only check for conflicts (i.e., serializable conflicts) when commit, and this is optimistic concurrency control.

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# (A Partial) Serializable Snapshot Isolation
Now, we are going to add a conflict detection algorithm at the transaction commit time, so as to make the engine to have some level of serializable.

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Snack Time: Compaction Filters
Congratulations! You made it there! In the previous chapter, you made your LSM engine multi-version capable, and the users can use transaction APIs to interact with your storage engine. At the end of this week, we will implement some easy but important features of the storage engine. Welcome to Mini-LSM's week 3 snack time!

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# Week 3 Overview: Multi-Version Concurrency Control
In this part, you will implement MVCC over the LSM engine that you have built in the previous two weeks. We will add timestamp encoding in the keys to maintain multiple versions of a key, and change some part of the engine to ensure old data are either retained or garbage-collected based on whether there are users reading an old version.

View File

@@ -1,3 +1,7 @@
<!--
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
-->
# The Rest of Your Life (TBD)
This is an advanced part that deep dives into optimizations and applications of the LSM storage engine and will make your implementation more production-ready. We are still planning on the content, and this part will not be publicly available in near future.