Wiki: How I built the fastest graph database on earth

For agents: Markdown version · Wiki index · Explore

Written by an LLM from machine transcripts. It can contain errors. Check the transcript before you quote it.

Summary

The speaker shares the journey of developing a high-performance graph database utilizing linear algebra and matrix operations. By mapping graph traversal and queries into matrix multiplications using sparse matrices, the database achieves exceptional speed and efficiency. The audience learns how mathematical concepts from linear algebra can solve complex computer science problems in graph data processing.

Key points

  • 0:12 The speaker introduces the project of building a graph database within an in-memory key-value store.
  • 11:09 Graph algorithms can be mapped to linear algebra using adjacency matrices as described in literature.
  • 13:18 Graph traversal operations can be performed efficiently using matrix-vector multiplication.
  • 15:34 Dense matrices consume too much memory, leading to the necessity of using sparse matrices for real-world graph data.
  • 17:39 The standard GraphBLAS API provides the necessary mathematical operations for sparse matrices and vectors.
  • 21:48 Cypher queries can be translated from a node-centric execution plan into algebraic expressions.
  • 27:59 Matrix representation enables easy distribution of computations across blocks, threads, or machines.
  • 29:04 Benchmarks show that loading millions of entities and finding neighbors take fractions of a second.

Takeaways

  • Representing graph structures as matrices allows the use of linear algebra for fast traversals.
  • Sparse matrices are essential for handling large-scale, real-world graphs without running out of memory.
  • Translating query languages like Cypher into algebraic expressions optimizes execution paths.

Questions this talk answers

  • How can graph traversals be implemented using matrix multiplication?
  • Why are sparse matrices preferred over dense matrices for graph databases?
  • How do you translate graph query languages into linear algebra expressions?

Technologies

Redis, GraphBLAS

Tags

distributed systems, graph database, linear algebra, performance optimization, query languages, sparse matrices