How scadoshi/chickadee works
Chickadee is a Rust log-structured key-value store, exposed through an interactive CLI and a concurrent TCP server. Both accept the same commands through a shared runner: parse and execute set/get/delete operations against the Log, which maintains a WAL and memtable and reads or flushes immutable SSTables. The documented storage lifecycle also includes corruption recovery, bloom-filter-assisted lookup, and periodic compaction. The graph uses README and indexed source references for some links; unsampled implementation details are not asserted beyond those references.
Main entry points: log/mod.rs Log engine · sstable/mod.rs SSTable reader · command.rs Command parsing · memtable.rs Memtable
Components 15
User interfaces
- CLI entry
src/bin/cli.rs - TCP server
src/bin/server.rs - Command runner
src/lib/run.rs - Terminal help
src/lib/tui.rs
Command handling
- Command parsing
src/lib/log/command.rs - Log entries
src/lib/log/entry.rs
Storage engine
- Log engine
src/lib/log/mod.rs - Memtable
src/lib/log/memtable.rs - SSTable reader
src/lib/log/sstable/mod.rs - SSTable compaction
src/lib/log/sstable/compact.rs - Bloom filter
src/lib/log/sstable/bloom_filter.rs
Persistence internals
- WAL file
src/lib/log/mod.rs - Record framing
src/lib/log/header
Other components
- CLI user
- TCP client
Connections 19
- CLI user → CLI entry: uses
README.md - CLI entry → Command runner: starts
README.md - TCP client → TCP server: connects
README.md - TCP server → Command runner: serves through
README.md - Command runner → Command parsing: parses and executes
src/lib/run.rs - Command parsing → Log engine: executes operations
src/lib/log/command.rs - Command parsing → Log entries: creates entries
src/lib/log/command.rs - Command parsing → Terminal help: shows help
src/lib/log/command.rs - Log engine → Memtable: updates and queries
src/lib/log/mod.rs - Log engine → SSTable reader: reads tables
src/lib/log/mod.rs - Log engine → WAL file: appends and syncs
src/lib/log/mod.rs - Log engine → Record framing: writes records
src/lib/log/mod.rs - Memtable → Record framing: reads and writes records
src/lib/log/memtable.rs - Memtable → SSTable reader: flushes entries
README.md - SSTable reader → Bloom filter: checks membership
src/lib/log/sstable/mod.rs - SSTable reader → Record framing: reads records
src/lib/log/sstable/mod.rs - Log engine → SSTable compaction: compacts periodically
README.md - SSTable compaction → SSTable reader: merges tables
src/lib/log/sstable/compact.rs - SSTable compaction → Memtable: buffers output
src/lib/log/sstable/compact.rs