Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Progress

Two different things get tracked here, and conflating them is misleading:

  • Package — does topics/NN-name/ exist and hold up? That means a study guide, four to seven reading guides, notes.md, and an experiments crate whose provided lane runs and whose numbers are recorded. All 58 are built; ./verify.sh re-derives every one of their measured lanes.
  • Studied — have I actually worked through the material and the two exercise lanes? That is a much smaller number, and it is the honest one. todo here does not mean the topic is missing; it means the exercises are still exercises.

Status values: todo → in progress → done. A takeaway lands when Studied is done.

#TopicPackageStudiedTakeaway
0The Performance ToolboxdonedoneBenchmarks lie by default: my own cache_ladder measured its own cache footprint until the walker carried state; flamegraph showed 21% of HashMap lookup time is SipHash; DRAM ladder verified at ~1/5/100 ns.
1Storage Engine Landscape: B-Tree vs LSMdonein progress
2In-Memory Structures: Hash Tables, Skip Lists, Triesdonetodo
3B-Tree Internals & Paged Storagedonetodo
4LSM-Tree Deep Divedonetodo
5Durability: WAL, fsync, Crash Recoverydonetodo
6Buffer Pool & Memory Managementdonetodo
7Networking, Protocols & Event Loopsdonetodo
8Transactions & MVCCdonetodo
9Concurrency: Latches, Lock-Free & Epochsdonetodo
10Query Engines I: Parsing, Planning, Optimizationdonetodo
11Query Engines II: Execution Modelsdonetodo
12Columnar Storage & Analyticsdonetodo
13Graph Enginesdonetodo
14Vector Searchdonetodo
15Replication, Consensus & Distributiondonetodo
16Testing & Correctness Engineeringdonetodo
17SIMD & Hardware-Conscious Data Processingdonetodo
18GPU Acceleration for Databasesdonetodo
19JIT & Query Compilationdonetodo
20Sparse Linear Algebra & GraphBLAS Internalsdonetodo
21Formal Methods & Verificationdonetodo
22Standard Benchmarks: TPC-H, TPC-C, YCSB, LDBCdonetodo
23Full-Text Search & Inverted Indexesdonetodo
24Advanced Graph Algorithms & Analyticsdonetodo
25Graph Neural Networks & Graph MLdonetodo
26Indexing & Probabilistic Data Structuresdonetodo
27Streaming & Incremental View Maintenancedonetodo
28Cloud-Native & Disaggregated Storagedonetodo
29Distributed Transactionsdonetodo
30Time-Series Enginesdonetodo
31CRDTs & Multi-Master Replicationdonetodo
32HTAP Architecturesdonetodo
33Temporal Graphsdonetodo
34Debugging & Production Diagnosisdonetodo
35Overload Control & Resource Governancedonetodo
36Sharding, Partitioning & Rebalancingdonetodo
37Distributed Query Executiondonetodo
38GraphRAG & Agent Memory (graph use case 1/6)donetodo
39Fraud Rings & Identity Graphs (graph use case 2/6)donetodo
40Security & Attack Graphs (graph use case 3/6)donetodo
41On-Chain & Crypto Analytics (graph use case 4/6)donetodo
42Recommendations & Social Graphs (graph use case 5/6)donetodo
43Network & IT-Ops Dependency Graphs (graph use case 6/6)donetodo
44E-graphs as a Database: Relational E-matching & egglogdonetodo
45Async I/O & Modern SSDs: io_uring, Out-of-Place Writes, and When They Helpdonetodo
46Graph Queries on Relational Engines: SQL/PGQ, Factorized Execution & Path-Query Planningdonetodo
47Semi-join Reduction in Practice: Yannakakis, Predicate Transfer & Bitmap Filtersdonetodo
48Memory Tiering: CXL, Disaggregated Memory & Placementdonetodo
49Open File & Table Formats: Parquet’s Successors, Iceberg/Delta/DuckLake, and Transactions on Object Storagedonetodo
50LLM-Era Query Processing: Semantic Operators, Text-to-Query, and Their Costdonetodo
51Dynamic Graph Storage: A CSR That Takes Writesdonetodo
52Graph Reordering & Compression: Bytes per Edge, and Why Vertex IDs Are the Leverdonetodo
53Cardinality Estimation for Graph Patterns: Where Multi-Hop Estimation Diesdonetodo
54Main-Memory Join Algorithms: Hash, Radix-Partitioned & Sort-Mergedonetodo
55Datalog Engines: Recursion as Joins and as Sparse Algebradonetodo
56Memory Allocators for Database Workloadsdonetodo
57Sorting at Scale: Normalized Keys, Radix Sort & Collationdonetodo

Capstone milestones (falkordb-rs-next-gen from scratch)

MilestoneDepends on topicAccept whenStatus
M0 workspace + bench harness + reference baselines0capstone/baselines/run.sh regenerates both engines’ JSON and summarize.py reproduces BASELINES.md’s tablesdone — workspace + workload gen + smoke bench + BASELINES.md (C FalkorDB v4.22.2 @ 7b61f511d + Rust FalkorDB v6.0.3 @ c937aa4fa, median+p99+memory, 2026-10-26)
M1 storage-backend abstraction1one storage test suite passes unchanged against an in-memory and a file backend through the same traittodo
M2 attribute store + string pool + datablocks2seeded property round-trip of 10K entities is lossless; resting used_memory at 1M nodes at or below C’s 60.1 MiB (BASELINES.md)todo
M3 B+tree backend (properties + range indexes)3range scans equal a sorted-Vec oracle under seeded inserts and deletes; point-lookup p99 recorded beside topic 3’s btree_baseline at the same sizetodo
M4 LSM backend + backend shootout4M1’s suite passes on the LSM backend; space, read and write amplification reported beside topic 1’s engine-shootout numberstodo
M5 WAL + crash recovery5every one of 1,000 seeded crash points recovers every acknowledged commit and nothing unacknowledged (topic 16’s crash-matrix method)todo
M6 buffer pool6pool p99 below mmap p99 on topic 6’s pool_vs_mmap workload with eviction activetodo
M7 RESP server (GRAPH.QUERY wire-compatible)7falkordb-py against the capstone server reproduces test_return’s 86–109 µs floor (BASELINES.md); then an open-loop HdrHistogram p99todo
M8 MVCC copy-on-write graph8a snapshot-isolation checker finds no anomaly over 10K seeded transactions; the read-heavy mix beats topic 8’s global-mutex txn_bench rowtodo
M9 threadpool + parallel execution9throughput does not fall from 1 to all cores on topic 9’s scaling workload — the global mutex there scales backwardstodo
M10 Cypher parser + binder + planner10openCypher TCK pass rate recorded per commit (M16 runner); every LDBC SNB query (M22) parses and planstodo
M11 vectorized runtime11results equal the M13 tuple-at-a-time path; rows/s beats topic 11’s Volcano lane on the same querytodo
M12 columnar attribute storage12column scan GB/s recorded against topic 12’s scan_bench memory-bandwidth floor; results equal the row storetodo
M13 naive adjacency graph core (baseline)13engine-side create throughput beats C and delete beats Rust, after the ~0.1 ms RESP floor; 1M-edge load peak under C’s 886 MiB used_memory_peak (BASELINES.md)todo
M14 vector index + distance kernels14recall@10 ≥ 0.95 at a QPS above topic 14’s brute-force floor on the same vectors; filtered queries equal brute force with the filter appliedtodo
M15 replication → Raft15a linearizability checker over seeded partitions and leader kills on 3 nodes finds 0 violations and 0 lost acknowledged writestodo
M16 openCypher TCK runner + DST + fuzzing16TCK runner in CI with the pass rate tracked; any DST failure reproduces from its seed alonetodo
M17 SIMD kernels17each SIMD kernel beats the autovectorized one at every selectivity of topic 17’s simd_bench, with identical outputtodo
M18 GPU backend (experimental)18GPU path chosen only above the crossover topic 18’s gpu_bench measures; output equals the CPU pathtodo
M19 Cypher expression JIT19JIT output equals the interpreter on every TCK expression scenario; JIT chosen only past the compile break-even topic 19 measurestodo
M20 sparse-matrix/delta-matrix core (the heart)20every query equals M13’s output; match_* at the better of C and Rust at median and p99 (BASELINES.md); SpMV GB/s recorded beside topic 20’s kerneltodo
M21 TLA+ spec + Lean invariant proof21TLC checks the WAL and MVCC spec with no invariant violation; the Lean proof builds with no sorrytodo
M22 LDBC suite + 3-way FalkorDB shootout22LDBC SNB Interactive runs on capstone, C and Rust FalkorDB; a per-query median and p99 three-way tabletodo
M23 full-text index + hybrid search23BM25 top-k identical to topic 23’s exhaustive-scoring lane and faster than ittodo
M24 algorithm library as Cypher procedures24PageRank, WCC and triangle counts equal topic 24’s oracles on RMAT and uniform graphs; procedure time recorded against C FalkorDB’stodo
M25 GNN embeddings pipeline + GraphRAG queries25embeddings separate SBM blocks by the cosine margin topic 25’s test demands (> 0.2); a hybrid vector + pattern query is one round triptodo
M26 MVCC secondary indexes + bloom + HLL count path26Bloom false-positive rate within its configured target; HLL count within its stated standard error; an MVCC index never returns an invisible version (property test)todo
M27 standing Cypher queries (incremental results)27standing-query results equal full recompute after every batch; per-batch cost below topic 27’s ivm_bench full recomputetodo
M28 tiered object storage + graph branching28a graph restored from object storage equals its source; cold and warm p99 reported beside topic 28’s tier_benchtodo
M29 cross-shard transactions + pattern matching29cross-shard transactions pass a serializability checker under seeded faults; abort rate reported across topic 29’s Zipf sweeptodo
M30 temporal graph + time-travel queries30AT TIME queries equal a snapshot-replay oracle; bytes per change recorded beside topic 30’s delta+varint baselinetodo
M31 active-active graph (CRDT merge)31replicas reach the same state hash under every seeded delivery order; metadata bytes recorded beside topic 31’s crdt_benchtodo
M32 HTAP: changelog-fed analytical replica + freshness-bound routing32measured replica lag never exceeds the declared freshness bound; OLTP p99 unchanged within run-to-run noise with the replica attachedtodo
M33 time-respecting MATCH + AT TIME/BETWEEN views + temporal path functions33time-respecting paths equal topic 33’s brute-force oracle; anchor+delta reads beat snapshot replaytodo
M34 GRAPH.SLOWLOG + per-query perf context + latency histograms behind a PerfLevel dial34slowlog and histograms measured open-loop (no coordinated omission); overhead at the lowest PerfLevel measured and recordedtodo
M35 priority admission (DAGOR-style queuing-time cursor) + retry-budget hints + plan-time memory gate35under topic 35’s metastable trigger, goodput returns to its pre-trigger level after the trigger is removedtodo
M36 slot-sharded graph (hash tags, MOVED/ASK redirects, throttled live slot migration, greedy placement)36a slot migration moves only the migrating slots’ keys (topic 36’s mod-N moves almost all); no write lost during migrationtodo
M37 distributed queries (scatter-gather over slots, in-engine exchange operator, hedged reads with budget)37hedged reads cut p99 under topic 37’s straggler model within the declared extra-request budgettodo
M38 GraphRAG layer (entity ingest + resolution, PPR retrieval procedure over CSR, bi-temporal edge versioning with as-of reads)38PPR retrieval answers topic 38’s multi-hop questions where vector-RAG collapses; as-of reads equal a bi-temporal oracletodo
M39 fraud primitives (dense-block peel procedure over the CSR, write-time identity resolution: blocking indexes + FS match weights + incremental union-find)39dense-block peeling recovers topic 39’s planted camouflaged rings; incremental union-find equals batch clusteringtodo
M40 attack-path primitives (edge-kind-filtered variable-length reachability, one-pass dominator choke-point procedure over the CSR, Zanzibar-shaped check with a maintained closure index)40reachability and dominator results equal topic 40’s oracles; Zanzibar-shaped check equals evaluation without the closure indextodo
M41 provenance & identity (incremental FIFO taint queues in the property layer, maintained union-find cluster index, BlockSci-shaped columnar transaction store for scan queries)41FIFO taint results equal topic 41’s oracle; the maintained cluster index equals batch union-findtodo
M42 real-time recommendations (GraphJet-style temporal index segments + doubling edge pools, Pixie random-walk procedure with sub-linear step allocation and early stopping, TAO-shaped association-list API)42Pixie-walk recommendations measured on topic 42’s popularity-trap metric beside the baseline; association-list API p99 recordedtodo
M43 observability path (trace ingest as an incrementally-maintained dependency graph with sketched edge weights, walk + Ferret localization procedures over the CSR, happened-before join operator with Pivot Tracing pushdown)43localization names the single injected gray failure that raises topic 43’s thirty-four alertstodo
M44 relational rewrite stage (e-graph planner pass whose patterns compile to conjunctive queries and run through generic join, a timestamped e-node table driving a semi-naive saturation loop, and one cyclic rewrite pattern measured against a binary-join plan)44relational e-matching returns the same matches as a backtracking matcher; the cyclic pattern measured against a binary-join plantodo
M45 async page-read path for the storage backend (an IoBackend trait under the M6 buffer pool — sync pread, worker pool, io_uring on Linux — chosen at startup; a read stream whose look-ahead doubles on I/O waits; the two cost models predicted before measuring; out-of-place writes with a total-WAF counter)45the same reads through every IoBackend return identical bytes; the WAF counter equals bytes written over bytes requestedtodo
M46 factorized intermediates for the pattern engine (Expand chains kept as packed Level { vals, off } siblings with deferred flattening; count/sum as products of multiplicities; cascade-correct filters property-tested against flat plans; variable-length relationships planned as closures that can be intersected with other edges, under explicit set or bag semantics)46factorized count/sum equal flat plans (property test); intermediate size on topic 46’s pattern recorded beside its factorized lanetodo
M47 semi-join pass for the Cypher planner (forward/backward semi-joins over label and relationship matrices for acyclic MATCH patterns with the ≤ OUT bound asserted; exact bitmap or Bloom filter behind one trait with per-hop false-positive and inherited counters; RPT+-style run-time abandon; null-bearing IN kept out of the filter path; both anchors benchmarked against C FalkorDB)47the ≤ OUT bound asserted on every acyclic pattern; intermediate tuples on topic 47’s pattern at or below its reduced lane; p99 against C FalkorDB recordedtodo
M48 tier-aware placement for the graph store (fast/slow arenas, mbind on Linux; vertex renumbering by access frequency with pages-for-90% reported before and after; the partial-move decision before bulk traversals over a slow-tier adjacency; engine metadata pinned to the fast tier)48pages-for-90% reported before and after renumbering, measured the way topic 48’s tier_bench doestodo
M49 graph snapshots and branches on object storage (immutable segment files + a manifest with per-segment statistics; commits and branch/tag references by conditional put; an O(1)-metadata planner measured with lane 1a’s meter; lane 2’s conflict rules for concurrent writers to a branch; manifest-merge interval chosen by lane 3’s EOQ rule)49planning reads O(1) metadata objects per snapshot as lane 1a’s meter counts; concurrent conflicting commits rejected by lane 2’s rulestodo
M50 semantic predicates in the planner (ExpensivePredicate with declared cost and a paid selectivity sample, rank ordering, LIMIT pushdown, (row, predicate) answer cache, two-threshold cascade with a guaranteed-threshold learner; call counts match lane 1 against a mock model)50model call counts match lane 1 against a mock model; cached (row, predicate) answers never re-call the modeltodo
M51 delta-core evaluation (lane 1’s workload — two-hop scans with 0/1/10% inserts and the half-deletes mix — on the M20 core: scan ns/edge, amortised c + F/T with F measured, a tombstone scan with no per-edge test asserted ≤ 1.2× the insert-only mix, a bounded flush, bytes/edge; benchmarked against C FalkorDB with the two-hop and insert-latency datapoint)51two-hop results equal a static-CSR oracle after every insert batch; steady-state insert cost (c + F/T) and scan ns/edge recorded beside topic 51’s dyngraph_bench; insert-latency p99 against C FalkorDB’s on the same graphtodo
M52 id-order pass and compact read-only segment for the sparse-matrix core ((community, degree) renumbering via the Leiden of M24 applied to every relationship matrix and the property store, every query result checked unchanged up to the permutation; lane 1’s LogGap / varint bits / simulated-miss / scan-ns columns reported before and after on a graph whose value array exceeds the LLC; a gap+varint read-only segment for settled matrices with the one-thread vs all-thread scan crossover recorded; bytes per edge of every relationship matrix with the iso-boolean case counted)52every query result unchanged up to the permutation after renumbering; bits/edge and scan ns/edge recorded before and after beside topic 52’s compress_benchtodo
M53 estimator behind the planner’s anchor choice (per-relation F1 and per-type-pair F2 = Σ indeg·outdeg from the matrices’ degree vectors, asserted against brute force; an est(pattern) trait with independence and the order-2 catalog; lane 1’s plan-choice table on the capstone graph with regret and the answer’s share of cost; catalog update cost per inserted edge; the same four-hop MATCH anchored at each end)53F1/F2 statistics equal brute-force counts; q-error by hop recorded beside topic 53’s card_bench; anchor choice measured at both ends of one four-hop MATCHtodo
M54 join operator for the Rust engine (a HashJoin trait with a shared-table and a single-pass radix-partitioned implementation, fan-out from Equation (1) with the measured L1d; a planner rule using the crossover measured on the target machine; late materialisation through the join; benchmarked on the three-hop pattern with the join’s share of the query reported)54join output equals a nested-loop oracle; shared-table and radix timings recorded beside topic 54’s join_bench with the crossover on the target machinetodo
M55 recursion operator for the Cypher planner (variable-length * as a masked sparse product over the relationship matrices with a complement visited-mask and the flops = derivations identity asserted in debug builds; goal-directed evaluation when an endpoint is bound; per-hop out-/in-side choice from the frontier’s degrees; dense-vs-sparse mask chosen from n and frontier density; both anchors benchmarked against C FalkorDB’s variable-length traversal)55variable-length results equal a BFS oracle; derivations equal flops +arc
M56 query-scoped arena and allocation-size audit for the graph store (arena above rm_malloc for a query’s intermediates, per-query cap counting chunks rather than objects; entity headers checked against jemalloc size classes under quantum 8 and 16; resident ÷ live reported per churn round; benchmarked against the C engine’s rm_malloc path)56resident ÷ live reported per churn round beside topic 56’s alloc_bench; per-query cap enforced in a test; temporaries timed against the rm_malloc pathtodo
M57 normalized-key ORDER BY for the Cypher engine (order-preserving encoder for Cypher values with DESC and a leading type byte; fixed-width key + row-pointer sort for ≤ 3 numeric keys, variable-size fallback; radix with size cutoff and run detection chosen from n and key width; once-per-row collation keys with the comparisons-per-string break-even asserted; 10M-row ORDER BY against C FalkorDB’s op_sort.c path, with and without LIMIT)57ORDER BY output equals a comparison-sort oracle for every Cypher type and DESC; 10M-row sort timed against C FalkorDB with and without LIMITtodo

Session log

Moved to SESSION-LOG.md — one detailed entry per topic, newest first, recording every measured number and what was verified against which paper.