Publish complete manifests, not files
Resumable upload and transcode DAG both write intermediate state, but watch API only exposes a validated manifestVersion.
YouTube CORE covers upload, resumable chunks, transcode orchestration, atomic publication, CDN delivery, and failure recovery. YouTube Top K FULL covers exact and approximate stream aggregation, materialized views, replay, late events, and stale view tolerance. Strava TRANSFER checks whether the mechanisms transfer to mobile activity ingestion.
Week 7 的关键词是 truth versus derived view: publication truth, view-count truth, activity truth, and stale-but-bounded projections.
Resumable upload and transcode DAG both write intermediate state, but watch API only exposes a validated manifestVersion.
View events are replayable; Top K is a derived view with watermarks, late-event policy, exact/approx choice, and freshness SLO.
Strava borrows replay/idempotency, but the mobile client owns live route/time while offline.
周概览只放项目首页;daily pages carry exact original titles and canonical anchors.
Full Chinese lecture/audio, Senior+/Staff English recall script and PDF, 45-minute adaptive mock, two deep dives, Bad/Good/Great, invariants, failure windows, recovery, metrics.
Complete direct links, compact Chinese explainer/audio, English recall outline, 25-35 minute attempt plus follow-up.
Blind-design prompt, delta, invalid assumptions, new bottleneck, follow-up artifact, script, and audio.
Only exact Ch11, Ch12, and Ch13 decision sections are assigned. No carpet reading.
| Day | Project question | Exact source | Design decision |
|---|---|---|---|
| Day 2 | YouTube transcode DAG 怎么重启不重做错误的阶段? | Ch11 - 工作流调度 | 把 transcode/split/manifest 建模为有依赖的 job graph;每步输出到对象存储并带 content address/version。 |
| Day 2 | worker 或机器故障后,哪些输出可以保留,哪些必须废弃? | Ch11 - 故障处理 | job attempt 带 idempotency key;只 publish manifest 指向已验证完整的一组 renditions。 |
| Day 4 | Top K 为什么不能每次查询现扫所有 view rows? | Ch11 - 数据流引擎 | 用数据流/批流引擎维护聚合,避免把查询路径变成海量 shuffle。 |
| Day 4 | 派生 Top K 和 CDN manifest 何时能对外服务? | Ch11 - 对外提供派生数据 | 把可服务数据作为派生输出发布;读路径只读稳定版本。 |
| Day 4 | Top K view event 可以 replay 吗,怎么不重复计算? | Ch12 - 重播旧消息 | Kafka/Flink replay 用 offset/checkpoint;聚合更新必须按 eventId/window/videoId 幂等。 |
| Day 3 | Top K 是实时算还是维护物化视图? | Ch12 - 维护物化视图 | 维护 per-window materialized view,查询只读最近完成的窗口或 bounded-staleness snapshot。 |
| Day 4 | 晚到 view event 如何影响 1 小时榜? | Ch12 - 处理滞留事件 | 用 watermark 和 allowed lateness;迟到过界后进入 correction/replay,不静默改旧榜。 |
| Day 3 | 1h/1d/1m 的窗口到底是什么? | Ch12 - 窗口的类型 | 面试先选 tumbling;如果要 sliding,再讨论增量和过期 decrement 的成本。 |
| Day 4 | 流处理器更新 DB 和 offset 为什么会双写风险? | Ch12 - 原子提交再现 | checkpoint、sink commit、offset advance 要形成可恢复边界;失败后不会既丢又重算。 |
| Day 2 | 重复 upload complete 或 duplicate view 如何处理? | Ch12 - 幂等性 | uploadSessionId、partNumber、eventId、operationId 进入唯一约束或去重状态。 |
| Day 4 | Flink state 或 materialized Top K 坏了怎么办? | Ch12 - 失败后重建状态 | 从 checkpoint 或事件日志重建,记录 replay lag 和 divergence。 |
| Day 7 | 批处理和流处理在 Week 7 怎么组合? | Ch13 - 批处理与流处理 | 历史回填用 batch,近实时 view/activity 用 stream;读端统一看派生视图。 |
| Day 7 | 派生状态为什么允许短暂陈旧? | Ch13 - 维护派生状态 | publication truth、view truth、activity truth 与 CDN/TopK/feed 派生视图分离。 |
| Day 7 | 重新处理旧事件时如何避免破坏当前线上榜单? | Ch13 - 应用演化后重新处理数据 | 重处理写新版本视图,验证后原子切换 alias/cache key。 |
| Day 7 | 缓存和物化视图 stale 到什么程度可接受? | Ch13 - 物化视图和缓存 | CDN manifest、TopK cache、activity feed 都需要 TTL/freshness/SLO,而不是假装强一致。 |
| Day 6 | 为什么 exactly-once 要说成端到端效果而不是 broker 魔法? | Ch13 - 数据库的端到端原则 | 链路每端都要 operation id、dedupe、reconcile;单个中间件承诺不够。 |
| Day 5 | 如何把重复请求压成一次操作? | Ch13 - 抑制重复 | client request id、upload chunk fingerprint、activity sample id、view event id 都是重复抑制键。 |
| Day 6 | approximate Top K 什么时候需要验证边界误差? | Ch13 - 数据流系统的正确性 | 近似计数只适合产品接受误差的榜单;rank 边界和纠错必须有抽样验证。 |
| Day 7 | 如何证明派生视图没有静默漂移? | Ch13 - 信任但验证 | 用源日志/事实表抽样重算并比较派生视图,发现 divergence 后 replay 或回滚 alias。 |
Every day keeps 08:50-10:55 system design, 14:30-16:15 exactly three NeetCode Trees slots, and 20:30-21:15 recall/Q&A/mock.
| Time | Week 7 invariant | Evidence |
|---|---|---|
| 08:50-10:55 | Attempt, exact source reading, one decision note, spoken close. | Daily pages list four bounded morning segments. |
| 14:30-16:15 | 3 x (30m solve + 5m evidence) = 105m. | 21 contiguous live NeetCode Trees slots. |
| 20:30-21:15 | English recall, Staff Q&A, mock, or repair. | Daily output and scorecard evidence. |
Week 7 only. Stop at READY_FOR_REVIEW.
把 YouTube 讲成 upload session -> original object -> processing DAG -> published manifest -> CDN delivery,而不是一个大文件下载服务。
进入完整覆盖 YouTube deep dives: adaptive bitrate processing, resumable uploads, large-scale upload/watch, plus speeding-up uploads and view-count tangent as bounded extras.
进入把 Top K 从 SQL ORDER BY 进化到 view-event stream, window aggregates, and materialized Top K view.
进入完整覆盖 Top K deep dives: caching/precompute, writes, query optimization, sliding windows, approximations, specialized DB tradeoffs.
进入先盲做 Strava,再比较 YouTube/Top K 的可复用与失效假设:activity truth lives on device first, then syncs to backend.
进入一场 45 分钟 YouTube adaptive mock with two deep dives, followed by 25-35 minute Top K attempt and one Strava transfer follow-up.
进入把 YouTube, Top K, Strava 收敛为一个机制地图:truth, derived views, replay, stale tolerance, idempotency, metrics.
进入The source map labels Week 7 as async model/media pipelines, but no official/original Applied AI source in the approved map changes this week's concrete classical decisions for upload state, transcode DAGs, publication, CDN, Top K aggregation, activity replay, or stale derived views. The radar is therefore omitted and recorded.
Evidence comes from current Hello Interview headings for YouTube, YouTube Top K, Strava, plus DDIA2 Ch11/12/13 sections bound to specific design questions.