An open curriculum on scalable probabilistic systems — the sketches, protocols, and tradeoffs behind systems that answer “probably correct, much faster” instead of “exact, eventually.”
Learn online: chaitra.pages.dev · Browse the catalog: /catalog
At large scale, exact answers are often too slow, too large, or too coordinated. Production systems deliberately use probability: Bloom filters, HyperLogLog, gossip, power-of-two choices, approximate caches, rate limits, LLM token distributions, and more.
Chaitra is one repository that holds:
- Deep narratives — each topic is a folder under
topics/with aREADME.md(math, diagrams, where it shows up in the wild). - Reference code — Python and/or Rust where we have implemented the idea (e.g.
topics/BLOOM_FILTERS/bloom_filter.py). - A public website — static Astro app in
website/that syncs those READMEs, hosts interactive labs, and runs in-browser code (Pyodide, WASM where available).
We are building a guided path, not a wiki dump:
| Layer | Where it lives | What you get |
|---|---|---|
| Story | topics/*/README.md → synced to the site |
Intuition, formulas, Mermaid diagrams |
| Lab | website/src/components/ + topic MDX |
Sliders, simulations, play/pause |
| Code | Repo sources + website Code workbench |
Edit Python in the browser; read Rust; WASM demo on Bloom filters |
| Source of truth | This repo on GitHub | Clone, test, extend implementations |
The long-form “textbook” content stays in topics/. This root README explains the project; each topics/TOPIC_NAME/README.md explains that topic.
flowchart TB
subgraph topicsDir [topics/]
BF[BLOOM_FILTERS/]
HLL[HYPERLOGLOG/]
MORE[50+ other topics/]
end
subgraph each [Per topic]
RM[README.md]
CODE[.py / .rs optional]
end
subgraph site [website/]
SYNC[sync:readme · sync:code · catalog]
PAGES[chaitra.pages.dev]
end
BF --> RM
BF --> CODE
HLL --> RM
MORE --> RM
RM --> SYNC
CODE --> SYNC
SYNC --> PAGES
- One folder per topic — under
topics/,SCREAMING_SNAKE_CASE(e.g.topics/COUNT_MIN_SKETCH/) with at least aREADME.md. - Website slugs — kebab-case URLs (
/topics/count-min-sketch) generated bywebsite/scripts/generate-catalog.mjs. - Catalog status —
golden,live,preview,readme-only,coded(see website README).
Flagship starting point: Bloom filters — full story, lab, Python + Rust + WASM code workbench.
Traditional systems optimize for: same input → same output.
Probabilistic systems at scale optimize for: high-confidence answer, much lower cost — memory, coordination, latency, or compute.
That shows up as:
- Probabilistic data structures — Bloom filters, HyperLogLog, Count–Min Sketch
- Weaker coordination — gossip, eventual consistency, probabilistic load balancing
- Approximate policies — cache admission (TinyLFU), RED in networking, rate limiting
- ML / LLM stacks — token probabilities, MoE routing, large-scale inference
Each topic folder in topics/ goes deeper on one slice of that landscape. The site’s learning path orders a beginner-friendly subset; the catalog lists everything we track.
chaitra/
├── topics/ # All curriculum modules (README + code)
│ ├── BLOOM_FILTERS/
│ ├── HYPERLOGLOG/
│ └── …
├── website/ # Astro site → Cloudflare Pages
│ ├── src/content/topics/ # Per-slug MDX + synced readme-body.md
│ └── README.md # Build, deploy, contributor details
├── docs/
└── README.md # You are here
- Open chaitra.pages.dev and pick a topic from the catalog or learning path.
- Read Story, try the Lab, experiment in Code where available.
- Clone this repo and open the matching folder (e.g.
topics/BLOOM_FILTERS/) to run Python or Rust locally.
git clone https://github.com/07AMIT10/chaitra.git
cd chaitra/topics/BLOOM_FILTERS
python bloom_filter.pyAdd or improve a topic
-
Edit or create
topics/YOUR_TOPIC/README.md(and add.py/.rsif you have reference code). -
If the topic should appear on the site, add or update
website/src/content/topics/<slug>/(index.mdx, optionalcode.mdx, lab component). -
From
website/:npm run sync:readme # after README changes npm run sync:code # after Rust snippets used in Code tabs npm run catalog # refresh topics.json npm run build
-
Open a PR — Cloudflare can preview
website/changes.
Site development, deploy, CSP, WASM: see website/README.md and website/DEPLOY-CLOUDFLARE.md.
CI: pushes touching website/** or topics/** run the site build via .github/workflows/website-ci.yml.
Every module with a README.md lives under topics/. Highlights with labs and/or code on the site:
| Topic folder | Site |
|---|---|
topics/BLOOM_FILTERS/ |
/topics/bloom-filters |
topics/HYPERLOGLOG/ |
/topics/hyperloglog |
topics/COUNT_MIN_SKETCH/ |
/topics/count-min-sketch |
topics/CONSISTENT_HASHING/ |
/topics/consistent-hashing |
topics/GOSSIP_PROTOCOLS/ |
/topics/gossip-protocols |
For the full list and status badges, use the catalog (generated from topics/).
Early but active: many topics have rich READMEs; labs and code workbench coverage grow topic by topic. Issues and PRs welcome.
- Live site: https://chaitra.pages.dev
- Curriculum index: topics/README.md
- Website docs: website/README.md
- Deploy: website/DEPLOY-CLOUDFLARE.md