1–2 Minute Brief Pitch: Radis (In-Memory Key-Value Store)

Target Duration: 60–90 seconds (~180–220 spoken words)
Goal: Deliver a clear, plain-English overview of why the project was built, its full scope, and key mental models learned, avoiding low-level implementation minutiae while dropping strategic follow-up hooks for the interviewer.


🎙️ Spoken Script (Plain English & Conversational)

"In this project, I built Radis—a high-performance, in-memory key-value database from scratch in C++, featuring an event-driven non-blocking network reactor, a custom binary protocol with TCP pipelining, incremental rehashing hash tables, dual-indexed sorted sets, active TTL cache eviction, and asynchronous background deallocation.

Why I Built It:
Rather than treating production engines like Redis as black boxes, my goal was to master the low-level systems engineering required to deliver predictable, sub-millisecond latencies. I wanted to understand firsthand how high-scale databases multiplex thousands of client connections on a single thread without third-party frameworks, and how they manage memory with zero garbage collection overhead while preventing latency jitter.

What I Learned & Engineering Takeaways:

  1. Event-Driven Concurrency & Non-Blocking I/O:
    I mastered the single-threaded reactor pattern, learning how to handle non-blocking socket readiness, process fragmented TCP streams with stateful framing, and pipeline batch requests without stalling or starving concurrent clients.

  2. Deterministic Latency via Progressive Amortization:
    I learned why standard collections fail in real-time systems: massive rehashing operations cause unacceptable latency spikes. By implementing incremental migration across dual hash tables and offloading large memory deletions to a background worker pool, I learned how to keep response times strictly deterministic.

  3. Cache-Conscious Memory Architecture:
    I developed a deep intuition for intrusive data structures and zero-allocation memory layouts, learning how eliminating extra pointer indirection minimizes cache misses and heap fragmentation.

Key Takeaway:
This project shifted my thinking from theoretical algorithmic complexity to mechanical sympathy—prioritizing predictable p99 latency, cache locality, and deterministic resource lifecycles over naive average-case speed."


🪝 What the Interviewer Gets Hooked Into (Natural Follow-Ups)

What You Mentioned Why It Was Done (The Motivation) Problems Faced & How Solved (The Reality) Target Deep-Dive Document
"Single-threaded reactor event loop & non-blocking I/O" "Why choose a single-threaded reactor over a thread-per-connection or thread-pool architecture?" "What starvation or CPU-spinning bugs occurred with partial reads/writes, and how did non-blocking state flags fix them?" topic_01_event_loop_and_nonblocking_io
"Custom binary framing protocol with TCP pipelining" "Why build a custom length-prefixed binary protocol rather than standard HTTP/JSON or RESP text?" "How did you handle packet fragmentation and buffer shifting without corrupting back-to-back pipelined requests?" topic_02_framing_pipelining_and_serialization
"Incremental rehashing with dual hash tables" "Why implement custom incremental rehashing instead of using std::unordered_map?" "What race conditions or missing-key bugs occurred when searching or deleting keys while migration was actively in progress?" topic_03_progressive_rehashing_hashtable
"Intrusive data structures & memory layouts" "Why design intrusive data structures instead of standard pointer-based containers or std::shared_ptr?" "What memory corruption or alignment traps did you encounter when calculating structure offsets?" topic_04_intrusive_data_structures_and_memory_layout
"Dual-indexed Sorted Sets combining hash tables and trees" "Why use an augmented AVL tree with subtree counts rather than a skiplist or std::set?" "How did you keep tree node rank counts consistent during rotations without degrading $O(\log N)$ updates?" topic_05_dual_indexed_sorted_sets_and_avl
"Active TTL eviction & background thread pool deallocation" "Why combine a min-heap with idle connection lists instead of lazy passive expiration?" "How did you update heap items in $O(\log N)$ without linear scans, and how did you prevent race conditions during background deallocations?" topic_06_ttl_cache_eviction_and_thread_pool

🧭 Next Step Transitions