akGroupPlus: Engineering High-Concurrency social Graph Operations at Scale

An Efficient Parallel Method for Performing Concurrent Operations on Social Networks

2017-01-01
Phuong-Hanh Du, Hai-Dang Pham, Ngoc-Hoa Nguyen
Summary
Problem
Method
Results
Takeaways
Abstract

This paper introduces "akGroupPlus," an optimized parallel framework for concurrent operations (Add, Delete, Shortest Distance Query) on large-scale directed unweighted social graphs. By combining adaptive bi-directional BFS (bBFS), edge state tagging (ALIVE/DEAD/UNKNOWN), and Cilkplus-based multi-threading, the method achieves SOTA performance on datasets like Pokec and LiveJournal.

TL;DR

Managing a social network like Facebook or Twitter isn't just about storing data; it’s about handling a relentless stream of "follow" (Add Edge), "unfollow" (Delete Edge), and "how are we connected?" (Shortest Distance) queries simultaneously. This paper presents akGroupPlus, a parallel framework that optimizes these concurrent operations using a clever "Unknown State" edge mechanism and an adaptive bi-directional BFS that significantly outpaces existing SOTA solutions in multi-threaded environments.

Problem & Motivation: The Dynamic Graph Dilemma

In a large-scale social network, the graph is never static. Traditional Breadth-First Search (BFS) for Shortest Distance (SD) is computationally expensive (), and performing it while edges are being added or deleted creates a massive bottleneck.

Previous works often struggled with two extremes:

  1. General Libraries (NetworkX/SNAP): Often sequential and not optimized for concurrent "Read-Write" batches.
  2. Distributed Engines (GraphX/GraphLab): Optimized for clusters, but often overkill (and high overhead) for single-node multi-core machines typically used in medium-scale production environments.

The authors' insight was simple: Consistency does not require total locks. By batching updates and marking affected edges as "UNKNOWN," queries can proceed in parallel by checking a timestamped update log.

Methodology: The Core Innovations

1. Data Structure with Bit-level Cleverness

To keep the memory footprint small and cache hits high, the authors used 30 bits for the vertex ID and reserved the last 2 bits of a 4-byte integer to store the edge state: ALIVE, DEAD, or UNKNOWN.

2. Adaptive Bi-directional BFS (bBFS)

The bi-directional BFS searches from both the source () and the target () simultaneously. The "Magic" happens in how the algorithm decides which side to expand next. Instead of just looking at the queue size, akGroupPlus looks at the outgoingSum and incomingSum—a heuristic that predicts the future search volume of the next level.

Model Overview Algorithm flow: Handling updates and queries using timestamped state checks.

3. Exploiting Parallelism with Cilkplus

Unlike standard Pthreads, the authors utilized Cilkplus, which allows for efficient task-stealing and better utilization of multi-core Xeon processors. This is particularly effective for processing a batch of queries where each query might vary significantly in search depth.

Experiments & Performance

The researchers tested their approach against the winner of the SigMod 2016 Programming Contest. They used three major datasets:

  • SigMod Dataset: 1.5M edges.
  • Pokec (Slovakia Social Network): 68M edges.
  • LiveJournal: 30M edges.

Key Result: Scalability

While the baseline "akgroup" solution actually slowed down as more threads were added (due to synchronization overhead), akGroupPlus showed a consistent downward trend in execution time.

Performance Comparison Evaluation on the Pokec Dataset: akGroupPlus takes the lead as the thread count increases.

In the "5-4-1" scenario (50% Queries, 40% Additions, 10% Deletions), which mimics a highly active social network, akGroupPlus significantly outperformed the "H minor free" team, proving that their search space reduction heuristic is superior for dynamic workloads.

Critical Analysis & Conclusion

Takeaway

The success of akGroupPlus highlights that for graph algorithms, memory locality and search pruning beat raw brute-force parallelism. By predicting which side of the BFS will "explode" in size and avoiding it, the algorithm saves more time than a 36-core processor ever could by sheer speed.

Limitations

  • Non-Facebook Scale: The authors admit this is designed for graphs under 1 billion nodes (using 30-bit IDs). For global-scale graphs, 64-bit addressing would be required, likely increasing memory latency.
  • Unweighted Only: The current method doesn't support weighted edges (e.g., "strength of friendship"), which would require a move from BFS to a parallel Dijkstra or Δ-stepping algorithm.

Future Work

The authors plan to pivot toward Online Transaction Processing (OLTP) for graph databases, moving beyond batches into truly continuous, real-time edge updates.

Find Similar Papers

Try Our Examples

  • Search for recent papers that extend bi-directional BFS heuristics with machine learning-based branch prediction for search space reduction in dynamic graphs.
  • Which paper originally proposed the "smaller-to-larger" direction selection in bi-directional search, and how does this paper's "sum of children" metric fundamentally differ?
  • Explore if these parallel bBFS techniques have been successfully integrated into real-time Graphite or Neo4j graph database engines for OLTP workloads.
Contents
akGroupPlus: Engineering High-Concurrency social Graph Operations at Scale
1. TL;DR
2. Problem & Motivation: The Dynamic Graph Dilemma
3. Methodology: The Core Innovations
3.1. 1. Data Structure with Bit-level Cleverness
3.2. 2. Adaptive Bi-directional BFS (bBFS)
3.3. 3. Exploiting Parallelism with Cilkplus
4. Experiments & Performance
4.1. Key Result: Scalability
5. Critical Analysis & Conclusion
5.1. Takeaway
5.2. Limitations
5.3. Future Work