Lab
交互式的 lab 与小玩具 —— 一些为了搞懂更大的东西而做的小东西。 一切都完全在你的浏览器里运行。
-
Quaternion Rotation Lab
一个交互式 3D 教学 lab,讲 quaternion 旋转、SLERP、SU(2) double cover、Pauli matrices 以及 Bloch sphere 上的运动。
打开 → -
Sandbox Physics · 物理实验
物理仿真与量子实验已经迁移到独立站点 Sandbox Physics,继续提供中英文交互式学习体验。
打开 → -
URL Shortener Lab
把一个读多写少的 URL shortener 从单库一路成长到 cache-aside 读取、code generation 策略、sharded KV store,以及多 region 的 edge redirect。
打开 → -
Rate Limiter Lab
随着正确性要求提高,把一个对 latency 敏感的 rate limiter 从本地计数器迁到 Redis/Lua、sharding,再到全局 quota service。
打开 → -
News Feed Lab
看一条社交 timeline 在 fan-out-on-write 和 fan-out-on-read 之间来回切换,等某个大 V 的粉丝把 write amplification 炸开后再转向 hybrid。
打开 → -
Chat / Messaging Lab
把实时 chat 从单台 server 扩到 connection-gateway 集群、群组 fan-out、持久化的离线 inbox,以及多 region 路由。
打开 → -
Notification System Lab
用 queue、dedup、rate limit、retry 和 dead-letter queue,把多渠道 notification pipeline 和慢吞吞的 push/email/SMS provider 解耦。
打开 → -
Search Autocomplete Lab
在紧绷的 latency 预算下,用 trie、热门前缀 caching、prefix sharding 和一条 streaming 日志聚合 pipeline,吐出 top-k 的 typeahead 候选。
打开 → -
Job Board Search Lab
从 PostgreSQL indexes 起步;用 cache-miss QPS、candidate scoring 和高级搜索需求判断 conditional cache 与 Elasticsearch/OpenSearch 什么时候真正值得加入。
打开 → -
YouTube Like Counter Lab
从 idempotent user-video reaction 起步;用 retry、热门视频 skew、counter shards 和 freshness 预算决定何时拆出异步 aggregate 与 count cache。
打开 → -
Web Crawler Lab
把 crawler 从单个循环成长到分布式 frontier,配上 politeness 调度、Bloom filter 去重、DNS caching 和 sharded 内容存储。
打开 → -
Video Streaming Lab
随着上传量、观众数和片库规模增长,把视频平台拆成一条异步 transcode pipeline 和一条由 CDN 分发的播放链路。
打开 → -
File Sync Lab
搭一个 Dropbox 式的 sync 服务,用 content-addressed chunking、dedup、独立的 metadata service、变更通知和冲突处理。
打开 → -
Ride Sharing Lab
用内存里的地理空间索引、matching、行程状态和 geo-sharding,扛住司机 GPS 更新的洪流和高速的最近司机查询。
打开 → -
Key-Value Store Lab
跟着一个 Dynamo 式的 key-value store 从单节点走到 consistent-hash ring,配上 replication、可调的 R/W quorum,以及跨 region 的 anti-entropy。
打开 → -
Payment Ledger Lab
正确性优先:在考虑横向扩展之前,先搞定 idempotency key、double-entry 的 append-only ledger、ACID 写入、异步 PSP 集成和对账。
打开 → -
Google Docs Lab
看协同文档后端在“并发编辑的排序”而非裸流量成为关键约束时,会变成什么形状。
打开 → -
Online Judge Lab
扩展一个 LeetCode 式的 online judge,真正的成本在 sandbox worker 的经济账,而不是 API 请求量。
打开 → -
Ad Click Tracking Lab
看一条广告 click/impression pipeline 从单个 collector 长成分区 streaming —— 流量峰值、新鲜度和计费级持久性逼着每一步往前走。
打开 → -
Recommendation System Lab
把一个 recommender 从热门榜单成长到 two-tower 的 ANN retrieval、由 feature store 喂数据的 ranking model,以及实时的多阶段漏斗。
打开 → -
Feature Store Lab
把 feature 拆成 online 和 offline 两套 store,保证 training/serving parity、point-in-time 正确的训练 join,以及大规模下的 streaming 新鲜度。
打开 → -
Model Serving Lab
在 p99 预算下,把一个 model endpoint 从单机带到 dynamic batching、GPU autoscaling、带 canary 发布的版本化 registry,以及多模型打包。
打开 → -
Fraud Detection Lab
从静态规则走到实时 streaming feature 和紧绷决策预算内的同步 model scoring,再加上 label 反馈的重训 loop 和 graph feature。
打开 → -
ML Training Pipeline Lab
把 notebook 里的训练变成可复现的 pipeline,配上 data versioning、distributed training、experiment tracking、model registry 和自动重训。
打开 → -
LLM Pretraining Infra Lab
把 LLM pretraining 从单卡 GPU 扩到 data parallelism,再为放不下单卡的模型上 tensor + pipeline(3D)parallelism,配上 activation checkpointing 和容错 checkpoint。
打开 → -
LLM Inference Lab
把 token 生成从单卡 GPU 一路做到 KV-cache batching、带 paged attention 的 continuous batching、tensor-parallel sharding,以及 prefill/decode 分离。
打开 → -
RAG System Lab
用 vector retrieval 取代往 prompt 里硬塞:把文档 chunk 并 embed、做 ANN 的 top-k 检索、reranking、hybrid search、caching,以及在 context window 内拼装。
打开 → -
RLHF Pipeline Lab
走一遍 alignment pipeline:从 supervised fine-tuning 到 reward model,再到生成 throughput 成为瓶颈的 PPO rollout loop,外加 DPO 这条替代路线。
打开 → -
Agent Orchestration Lab
把一个 LLM agent 从单次 tool call 搭到带 memory 和 planning 的 reason-act loop、并行的 sandbox 工具执行,以及带 tracing 的多 agent 编排。
打开 →