CODExSIMS
Systems, made visible

Interactive visual explainers for engineers

Hard ideas,
shown not told.

CODExSIMS offers interactive software engineering explainers and visual systems tutorials for databases, distributed systems, AI, JVM and browser internals.

  • 56 interactive explainers
  • Source-backed
  • Watch, read and change inputs

Storage engines, query execution, streaming systems and the protocols that keep data correct.

25 explainers
Start here ★

How does Postgres read old rows without locking everything up?

How Postgres actually decides which row version you see, why vacuum exists and what freezing has to do with transaction wraparound.

8 stages · ~7 min
Wiki Engine

How does an LLM-maintained wiki compound knowledge over time?

What happens when an LLM maintains its own wiki instead of re-deriving the same answers on every query.

9 stages · ~8 min
Vector Mill

How does DuckDB turn SQL into vectorized pipelines so quickly?

Why DuckDB is so fast: how SQL becomes a physical plan that gets sliced into vectorized pipelines operating on column chunks.

9 stages · ~7 min
Rebalance Relay

Why do Kafka consumers stop for a rebalance and reshuffle?

Why consumers stop, what the coordinator actually does during a rebalance and how cooperative revocation makes it less painful.

8 stages · ~7 min
Gossip Ring

How do Cassandra nodes discover peers and detect failures without a leader?

How seeds bootstrap discovery, generation and version tuples reject stale knowledge, peer exchanges spread state, and local failure detectors judge reachability.

6 stages · ~5 min
Causality Lab

How can distributed systems order events when clocks disagree?

How happens before becomes logical time, how vectors expose concurrency, and how uncertainty aware clocks support safe real time ordering.

17 stages · ~16 min
Fault Laboratory

How does Jepsen find distributed system bugs under real faults?

How Jepsen prepares a real cluster, schedules concurrent operations, injects network and process faults, records honest histories, and checks linearizability.

18 stages · ~15 min
Retry Laboratory

When does a retried operation really happen only once?

How delivery guarantees differ from effect guarantees, how idempotency patterns absorb retries, and where Kafka exactly-once semantics stop.

15 stages · ~13 min
Object Database

How does Git turn files into immutable history under the hood?

An engineering-level tour of canonical object bytes, loose-object fanout, index-to-tree assembly, commit and ref resolution, reachability, structural sharing, packfiles and delta storage.

8 stages · ~5 min
Index Observatory

What really happens inside a MySQL index lookup?

How InnoDB stores rows in clustered leaves, descends separators, splits full pages, follows secondary keys, and trades read speed for write and cache cost.

7 stages · ~5 min
Consistency Lattice

What do databases mean when they promise consistency?

Why these four words are not interchangeable, which anomaly each model forbids and where Spanner, Cockroach, Postgres and DynamoDB actually sit on the lattice.

8 stages · ~7 min
LSM Turbo

Why do RocksDB LSM trees stay write-fast even when compaction gets messy?

The shared LSM skeleton behind both engines: how writes stay fast through the WAL and memtables while compaction quietly reshapes levels.

8 stages · ~7 min
Checkpoint Circuit

How does Flink keep duplicate writes out of the picture?

How Flink cuts a barrier through a live stream, snapshots state at every operator and replays cleanly after a crash.

8 stages · ~7 min
Correctness Lab

How can you check a distributed protocol across every ugly interleaving?

A high-school-friendly path from state machines and invariants through PlusCal, TLA+ model checking, stale-leader counterexamples, epoch fencing and refinement.

18 stages · ~15 min
Ingest Relay

How do realtime workers keep ClickHouse ingestion fast and safe?

How worker pools read ordered stream lanes, batch and shape rows, insert blocks into ClickHouse, and use part pressure plus retries to keep offsets safe.

8 stages · ~7 min
Commit Referee

How does Pinot keep stream rows queryable while it builds immutable segments?

A code-backed tour from Kafka fetch and mutable indexing through winner election, split commit, seven pauseless stages, and failure-specific repair.

18 stages · ~16 min
Upsert Workbench

How does Pinot keep one logical row while old versions remain inside segments?

A code-backed tour of full upsert record selection, valid and queryable bitmaps, deletes, out-of-order policy, compaction, recovery, TTL, and consistent query views.

27 stages · ~19 min
Merge Algebra Lab

How do databases merge a record that carries only a few changed fields?

A cross-database guide to overwrite, increment and append semantics through MongoDB, DynamoDB, PostgreSQL, Cassandra, Redis Active-Active and retry guards.

8 stages · ~6 min
Query Exchange

How does Pinot turn one SQL query into coordinated distributed stages?

A source-backed journey from broker planning and leaf scans through mailbox exchange, local hash joins, partial aggregation, root output, and stage-level diagnosis.

10 stages · ~9 min
Shuffle Yard

How does Spark choose between broadcast speed and shuffle pain?

How Spark picks between broadcast and shuffle, why sort merge joins dominate at scale and what AQE does when data skew shows up.

8 stages · ~7 min
Time Table

How does Iceberg time travel without copying the whole table?

How Iceberg gets time travel and branching without ever rewriting a data file, just by being clever with metadata pointers.

8 stages · ~7 min
Column Vault

How does Arrow make columnar data zero-copy across every language?

The full Arrow IPC file format from columnar memory layout through validity bitmaps, buffer alignment, record batch serialization, footer random access and the zero-copy mmap read path.

8 stages · ~7 min
Column Vault

How does the Parquet file format organize columns and skip data?

The full Parquet file format from columnar vs row storage through row groups, page internals, dictionary/RLE/delta encodings, Dremel repetition and definition levels and predicate pushdown.

9 stages · ~7 min
Vector Vault

How does RAG dig up the right context?

How RAG digs up the right context: chunking, embeddings, approximate nearest neighbor search, reranking and grounded answer generation.

8 stages · ~7 min
Posting List Lab

How do you search 100 GB of text without scanning it?

Build full-text search from raw bytes: analyze terms, invert postings, test phrase positions, size and bulk-load shards, merge BM25 results, and maintain immutable segments.

11 stages · ~9 min

From transformer internals to agent loops, retrieval, prompting and real-time inference.

19 explainers
Start here ★

How does a large language model turn text into a response?

The full transformer architecture from tokenization through embeddings, self-attention, multi-head attention, transformer blocks and autoregressive generation.

8 stages · ~6 min
Stream Pipeline

How do tokens stream from an LLM to your screen in real time?

What actually happens between stream:true and the first token on screen, including the SSE framing and backpressure nobody talks about.

8 stages · ~6 min
Chain Studio

How does LangChain grow one model call into a real LLM app?

How one model call grows into prompts, memory, chains, evals and agents across the full LangChain course arc.

7 stages · ~5 min
Prompt Systems

How do OpenAI prompts become reliable production artifacts?

Why prompt order matters, how examples shape behavior, what structured outputs actually guarantee and the eval loop that hardens it all.

8 stages · ~6 min
LLM Application Lab

What turns one model call into a reliable LLM application?

A software engineering tour of context budgets, instruction authority, sampling, reasoning, streaming, schemas, tools, routing, retries and token cost.

9 stages · ~7 min
Evaluation Lab

How do you test an AI system that can answer differently on every run?

A practical evaluation system for probabilistic software, from golden datasets and regression tests through retrieval, grounding, tools, judges, humans, production signals and repeated model or prompt comparisons.

8 stages · ~6 min
Million-Token Lab

How does DeepSeek-V4 fit a million-token context on the same hardware?

The architecture rewrites behind DeepSeek-V4: CSA plus HCA hybrid attention, doubly-stochastic hyper-connections, the Muon optimizer, MegaMoE wave-pipelined EP, and the stability tricks that kept a 1.6T-parameter MoE alive during training.

8 stages · ~6 min
V4 Co-Design Lab

How do DeepSeek-V4 architecture and training work together?

A source-backed tour of DeepSeek-V4 residual mixing, compressed attention, sparse expert training, stability systems and specialist distillation.

8 stages · ~6 min
Open Frontier Lab

How do Kimi K3 architecture, data, and training fit together?

A source-backed deep dive into Kimi K3 sparse routing, long-context attention, depth retrieval, data-disclosure boundaries, low-precision training and serving.

9 stages · ~7 min
Evaluation Containment Lab

How did an AI security evaluation escape its sandbox and reach production?

A source-backed reconstruction of how an OpenAI cyber evaluation escaped its test environment, reached Hugging Face production and changed containment practice.

8 stages · ~6 min
Reasoning Science Lab

How does pretraining change what reinforcement learning can achieve?

A paper-backed tour of how pretraining loss and token exposure predict RL returns, how compute allocation shifts, and what RL changes inside easy and hard reasoning policies.

8 stages · ~6 min
Agent Learning

How does a self-learning agent turn conversations into lasting capability?

How a fresh agent turns conversations into memory, skills and searchable episodes so the next session is smarter than the last.

8 stages · ~6 min
Agent Console

How does Claude Code route prompts, tools, hooks, and plugins?

How prompts, tools, hooks and plugins actually flow through Claude Code from the CLI entry point to the edges where MCP takes over.

8 stages · ~5 min
Infra Detective

How does Clanker Cloud turn one prompt into grounded cloud evidence?

How one prompt gets cleaned up, routed to the right backend, hydrated with credentials and fanned out into parallel evidence gathering.

8 stages · ~6 min
Gateway Garage

What is OpenClaw actually doing in local control mode?

What one local gateway actually does: normalizing channels, mapping sessions, running the agent loop and coordinating paired devices.

8 stages · ~6 min
Mission Loop

Why does an AI agent loop feel more structured than it looks?

Why an agent loop feels more structured than it looks: planning, tool calls, memory and guardrails working as one deliberate cycle.

7 stages · ~5 min
Code Lab

How do you wire Java, Claude and OpenSearch into a working agent?

A practical code walkthrough: Maven dependencies, system prompt, tool schemas, the agent for-loop, switch-case handler and a live end-to-end trace.

8 stages · ~7 min
Token Turbo

Why do LLM tokens come out one tiny step at a time?

Why tokens come out one at a time: the full path from prompt assembly through prefill, KV cache reuse and the autoregressive decode loop.

8 stages · ~6 min
GPU Serving Lab

How would you design the GPU platform behind a ChatGPT-scale service?

A public-mechanism design exercise spanning streaming contracts, workload tails, GPU memory, parallelism, KV admission, continuous batching, failure handling, autoscaling and useful-token cost.

31 stages · ~27 min

Memory, garbage collection and profiling inside the Java runtime.

3 explainers

Browsers, developer platforms, consensus, deployment and network behavior.

6 explainers
Start here ★

Where does browser INP get stuck in the rendering pipeline?

How bytes become pixels through the rendering pipeline and where exactly INP pressure shows up when the main thread gets stuck.

8 stages · ~7 min
CLI Onramp

How do you go from zero to a useful Clanker workflow?

The actual path from zero to useful with Clanker: install, config, first grounded question and then maker plans that talk to real backends.

9 stages · ~6 min
Edge Release

How does Netlify turn one deploy into a globally served site?

How one git push becomes a globally served site through immutable deploys, edge POPs and instant rollback that just works.

8 stages · ~6 min
Git Continuity Lab

How does Cursor Origin keep Git fast, durable, and consistent?

A source-backed tour of Continuity, the Git storage system beneath Cursor Origin, from packfile locality and WAL publication through CAS races, verified reads, shared compaction and elastic replicas.

9 stages · ~6 min
Quorum Lab

How does Raft keep quorum alive when the leader goes down?

How silence becomes an election, why majority replication is the commit rule and what happens to a stale leader after failover.

7 stages · ~6 min
Mechanics Lab

How do you solve centre-of-mass and collision problems without losing the signs?

A Class 11 mechanics path from mass-weighted position and centre-of-mass motion through signed momentum, restitution, elastic and inelastic collisions, and a checked two-dimensional solving workflow.

8 stages · ~6 min

Focused visual notes from experiments, media formats and production systems.

3 explainers

Shape the library

Request an explainer

What hard idea should CODE×SIMS make visible?