TL;DR
RisGraph is a high-performance streaming system designed for evolving graphs that achieves millions of updates per second while maintaining sub-millisecond latency. By combining localized data access with a novel "safe-update" concurrency model, it outperforms state-of-the-art systems by 2–4 orders of magnitude for per-update analysis.
What Problem Does This Paper Address?
In the world of financial fraud detection or real-time social networking, graphs are "evolving"—they change constantly as new transactions or interactions occur. To be useful, analytics (like finding the shortest path between a suspect and a known fraudster) must be performed for every single update.
The challenge is a classic trade-off between latency and throughput. Existing systems like Differential Dataflow or KickStarter are powerful, but they rely on "batching" updates to achieve high throughput. If you force them to analyze every update individually (per-update analysis), their throughput collapses because they spend too much time scanning the entire graph or managing overhead. RisGraph aims to break this trade-off, providing both the high throughput of batched systems and the ultra-low latency of per-update processing.
Methods
The authors introduce two "guiding ideas" to solve the performance bottleneck: localized data access and inter-update parallelism.
- Indexed Adjacency Lists: Standard graph structures are either good for updates or good for analysis, rarely both. RisGraph uses a hybrid structure: dynamic arrays to store edges (for fast scanning) paired with hash-table indexes (for $O(1)$ edge lookups and updates).
- Sparse Arrays & Hybrid Parallelism: To avoid scanning all vertices, RisGraph uses sparse arrays to track only "active" vertices. It also employs a Hybrid Parallel Mode that uses a linear classifier to choose between vertex-parallel and edge-parallel execution based on the current workload's characteristics.
- Safe vs. Unsafe Updates: This is the core innovation for parallelism. RisGraph observes that many updates (e.g., adding an edge that doesn't shorten a path) don't actually change the final analytical result.
- Safe Updates: Operations that don't modify the algorithm's "dependency tree." These can be processed in parallel.
- Unsafe Updates: Operations that do change results. These are processed one-by-one to ensure consistency.
- Epoch Loop Schema: The system groups updates into epochs, processing all safe updates in parallel first, then handling unsafe ones sequentially.
Datasets
The researchers evaluated RisGraph on ten diverse, large-scale datasets, including:
- Social Networks: Twitter-2010 (41.7M vertices, 1.47B edges) and Flickr.
- Web Graphs: UK-2007 (106M vertices, 3.74B edges) and Subdomain.
- Benchmark/Transactional: LinkBench (Facebook's benchmark), SNB-SF-1000, and Bitcoin.
- Collaboration/Interaction: HepPh, Wiki, and StackOverflow.
Key Insights and Ideas
- The "Safe Update" Revelation: The authors discovered that in many real-world scenarios, less than 20% (and often less than 5%) of updates actually change the analytical results. Exploiting this allows for massive parallelization without sacrificing correctness.
- Locality is the Bottleneck: Most existing streaming systems "leak" performance by scanning the entire vertex set even when only a tiny fraction of the graph is affected. Localizing access to only the affected neighborhood is the key to sub-millisecond latency.
- Adaptive Parallelism: There is no "one size fits all" for parallel graph processing. By using a simple linear classifier, RisGraph can switch between parallelizing by vertex or by edge, improving performance by over 24% compared to fixed strategies.
Key Results
- Throughput: RisGraph can ingest millions of updates per second on a single commodity machine.
- Latency: The P999 (99.9th percentile) processing time is consistently under 20 milliseconds, meeting the requirements for real-time financial systems.
- Comparison: For per-update analysis, RisGraph provides a 2–4 orders of magnitude improvement over KickStarter and Differential Dataflow.
- Scalability: The system scales effectively with hardware, showing a 17.6x speedup for BFS on a 24-core machine.
- Inter-update Parallelism: The epoch loop schema alone improved throughput by 14.1x compared to a single-writer approach.
Limitations and Future Work
- In-Memory Constraints: While the paper mentions a prototype for "out-of-core" (disk-based) processing using
mmap, RisGraph is primarily designed as an in-memory system. Scaling to datasets that exceed RAM remains a challenge. - Algorithm Scope: The system focuses on monotonic algorithms (like BFS, SSSP, and Connected Components). While these cover many use cases, non-monotonic algorithms (like PageRank) might require different handling.
- Offline Training: The linear classifier used for hybrid parallelism is currently trained offline. The authors suggest online training as a future direction to make the system more adaptive to shifting workloads in real-time.
Summary updated