This project is a simple implementation of Bitcask, a log-structured key/value store design described by Basho in the Bitcask paper.
The goal of this repository is educational: it shows the core ideas behind Bitcask in a small Go codebase.
- Stores records in append-only
.datafiles. - Keeps an in-memory key directory for fast lookups.
- Supports
put,get,delete, and listing keys. - Uses tombstone records for deletes.
- Rebuilds the key directory from data files on startup.
- Rotates data files when the active file grows too large.
- Includes basic compaction support.
- Verifies records with CRC checksums.
go run .This starts a small REPL backed by ./mydb.
Available commands:
put <key> <value>
get <key>
delete <key>
keys
exit
- Bitcask paper / introduction
- Bitcask: A Log-Structured Hash Table for Fast Key/Value Data, Basho