Back to articles
Building a database to understand databases

Building a database to understand databases

via Dev.toErich

Databases always felt like a black box to me. You call INSERT , data goes in. You call SELECT , data comes back out. Something crashes, and somehow your data is still there. I wanted to know how all of that actually works. InterchangeDB is a database I'm building from scratch in Rust to learn how each subsystem works by implementing it myself. The project plan has been heavily inspired by CMU BusTub, mini-lsm, and ToyDB. The internals are interchangeable. Different components can be swapped in and out so I can see how they compare directly, running the same stress tests against different combinations of components on the same data. Right now there are two storage engines behind a generic trait. The B+Tree sits on top of a buffer pool manager that handles reading and writing pages to disk. The buffer pool has six cache eviction policies (FIFO, Clock, LRU, LRU-K, 2Q, and ARC) that can be hot-swapped at runtime. I benchmarked all six across five different workload patterns and the results

Continue reading on Dev.to

Opens in a new tab

Read Full Article
2 views

Related Articles