Show HN: DriftDB – An experimental append-only database with time-travel queries
5 hours ago
- #experimental
- #database
- #time-travel
- Experimental append-only database with time-travel queries.
- Features include append-only storage, time-travel queries, CRC-verified segments, secondary indexes, snapshots & compaction, crash-safe operations, and a simple query language (DriftQL).
- Commands for setup, initialization, table creation, data insertion, querying, time-travel queries, showing row history, creating snapshots, and compacting storage.
- Table operations include creating tables with indexes, inserting documents, partial updates, soft deletes, and maintenance tasks like snapshots and compaction.
- File structure includes directories for tables, segments, snapshots, indexes, and metadata.
- Event log format includes length, CRC32, sequence, timestamp, event type, and payload.
- Concurrency model supports single writer with process-global lock and multi-reader with snapshots and replay.
- Crash recovery mechanisms include CRC verification and truncation of corrupt tail segments.
- Performance optimizations include configurable snapshot intervals, compaction, B-tree indexes for O(log n) lookups, Zstd compression, and MessagePack serialization.
- MIT licensed, experimental MVP suitable for development and testing, not production use.