
SNKV- Key value store based on sqlite b-tree engine
There are many key--value stores available, such as RocksDB, LevelDB, LMDB, etc. However, these often consume quite a lot of memory. When I searched on Reddit, I found that whenever someone asks about using a key--value store, people frequently suggest using SQLite. Example discussion: https://www.reddit.com/r/rust/comments/1ls5ynr/recommend_a\_keyvalue_store/ Even though SQLite is a SQL database, people often use it as a key--value store. This made me want to develop my own key--value store that uses SQLite's storage engine instead of the entire SQLite stack. AI really helped me understand the lower layers of SQLite, such as the B-tree, pager, and OS layers. This led to the creation of: https://github.com/hash-anu/snkv Architecture The architecture of SNKV is very simple: kvstore layer -> b-tree layer -> pager -> os The lower layers are already battle-tested and production-ready. My task was to develop kvstore.c so that it consumes the APIs of the B-tree layer while the lower layers w
Continue reading on Dev.to
Opens in a new tab



