The Runtime Theory
medium · 4h · 14 steps

Data Storage and Consistency

Move from in-memory structures to database plans, transaction visibility, replication, cache freshness, and consensus.

Curriculum (14 steps)

1

Compare arrays, hash tables, trees, heaps, and graphs by the operations they make cheap and the memory accesses they require.

Start→
2

Follow a key through hashing, bucket selection, collision handling, equality checks, and the returned value.

Start→
3

Combine a hash map and a doubly linked list to support constant-time cache lookup, promotion, insertion, and eviction.

Start→
4

Trace SQL through parsing, logical rewrites, cost-based planning, physical operators, indexes, and the buffer pool.

Start→
5

Follow a selective SQL lookup through planning, a B-tree index, heap visibility checks, and the result rows.

Start→
6

Follow SQL through parsing and planning into scans, joins, buffers, visibility checks, and result rows.

Start→
7

Use EXPLAIN to predict scans and joins, then compare row estimates with execution observations on a safe SELECT query.

Start→
8

A distributed-systems prompt about majority replication, protocol safety, leader changes, and availability without a quorum.

Start→
9

Turn user requirements into a data flow, capacity model, and failure-aware architecture before drawing infrastructure boxes.

Start→
10

Follow a read request through routing, a cache lookup, a database miss path, and a cache-fill decision.

Start→
11

Visualize a client request, routing, cache hit or miss, database access, and the chosen freshness policy.

Start→
12

Understand why timeouts, retries, ordering, and consistency matter when remote machines can fail independently.

Start→
13

Follow a client command from the leader's log through replication, quorum commitment, state-machine application, and reply.

Start→
14

Use a three-node cluster to reason about elections, log replication, quorum loss, and which client outcomes remain uncertain.

Start→