Low Level Design: Database Query Optimizer
5 min read Query Parsing Query execution begins with parsing the raw SQL text. A lexer (scanner) tokenizes the input into keywords, identifiers, […] Read article
5 min read Query Parsing Query execution begins with parsing the raw SQL text. A lexer (scanner) tokenizes the input into keywords, identifiers, […] Read article
13 min read Three-Way Handshake Every TCP connection begins with a three-way handshake that establishes synchronized sequence numbers on both sides and verifies Read article
9 min read Write Path Every write in an LSM-tree storage engine lands first in two places simultaneously: the in-memory MemTable and the Read article
8 min read Core Concept: How MVCC Works Multi-Version Concurrency Control (MVCC) solves a fundamental database problem: how to allow readers and writers Read article
9 min read B-Tree Node Structure A B-tree of minimum degree t enforces a capacity invariant on every node except the root: each Read article
13 min read Stack vs Heap Allocation Every running program uses two distinct memory regions for dynamic data: the stack and the heap. Read article
8 min read Core Data Structure An LRU cache combines two data structures to achieve O(1) time for every operation. The doubly linked Read article
6 min read Structure A skip list is a probabilistic data structure that maintains a sorted collection and supports O(log N) expected time Read article
8 min read Core Problem LFU (Least Frequently Used) is a cache eviction policy that removes the item with the lowest access frequency Read article
10 min read Provider Schedule Model A provider’s schedule is defined at two levels: recurring availability rules and date-specific overrides. Recurring rules describe Read article
9 min read Double-Entry Accounting A digital wallet is a ledger, and the correct foundation for any ledger is double-entry accounting. Every financial Read article
9 min read Real-Time Scoring Pipeline Every transaction enters the fraud scoring pipeline synchronously before a payment decision is returned. The flow: transaction Read article
9 min read Cart Storage Options There are three main approaches to storing a shopping cart. Client-side storage keeps the cart in the Read article
9 min read Config Data Model A configuration management system stores each configuration entry as a structured record with the following fields: key Read article
11 min read Home Hub Architecture The home hub is the central controller for all smart home devices in a physical residence. Deployed Read article