DevTales
RSS Feed
Hi there๐, I'm Suhan.
Welcome to DevTales โ my corner of the internet for writing about the stuff that runs underneath.
I'm interested in low-level systems: memory models, compilers, runtimes, operating systems, and the machinery that makes higher-level abstractions possible. I write about things I'm building, things I'm reading, and ideas I can't stop thinking about.
If something catches your eye, dive in.
Also into fiction? I write stories at Vicitales.
Featured
-
Building a Graph Database 3 - Node Storage
A deep dive into how Nexora stores, looks up, inserts, and deletes nodes. Fixed-size records, identity-bound slots, O(1) direct addressing via the page index, and why deleted nodes leave permanent holes.
-
Building a Graph Database 2 - The File Format
Every database is ultimately a file. This post walks through how Nexora lays out nodes, edges, and properties on disk โ fixed-size pages, a root-pointer manifest, intrusive linked lists for adjacency, and a packed pointer encoding that fits a page address and slot index into a single u64.
-
Building a Graph Database 1 - The Why
Before diving into how Nexora works, this post covers the why and what graph databases are, where relational databases fall short, and why graphs are a natural fit for highly connected data.
Recent Posts
-
Building a Graph Database 9 - Lua Scripting Layer
How Nexora embeds Lua 5.4 as a scripting and REPL layer โ the UserData bridge that turns GraphStore methods into Lua calls, the sandbox that keeps scripts from escaping to the OS, and the REPL's expression auto-eval trick.
-
Building a Graph Database 8 - Write-Ahead Log
How Nexora's WAL intercepts every page write, what a WAL frame looks like on disk, how recovery scans the sidecar file after a crash, and how checkpoint-on-close moves data back to the main file.
-
Building a Graph Database 7 - Indexes
How Nexora maps a logical page number to a physical page ID in O(1), what a directory page looks like on disk, and how the index grows when the database exceeds a single directory page.
-
Building a Graph Database 6 - Buffer Store
How Nexora caches pages in memory to avoid redundant disk reads, what the clock eviction algorithm does, and how dirty pages are written back on close.
-
Building a Graph Database 5 - Labels and Strings
How Nexora deduplicates label strings, maps label IDs to string data in O(1), and stores variable-length strings in a two-ended buffer with overflow chaining.