Key-Value Store API
Keywords
Prerequisites
None — this is a starting concept.
Related Papers
Progress
Sign in to track your progress.
幾乎所有的 storage engine 最終都透過 Key-Value Store API 來對外提供服務,包括 Put、Get、Delete、Scan 等基本操作。我們需要理解 memtable 如何作為 in-memory write buffer 暫存寫入資料,以及 write-ahead log (WAL) 如何在系統崩潰時保障資料的 durability。此外,我們也會學到 snapshot 和 iterator 的概念,它們讓使用者可以在一致的資料視圖上進行讀取與遍歷。掌握這組 API 是後續理解 LSM-Tree、B+Tree 等進階索引結構的必要基礎,因為這些結構本質上都是在實作這套介面。
Key Concepts
我理解 Key-Value Store 的基本操作,包括 Put、Get、Delete、Scan 各自的語意與使用場景
我理解 memtable 作為 in-memory write buffer 的角色,以及它如何暫存寫入資料以提升寫入效能
我理解 write-ahead log (WAL) 如何在系統崩潰時保障資料的 durability,確保已確認的寫入不會遺失
我理解 snapshot 與 iterator 如何提供一致的資料視圖,讓讀取操作不受並行寫入影響
我了解 KV Store API 是 LSM-Tree、B+Tree 等進階索引結構的共同抽象介面,掌握它是理解後續 storage engine 的基礎