160 interactive diagrams, 43 hands-on labs inside the chapters, an offline exercise studio with 84 system-design exercises (49 chapter exercises + 35 classic problems), step-by-step narration and an interview pack for every chapter of DDIA (2nd ed.) — in Persian and English. Then use what you learned in a capstone: design an AI platform.
Leader failover (chapter 6): pick a start and an end node, and the diagram lights up the path between them.
14 chapters · 160 interactive diagrams · 43 inline labs · 84 studio exercises (49 chapter + 35 classic) · 15 ADRs · 1 capstone
Explore the live site ↗ · Enter the capstone · Start at Chapter 1
Open the exercise studio ↗ · Try a lab in Chapter 6 · Studio docs
Created, written and maintained by hurdad ashouri
⭐ If this helps you learn, star the repo and share it with someone preparing for system-design interviews.
The chart is rebuilt from the accounts that currently star the repository, so it is a snapshot, not an append-only history: if someone removes a star, their point disappears from the curve. The badge, the site pill and assets/stars.json carry the current count.
- What it is: a free, static study site for Designing Data-Intensive Applications (2nd ed.) plus a system-design practice studio. No backend, no account, no API key; the chapters, calculators, labs and studio run in your browser.
- Languages: Persian (RTL) and English, light and dark themes.
- Covers: replication, sharding, transactions, consensus, storage engines, batch and stream processing, CDC, exactly-once, schema evolution, ethics.
- Interactive parts: 160 diagrams, 43 inline labs (3 per chapter, 4 in chapter 6), and an exercise studio with 84 exercises (49 chapter exercises + 35 classic problems). Run an exercise to see packets flow, bottlenecks appear and a pass/fail verdict.
- Glossary: 287 technical terms get a dotted underline in the chapters; 226 of them also have a generated diagram. Hover previews a one-line definition and clicking opens the entry — a jargon-free everyday scene, an analogy, the technical account with key numbers, longer sections and the usual trap. The index lives at
glossary/index.htmland every chapter has its own page of entries. - Entry points:
index.html,ch1-tradeoffs/toch14-doing-right/,glossary/index.html,studio/index.html,final-project/index.html. - Machine-readable summary:
llms.txt. Studio internals:docs/STUDIO.md. - Privacy: no account and no tracking cookies. The public deployment includes Vercel Web Analytics to count cookieless pageviews (page URL, referrer, approximate country, device/browser); it sets no cookies and does not track you across sites. Exercise answers and saved work stay in your browser; the study content makes no model or platform API calls.
- Run it:
python3 -m http.server 8766 --bind 127.0.0.1, then openhttp://127.0.0.1:8766/. - License: AGPL-3.0-only. Independent project, not affiliated with the book's authors or O'Reilly.
Keywords: DDIA, Designing Data-Intensive Applications, distributed systems, system design interview, replication, sharding, consensus, interactive labs, Persian, Farsi, فارسی, طراحی سیستم.
Most distributed-systems notes stop at definitions. Most AI-platform repos start at infrastructure. This lab connects the two ends:
- Learn the foundations — 14 chapters of Designing Data-Intensive Applications (2nd Edition), each with interactive diagrams, three or four inline labs, a teacher-style walkthrough, an interview pack and worked solutions; about 45–105 minutes per chapter at 150 wpm.
- Practice defending decisions — a capstone workshop that turns those chapters into one coherent AI-platform design: requirements → estimates → ADRs → animated request flow → recovery drills → portfolio evidence.
- Stay honest about scope — everything proposed is labeled proposed; everything measured is labeled measured. No fake benchmarks, no implied production system.
What you can use today: the bilingual educational website, design workshop, calculators, architecture/UML diagrams and local animated walkthroughs. The platform APIs, workers, database, CDC, model serving, real evaluations and disaster-recovery automation are not implemented yet.
| 📚 14 bilingual chapters | Persian + English, each with an at-a-glance table, frequent interview questions, common mistakes and a 5-minute checklist; about 45–105 minutes at 150 wpm |
| 📊 160 interactive diagrams | Dataflows, lifecycles, UML and decision trees — every one followed by a step-by-step narration, as if a teacher stood at the board |
| 🔬 43 inline labs | Three short experiments in most chapters, four in chapter 6: pick a decision, step through events, replay the whole flow and see what survives a crash, retry or lag |
| 🔤 287 terms, 226 figures | Jargon words in a chapter are dotted; hover for a one-line definition, click for the full entry — a jargon-free everyday scene, an analogy, a generated diagram where one exists, the technical account with key numbers, then the usual trap |
| 🛠️ Exercise studio | Draw a design, press Run and watch packets flow, then get a verdict, a score, a reference and a step-by-step solution, all in your browser |
| 🧪 49 reviewed chapter exercises | Leveled, prioritized, with interview briefs — the other 35 are classic system-design problems, for 84 in the studio; plus a 2026 assessment & Senior/Staff path |
| 🏗️ Capstone: Own the Stack | One AI platform, five capabilities, fifteen ADRs with rationale, alternatives, validation and revisit triggers |
| 🧮 Editable estimates | Workload & cost arithmetic with 12 explicit assumptions and limits — change the numbers, see what breaks |
| 🛟 Recovery with reasons | Failure-specific RPO/RTO targets with derivation budgets and planned drills, not slogans |
| 🎭 Developer POV | A synthetic seven-scene journey through the proposed platform, including worker interruption and resume |
Every chapter has hands-on labs right after the section that explains the idea. Pick a decision (for example synchronous or asynchronous replication), advance one event at a time, or press Play whole flow to watch each scenario run to its outcome.
The exercise studio is a separate practice area for the 84 exercises (49 from the chapters, 35 classic problems such as a URL shortener or a chat system). Build a design on a canvas, press Run, and see packets flow along every edge, overloaded nodes drop requests, and a verdict card name the bottleneck. Then score it, compare with the exercise's reference design and open the step-by-step solution. The studio makes no AI or network call when it runs; saved work stays in your browser.
| Part | Where | Details |
|---|---|---|
| Inline labs | the end of each teaching section in every chapter | assets/concept-labs.js, 43 deterministic models with tests |
| Exercise studio | studio/index.html |
Studio docs: Run, verdict, scoring, walkthrough, deep links |
| Chapter exercise → studio | studio/index.html?exercise=ch8-ex4 |
Opens that exercise with its reference |
| # | Chapter | Core question | Diagrams |
|---|---|---|---|
| 01 | Trade-offs in data systems | Why do checkout, search and reporting need different tools? | 8 |
| 02 | Nonfunctional requirements | How do latency, failure tolerance and growth get measured? | 10 |
| 03 | Data models & query languages | Tables, documents, graphs or event logs — which fits? | 11 |
| 04 | Storage & retrieval | How is one order found fast and millions aggregated? | 10 |
| 05 | Encoding & evolution | How do old and new app versions keep talking? | 9 |
| 06 | Replication | How do copies converge — and where do conflicts come from? | 10 |
| 07 | Sharding | How is data split across servers without hot spots? | 10 |
| 08 | Transactions | Who gets the last seat — and how is that decided fairly? | 12 |
| 09 | The trouble with distributed systems | The response never arrived — did it happen or not? | 12 |
| 10 | Consistency & consensus | After the leader fails, how do nodes agree on the next one? | 13 |
| 11 | Batch processing | From raw files to a complete nightly report — reliably? | 15 |
| 12 | Stream processing | Duplicates, late events, live counts — how to stay correct? | 13 |
| 13 | A philosophy of streaming systems | How do derived views stay rebuildable and trustworthy? | 14 |
| 14 | Doing the right thing | Bias, surveillance, consent — what is the data for? | 13 |
Prefer the guided path? Open the roadmap on the live site ↗ · Exercise audit & study path ↗
| Step | Explore | What you get |
|---|---|---|
| 01 · Understand | Project overview | The developer, the problem, inputs/outputs and the first slice |
| 02 · Estimate | Workload & cost | Editable arithmetic, 12 assumptions and explicit limits |
| 03 · Decide | Architecture decisions | 15 ADRs with alternatives, rationale, validation and revisit triggers |
| 04 · Follow | Animated request flow | Trace a proposed request across the platform boundaries |
| 05 · Recover | RPO & RTO | Failure-specific targets, recovery budgets and planned drills |
| 06 · Experience | Developer POV | A synthetic seven-scene journey, including worker interruption and resume |
For interview context, browse the attributed evidence: one official exercise and seven candidate accounts, with limitations shown.
flowchart LR
DEV([AI-app developer]) --> GW[Model Gateway<br/>budgets · deadlines · adapters]
DEV --> CTX[Live Context<br/>versioned retrieval · CDC]
CTX --> RT[Durable Runtime<br/>persisted runs · retries · fencing]
RT --> INV[AI Investigator<br/>read-only · evidence + uncertainty]
RT --> EVAL[Evaluation & Release<br/>frozen versions · trials · promotion]
GW --> RT
CTX --> INV
| Capability | Proposed responsibility |
|---|---|
| Live Context | Versioned, authorized data; retrieval freshness, CDC and deletion guards |
| Durable Runtime | Persisted runs and steps, retries, ownership fencing and cancellation |
| AI Investigator | Read-only incident investigation with evidence and uncertainty |
| Evaluation & Release | Frozen versions, datasets, trials and evidence-led promotion |
| Model Gateway | Provider adapters, budgets, deadlines, usage and a later local-serving phase |
The design starts with a small end-to-end slice. A cited-answer app should later reuse the same core. Foundation-model training and a multi-GPU training scheduler are outside the first slice.
| Failure scenario | RPO objective | RTO objective | Claim boundary |
|---|---|---|---|
| Worker crash | 0 acknowledged state lost | 2 min | Database and disk survive |
| Database / disk loss | ≤5 min | ≤30 min | Synthetic pilot ≤10GB; independent backup + WAL |
| Whole-region loss | ≤15 min | ≤4 h | Cold cross-region recovery; current IAM |
| Derived retrieval index | 0 authoritative data lost | ≤4 h | Source intact; one-million-document scenario |
Selected design objectives, not measured results or hosting SLAs. Only the audience decision is accepted; technical ADRs remain proposed. Read the contracts · See the drill guide
Python 3.10+ is enough. No API key or database is required.
git clone https://github.com/Hurdadd/ddia-study-lab.git
cd ddia-study-lab
python3 -m http.server 8766 --bind 127.0.0.1Open localhost:8766. Fonts load from Google Fonts with local fallbacks. Calculators and animations make no model or platform API calls. The public deployment also includes Vercel Web Analytics: cookieless pageviews only (page URL, referrer, approximate country, device/browser), no cookies, no cross-site tracking, and no exercise answers or saved work. Motion is user-controlled, with pause, stepping, keyboard support and reduced-motion behavior.
Development & verification
Committed HTML works as-is. After editing the capstone sources:
python3 assets/build_final_project.py
python3 assets/check_publication.py
python3 assets/check_final_project.py
python3 assets/check_teaching_examples.py
python3 assets/check_solutions.py
python3 assets/check_exercise_audit.py
python3 assets/check_glossary.py
python3 assets/check_links.py
python3 assets/structcheck.py index.html final-project/index.html
python3 assets/build_site.py
python3 assets/check_publication.py --exportThe content gates fail on a lost core example, a duplicated example body, a missing worked solution, a broken internal link or fragment, and glossary drift.
The allowlisted public/ export excludes credentials, local history, review captures, generator state and tool caches. Frozen diagram exports and nine export/specification hash pairs are checked by SHA-256; Archify is optional for regeneration.
For browser checks, start the local server, then use Node.js and installed Chrome:
npm ci
npm run test:browserSet BASE_URL for another origin. For Playwright Chromium, run npx playwright install chromium and set PW_CHANNEL=chromium. Screenshots stay in the ignored review directory.
CI is supplied at .github/ci-templates/checks.yml and is currently inactive: enabling it requires a credential with workflow scope. See DEVELOPMENT for details.
Repository map
assets/ shared styles, scripts, generators and checks
ch*/ fourteen bilingual chapters, diagrams and inline labs
studio/ the offline exercise studio (assets/studio*.js, assets/studio-data.js)
final-project/ capstone, ADRs, estimates, recovery and evidence ledgers
docs/ development, recovery, deployment and third-party notices
.github/ contribution templates and the inactive CI template
| ✅ Implemented & usable | 🔧 Proposed, not built |
|---|---|
| 14 bilingual chapters, 160 diagrams, 43 labs, 49 reviewed chapter exercises, 84-exercise studio (49 + 35 classic) | Platform APIs, workers, database, CDC pipelines |
| 15 ADRs, estimates, recovery budgets, drill guide | Model serving, real evaluations, DR automation |
| Animated request flow & synthetic developer POV | Measured SLOs, benchmarks, production deployment |
Numbers carry units, formulas and assumptions — or they are labeled as open. Interview evidence separates the one official exercise from candidate accounts, with scope and limits attached. Industry articles are never presented as proof of an interview.
| Contribute | Understand the rules | Report a problem |
|---|---|---|
| Contributing | Code of conduct | Support |
| DCO sign-off | Governance | Security policy |
Keep proposals separate from implemented behavior and estimates separate from observations. Attribute company/interview claims and preserve uncertainty. Contributions require maintainer review and a Signed-off-by line under the DCO; there is no CLA or mandatory copyright assignment. Public contributions are welcome via issues and PRs.
Website and GitHub repository: public. The production site opens without Vercel login. Preview/generated deployment URLs retain Standard Protection. See deployment notes and changelog.
Original work is © 2026 hurdad ashouri, licensed under GNU AGPL-3.0-only. Preserve notices and comply with applicable source-sharing obligations when distributing or modifying covered work.
This is an independent, unofficial study project, not affiliated with or endorsed by the authors or O'Reilly. The study refers to Designing Data-Intensive Applications, 2nd Edition, by Martin Kleppmann and Chris Riccomini. Book, font, diagram-component and linked-account rights remain with their owners. See NOTICE and third-party notices. This independent project is not affiliated with O'Reilly or the companies mentioned in the evidence register.
Learn the trade-offs. Defend the decisions. Own the stack.

