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:
@@ -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).
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
<!--
|
||||
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
|
||||
-->
|
||||
|
||||
# Preface
|
||||
|
||||

|
||||
@@ -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?
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
<!--
|
||||
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
|
||||
-->
|
||||
|
||||
# Leveled Compaction
|
||||
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
<!--
|
||||
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
|
||||
-->
|
||||
|
||||
# Bloom Filters
|
||||
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
<!--
|
||||
mini-lsm-book © 2022-2025 by Alex Chi Z is licensed under CC BY-NC-SA 4.0
|
||||
-->
|
||||
|
||||
# Memtables
|
||||
|
||||

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

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

|
||||
|
||||
@@ -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)
|
||||
|
||||

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

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

|
||||
|
||||
@@ -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
|
||||
|
||||

|
||||
|
||||
@@ -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
|
||||
|
||||

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

|
||||
|
||||
@@ -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
|
||||
|
||||

|
||||
|
||||
@@ -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
|
||||
|
||||

|
||||
|
||||
@@ -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
|
||||
|
||||

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

|
||||
|
||||
@@ -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)
|
||||
|
||||

|
||||
|
||||
@@ -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
|
||||
|
||||
<!--  -->
|
||||
|
||||
@@ -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
|
||||
|
||||

|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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!
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user