The problem
I was curious about how databases work. In order to figure it out, I built my own. I was exploring how a database engine actually persists and retrieves data: how pages, writes, and data serialization works. The implementation uses io_uring and Direct I/O to bypass the kernel’s page cache, which meant dealing with the same low-level constraints real database engines deal with. Unfortunately, I was unable to properly implement B+ trees and moved on from the project.
Technical highlights
- I built a custom data serialization and deserialization library.
- I used io_uring and direct I/O to achieve higher performance in the database engine.
- I manually implemented pages and cursor to write data to disk. The idea was to store the data in a B+ tree-like structure.