You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: PLAN.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -393,6 +393,16 @@ flowchart TD
393
393
-**Build & bench:** measure the interference first — run topic 22's YCSB-style write workload concurrently with full-column scans on one engine and chart p99-write vs scan-throughput; then split: maintain a columnar replica from your WAL/changelog and re-measure both sides + the freshness lag; implement learner-read semantics (reads wait for a replication watermark) and price the wait.
394
394
-**Capstone M32:** HTAP FalkorDB — the M27 changelog feeds a read-optimized analytical replica (columnar property store from M12 + stable GraphBLAS matrices without delta overlays from M20); route topic-24 `CALL algo.*` and heavy aggregations to it with a declared freshness bound (`AS OF` watermark), keep OLTP mutations on the primary; bench interference eliminated vs the single-copy engine, TiDB-style.
395
395
396
+
## 33. Temporal Graphs
397
+
398
+
**Why:** M30 promises time-travel over graph history (`AT TIME t`), but storage is only half of it — a graph with time is a *different mathematical object*: reachability stops being transitive, "shortest path" splits into four different questions, and a static condensation of a temporal graph gives confidently wrong answers. This topic supplies the semantics, the algorithms, and the storage designs (anchor+delta, event-log-first) that make graph history queryable. An open frontier for FalkorDB.
399
+
400
+
-**Concepts:** temporal vs dynamic graphs (time as *data* you query vs time as *change* you absorb — topic 13 solved the latter); the contact model — edge = (u, v, t, λ) — vs interval edges [t_start, t_end); valid time vs transaction time (bitemporal); **time-respecting paths** and why condensing to a static graph over-reports reachability; the four minimum temporal paths (earliest-arrival, latest-departure, fastest, shortest — Wu et al.) and their one-pass streaming algorithms; δ-temporal motifs (ordered event patterns within a window); storage designs — anchor+delta (AeonG: periodic snapshots + change deltas, retrieval starts at the nearest anchor), event-log-first (Raphtory: per-vertex temporal adjacency, windowed views), and the free lunch nobody eats: topic 8's MVCC begin_ts/end_ts already IS a transaction-time temporal store — GC is the only thing destroying history; temporal query surface: `AT TIME` / `BETWEEN`, windowing, T-Cypher-style path predicates.
401
+
-**Read code:** raphtory (Rust — temporal adjacency lists, windowed graph views, the `at()`/`window()` API), AeonG's memgraph-based implementation read as a spec against topic 13's vertex/delta structs.
402
+
-**Papers:** "Path Problems in Temporal Graphs" (Wu et al., VLDB'14 — read first, it breaks the static intuition), "Motifs in Temporal Networks" (Paranjape/Benson/Leskovec, WSDM'17), "AeonG: An Efficient Built-in Temporal Support in Graph Databases" (Hou et al., VLDB'24), "Temporal Networks" (Holme & Saramäki, Physics Reports 2012 — the survey, skim for vocabulary).
403
+
-**Build & bench:** generate a temporal edge stream; measure how wrong static reachability is on it (condensed-graph false positives — the lane-1 number); implement one-pass earliest-arrival and bench against a (node, time)-state Dijkstra oracle; build a snapshot+delta time-travel store and price checkpoint spacing vs `AT TIME` reconstruction latency.
404
+
-**Capstone M33:** temporal pattern matching over M30's history store — time-respecting `MATCH` (edge timestamps must be non-decreasing along a matched path, with a `WITHIN δ` constraint), `AT TIME`/`BETWEEN` graph views, earliest-arrival as a path function; bench temporal queries against the naive alternative (re-run the static query on a reconstructed snapshot per timestamp).
| M33 time-respecting MATCH + AT TIME/BETWEEN views + temporal path functions | 33 | todo |
78
80
79
81
## Session log
80
82
81
83
<!-- newest first: date — what was done -->
84
+
- 2026-07-22 — **topic 33 Temporal Graphs added** (new topic, added to PLAN.md this session): study guide (**the static-condensation lie measured** — bench lane 1 run: 2000 nodes, contacts uniform over a 10K-tick horizon, static BFS vs time-respecting reachability for 20 sources: at 4K contacts static claims 25,031 reachable pairs but only 137 have a time-respecting witness = **99.5% false positives**, falling 97.5% → 56.9% → **0.0% at 64K contacts** where temporal saturates to all 39,980 static pairs — the transition is sharp, static reach is the T→∞ limit; contact (u,v,t,λ) model + valid/transaction/bitemporal axes ASCII; reachability-is-not-transitive so "shortest" splits into earliest-arrival/latest-departure/fastest/shortest; storage-menu table snapshot-per-t / event-log-first-Raphtory / anchor+delta-AeonG / MVCC-as-history keyed on AT-TIME cost + anchor/delta mermaid), 4 reading guides (Wu et al. VLDB'14 — condensing lies, four minima that need four algorithms, Dijkstra's subpath invariant dies to a cheap-prefix-misses-the-bus counterexample, one-pass O(n+M) earliest-arrival over a time-sorted stream in Rust, dominance lists for fastest/shortest, time-expanded O(M) DAG as the materialized-view alternative; Paranjape/Benson/Leskovec WSDM'17 — δ-temporal motifs, the 36-motif derivation, window-scan DP with cnt[i][j] fragment counters and the expire-shortest-first/insert-longest-first correctness orders, stars-cheap-triangles-O(m√m), blocking-vs-non-blocking fingerprints; AeonG VLDB'24 verified against arXiv:2304.12212v2 — per-VERSION lifespan ω in transaction time, FOR TT AS OF/FROM..TO scoped to MATCH, VP/VE/EP three-clocks split, GC-as-migration Algorithm 1 riding the reaper thread = the 9.74% headline, KV SkipList keys type+Gid+ω with A/D anchor/delta bit, adaptive anchoring Eq 1 three bands, legal check Eq 2 + both-store consults, 5.73× storage / 2.57× latency numbers; Raphtory code-read on fresh clone with 8 verified anchors — EventTime(i64,usize) tiebreaker timeindex.rs:28 solving exactly Wu's λ=0 tie-order problem in the type system, TimeIndex/TCell size-adaptive enum ladders, TPropCell time→offset into columnar PropColumn, WindowedGraph derives-Copy = BETWEEN as a zero-copy lens + TimeOps::window composing on every view type, db4 segments as the batch-into-arrays correction; caught stale name: TimeIndexEntry renamed EventTime), experiments crate compiles: events.rs PROVIDED (gen_contacts λ=1 sorted, static_reachable the-liar, earliest_arrival_oracle as deliberately-Bellman-Ford fixpoint so lane 2's one-pass speedup is a measurement not a tautology, replay_at_time naive AT-TIME oracle — 3 provided tests pass) — temporal_reach.rs (one-pass earliest_arrival, matches-oracle-on-3-random-streams + respects-start-time + λ=0-chains contracts) and snapshot.rs (AnchorDeltaStore append/at_time/replay_len, matches-full-replay + anchor-spacing-bounds-replay<every + dense-vs-sparse contracts) are `todo!()` stubs — 6 tests fail as todo panics; temporal_bench lane 1 RUN (table above), lanes 2 (one-pass vs fixpoint throughput 50K/200K/800K) and 3 (AT-TIME p50/p99 + replay_len vs anchor spacing 1K/10K/100K/∞) armed behind catch_unwind; notes.md predicts lanes 2-3 + records the lane-1 surprise (predicted 30-50% false positives, measured 99.5%); M33 log: temporalPath() defaults earliest-arrival, time-respecting MATCH = non-decreasing timestamps + WITHIN δ, storage choice (anchor+delta over M30 vs MVCC-as-history) pending lane 3's 2×-p99 crossover, before-shot = lane 1's column reproduced by static MATCH on temporal data. Guide-writing workflow inverted after subagent sandbox denials (no WebFetch/clone/read-outside-cwd): main session cloned Raphtory, read the AeonG PDF, verified every anchor and number, then a restricted agent wrote markdown from supplied facts only. Cloned raphtory.
82
85
- 2026-07-15 — **step-by-step concept format rolled out to all 186 reading guides** (topics 0-1 were the pilot, commit b309537, after feedback that the self-contained chapters were "still hard to learn"): every guide now builds its concepts before pointing at the material — H1 + framing lead kept, then `## The problem in one sentence` (plain language, one concrete number), then `## The concepts, step by step` with 4-8 `### Step N — <concept>` sections (first sentence defines the concept assuming zero DB-internals background, then a real-numbers example / ASCII diagram / the guide's existing code sample, then why-it-matters; each step uses only terms defined in earlier steps, terms of art defined parenthetically at first use), then the navigation section ("How to read the paper (with the concepts in hand)" for papers, "Where each step lives in the code" with anchors grouped by step for code reads), Questions/Takeaway/References verbatim at the end; all existing assets (diagrams, code samples, file:line anchors, tie-backs) preserved and reorganized, H1 titles unchanged so SUMMARY.md links held. Executed by 17 parallel agents (2-3 topics each; two stalled mid-batch — topics 03 and 09 refinished by follow-up agents); exemplars hand-written first (reading-drepper.md for paper reads, reading-turso-btree.md for code reads). Verification: all 186 guides pass structure checks (≥4 steps, exactly one problem statement and References), 185 SUMMARY.md link titles match on-disk H1s with 0 mismatches, all 49 mermaid diagrams parse under mermaid 11.6.0 (jsdom harness), fence-and-backtick-aware angle-bracket scan clean (2 false positives from multi-line backtick spans), mdBook build green.
83
86
- 2026-07-12 — **restructure rollout: all 179 remaining reading guides across topics 00-25 and 27-32 rewritten as self-contained chapters** (topic 26 was the pilot, previous entry), executed by 8 parallel agents (4 topics each) against the same spec: concept-first H1 titles replacing "Reading guide — ...", Sources blocks replaced by 2-4 sentence framing leads, one inline Rust-ish code sample of the core algorithm added where the guide lacked one (skips documented for pure surveys / guides already carrying equivalent code), all existing content kept (diagrams, line-anchor tables, questions, tie-backs), `## References` appended with Papers (arXiv) + Code (GitHub) links carrying the old reading advice, filenames unchanged to avoid link churn; the 32 topic READMEs' guide lists updated to the new titles; one agent (topics 16-19) hit context limits with 2 files left — reading-umbra-tidy-tuples.md (retitled "Umbra & copy-and-patch: the war on compile latency" + copy-and-patch memcpy/patch-holes sample + References) and reading-sqlite-vdbe.md (References) finished by hand; SUMMARY.md link titles regenerated centrally by script from the actual on-disk H1s rather than agent reports (179 updated); verification: zero old-style H1s, zero Sources blocks, zero guides missing References, fence-and-backtick-aware bare-angle-bracket scan across all 186 guides found one genuine hazard (`HashMap<fd, handler>` in topic 7's ae guide, backticked), mdBook build green. The whole book now reads as chapters instead of pointers.
84
87
- 2026-07-12 — book-quality pass, three moves: (1) paper audit against dbscholar's citation-PageRank ranking (rmarcus.info — pulled the underlying data.json, 11,867 SIGMOD/VLDB/CIDR/PODS papers) — resources/papers.md gains a "Modern systems & directions" section and 6 topic READMEs gain "Further references" (Kung-Robinson OCC '81, Calcite, Spark SQL, Kipf/Neo/Bao learned optimization, Photon, Velox, GAMMA, Dremel, Lakehouse+Delta Lake, MillWheel, CockroachDB); (2) all `~/repos/...` code references linkified to their GitHub repos (scripted, fence-aware: 143 links across 115 files) so the online book's code pointers resolve; (3) **restructure demo on topic 26** — all 7 reading guides rewritten as self-contained chapters: concept titles ("HyperLogLog: count distinct in 12 KB" not "Reading guide — ..."), framing lead instead of a Sources block, an inline Rust code sample of each core algorithm (HLL add/merge + Ertl count skeleton, blocked-bloom 6-probe loop with golden-ratio remix, cuckoo kick loop with the XOR involution, PGM shrinking-cone add_point, roaring galloping intersect, BRIN one-sided range prune, Morton interleave64 magic masks), and a "## References" section at the bottom (papers with arXiv links, code with GitHub links); filenames kept (`reading-*.md`) to avoid link churn; SUMMARY.md + README titles updated; mdBook build verified locally (mdbook-mermaid install + build green). If the format lands, roll it out to the other 32 topics.
0 commit comments