WEEK 07 - 2026.09.07-09.13 - WRITER GATE

YouTube pipelines, Top K views, Strava transfer

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.

01 - MEDIA PIPELINE

Publish complete manifests, not files

Resumable upload and transcode DAG both write intermediate state, but watch API only exposes a validated manifestVersion.

02 - STREAM AGGREGATION

Serve materialized Top K

View events are replayable; Top K is a derived view with watermarks, late-event policy, exact/approx choice, and freshness SLO.

03 - TRANSFER

Client-owned activity truth

Strava borrows replay/idempotency, but the mobile client owns live route/time while offline.

项目角色

周概览只放项目首页;daily pages carry exact original titles and canonical anchors.

CORE

YouTube

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.

打开项目首页

FULL

YouTube Top K

Complete direct links, compact Chinese explainer/audio, English recall outline, 25-35 minute attempt plus follow-up.

打开项目首页

TRANSFER

Strava

Blind-design prompt, delta, invalid assumptions, new bottleneck, follow-up artifact, script, and audio.

打开项目首页

DDIA 决策地图

Only exact Ch11, Ch12, and Ch13 decision sections are assigned. No carpet reading.

DayProject questionExact sourceDesign decision
Day 2YouTube transcode DAG 怎么重启不重做错误的阶段?Ch11 - 工作流调度把 transcode/split/manifest 建模为有依赖的 job graph;每步输出到对象存储并带 content address/version。
Day 2worker 或机器故障后,哪些输出可以保留,哪些必须废弃?Ch11 - 故障处理job attempt 带 idempotency key;只 publish manifest 指向已验证完整的一组 renditions。
Day 4Top K 为什么不能每次查询现扫所有 view rows?Ch11 - 数据流引擎用数据流/批流引擎维护聚合,避免把查询路径变成海量 shuffle。
Day 4派生 Top K 和 CDN manifest 何时能对外服务?Ch11 - 对外提供派生数据把可服务数据作为派生输出发布;读路径只读稳定版本。
Day 4Top K view event 可以 replay 吗,怎么不重复计算?Ch12 - 重播旧消息Kafka/Flink replay 用 offset/checkpoint;聚合更新必须按 eventId/window/videoId 幂等。
Day 3Top K 是实时算还是维护物化视图?Ch12 - 维护物化视图维护 per-window materialized view,查询只读最近完成的窗口或 bounded-staleness snapshot。
Day 4晚到 view event 如何影响 1 小时榜?Ch12 - 处理滞留事件用 watermark 和 allowed lateness;迟到过界后进入 correction/replay,不静默改旧榜。
Day 31h/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 4Flink 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 6approximate 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.

TimeWeek 7 invariantEvidence
08:50-10:55Attempt, exact source reading, one decision note, spoken close.Daily pages list four bounded morning segments.
14:30-16:153 x (30m solve + 5m evidence) = 105m.21 contiguous live NeetCode Trees slots.
20:30-21:15English recall, Staff Q&A, mock, or repair.Daily output and scorecard evidence.

7 天执行

Week 7 only. Stop at READY_FOR_REVIEW.

MON - 2026-09-07

YouTube CORE: upload, publication state, and streaming HLD

把 YouTube 讲成 upload session -> original object -> processing DAG -> published manifest -> CDN delivery,而不是一个大文件下载服务。

进入
TUE - 2026-09-08

YouTube CORE: resumable upload, failed upload, transcode orchestration, CDN invalidation

完整覆盖 YouTube deep dives: adaptive bitrate processing, resumable uploads, large-scale upload/watch, plus speeding-up uploads and view-count tangent as bounded extras.

进入
WED - 2026-09-09

YouTube Top K FULL: all-time and tumbling-window HLD

把 Top K 从 SQL ORDER BY 进化到 view-event stream, window aggregates, and materialized Top K view.

进入
THU - 2026-09-10

YouTube Top K FULL: stream aggregation, late events, approximate/exact materialized views

完整覆盖 Top K deep dives: caching/precompute, writes, query optimization, sliding windows, approximations, specialized DB tradeoffs.

进入
FRI - 2026-09-11

Strava TRANSFER: blind activity ingestion, offline replay, stale derived views

先盲做 Strava,再比较 YouTube/Top K 的可复用与失效假设:activity truth lives on device first, then syncs to backend.

进入
SAT - 2026-09-12

Adaptive mock: YouTube CORE plus Top K pressure round

一场 45 分钟 YouTube adaptive mock with two deep dives, followed by 25-35 minute Top K attempt and one Strava transfer follow-up.

进入
SUN - 2026-09-13

Week 7 synthesis: replay, derived views, idempotency, operations gate

把 YouTube, Top K, Strava 收敛为一个机制地图:truth, derived views, replay, stale tolerance, idempotency, metrics.

进入

Applied AI radar decision

OMITTED

No genuinely matched official/original AI reading

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.

ACCEPTED SOURCES

Hello Interview + DDIA2 exact anchors

Evidence comes from current Hello Interview headings for YouTube, YouTube Top K, Strava, plus DDIA2 Ch11/12/13 sections bound to specific design questions.

Artifacts

Local study materials
Detailed lecture notes, audio, recall scripts, PDFs, Staff Q&A, and mock packs are archived locally and are intentionally not published on this site.