A small, educational key–value store in Go that explores B-tree storage, page-based persistence, and durability primitives.
killerdb is a learning-focused database project that implements a B-tree–backed KV store with a simple CLI. It includes experiments around persistence (mmap, master page, fsync) and safe file writes.
- B-tree implementation with insert, get, and delete
- Page-based storage with fixed page size
- Memory-mapped persistence layer
- Master page for root pointer and page count
- File-backed KV store with sync/flush flow
- Simple CLI for interactive testing
- File utilities for safer persistence patterns
main.go– entrypointbtree/– core B-tree implementation, CLI, and persistencefiledb/– file persistence helpers (atomic writes, fsync)utils/– small helpers
- Go 1.20+ (or any modern Go version)
go run .Start the program and use:
insert <key> <value>
get <key>
delete <key>
exitExample
insert name Alice
get name
delete name