PanJoin: A Partition-based Adaptive Stream Join

Fei Pan, Hans-Arno JacobsenarXiv 2018

Introduction

Stream joins are a critical computational bottleneck in real-time data processing, particularly when managing large sliding windows and non-equi join conditions. As data rates and window sizes scale to millions of tuples, traditional join methods struggle to maintain the required low-latency performance. This paper introduces PanJoin, a highly parallelized stream join architecture that leverages novel subwindow data structures to achieve over a 1000x throughput improvement compared to existing state-of-the-art solutions.

Architectural Design: Manager-Worker Setup

PanJoin addresses the scalability bottleneck by employing a hierarchical partitioning strategy. At the architectural level, it utilizes a manager-worker configuration to distribute the workload across multiple processing cores.

A key innovation in PanJoin's architecture is its approach to data expiration. Rather than tracking and deleting individual tuples—a process that incurs significant computational overhead—PanJoin expires entire "subwindows" at once. This coarse-grained expiration simplifies internal logic and allows the system to focus resources on active join operations. Incoming tuples are processed in batches to maximize memory and network bandwidth efficiency.

PanJoin Manager-Worker Architecture and Subwindow Management

Internal Subwindow Optimization

While architectural parallelization is necessary, the internal efficiency of each processing unit is equally vital. Existing parallel stream join algorithms often rely on brute-force nested-loop joins within their subwindows, limiting throughput. PanJoin replaces these with three specialized, user-selectable data structures designed for different data characteristics:

  1. RaP-Table (Range Partition Table): This structure uses range partitioning combined with a dynamic adjustment algorithm to handle skewed data distributions. It utilizes a custom Linked List Adaptive Table (LLAT) to ensure continuous memory access.
  2. WiB+-Tree (Wide B+-Tree): Optimized for monotonically increasing data (such as timestamps), the WiB+-Tree uses large, unsorted leaf nodes. This design accelerates insertions by 3-5x compared to standard B+-trees, as nodes are only sorted during splits.
  3. BI-Sort (Buffered Indexed Sort): A hardware-friendly approach featuring an insertion buffer and a compact index array over a sorted main array. This structure is particularly effective for FPGA-based acceleration.
Dynamic Splitter Adjustment for Handling Data Skew in RaP-Table

Algorithmic Innovations

PanJoin introduces several optimizations to further reduce probing comparisons:

  • Rebounding Binary Search: By processing tuples in batches, the system can start a search for a subsequent tuple from the position where the previous search ended, significantly reducing redundant memory accesses.
  • Index-Only Feedback: To prevent network congestion when join selectivity is high, workers can return index ranges (<id_start, id_end>) to the manager instead of full tuple copies, drastically saving bandwidth.

Performance Evaluation

The authors evaluated PanJoin using synthetic datasets (uniform and multimodal normal distributions) and a real-world YouTube video statistics dataset. The YouTube data, characterized by extreme skew (99% of data in 1% of the value range), served as a rigorous test for the RaP-Table's adaptive partitioning.

Key Results

  • Throughput: PanJoin successfully handled input rates between 10M and 28.9M tuples per second for window sizes up to 1 billion tuples. This represents a generational leap over previous parallel solutions like SplitJoin.
  • Energy Efficiency: An Intel FPGA implementation of BI-Sort achieved a 4x better Energy Efficiency Ratio (EER) than the CPU version, consuming only 7.9W compared to 60W.
  • System Integration: When integrated into Apache Storm, PanJoin maintained approximately 90% of its theoretical maximum throughput, demonstrating its viability for production stream processing engines.

Conclusion and Future Work

PanJoin demonstrates that combining architectural parallelization with optimized internal data structures can overcome the traditional bottlenecks of stream joins. While current performance is limited primarily by network bandwidth (even at 100 Gb/s InfiniBand speeds), future advancements in high-speed networking and FPGA memory (such as HBM) are expected to further extend PanJoin's lead in real-time data processing.

Summary updated

BibTeX
@misc{pan2018panjoin,
  author = {Fei Pan and Hans-Arno Jacobsen},
  title = {{PanJoin: A Partition-based Adaptive Stream Join}},
  year = {2018},
  eprint = {1811.05065},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1811.05065},
}
Figure