Temporal Coalescing on Window Extents over Data Streams

Mohammed Al-Kateb, Sasi Sekhar Kunta, Byung Suk LeeIEICE Trans. Information and Systems 2011

Introduction

In temporal databases, coalescing is a fundamental operation used to merge tuples that share identical values and contiguous or overlapping time intervals. This process is essential for providing accurate answers to temporal queries, such as determining the total duration a specific sensor reading remained above a threshold. While well-understood in static environments, performing coalescing on high-volume data streams presents significant challenges due to the dynamic nature of sliding windows and the prevalence of out-of-order data.

The Challenge of Stream Coalescing

Data streams typically operate using "window extents"—sliding windows that continuously ingest new data while expiring older tuples. Standard windowing algorithms often fail when tuples are merged because the expiration of a single constituent tuple might require the system to partially "undo" or split a previously coalesced result.

Comparison of un-coalesced data (left) and coalesced data (right), showing how multiple discrete timestamps are merged into a single interval.

As shown in the figure above, un-coalesced data results in fragmented records for the same state (e.g., Region 1 at 81 degrees). Coalescing merges these into a single interval (1:00 to 3:00), significantly reducing the number of tuples but increasing the complexity of window management.

Proposed Framework and Methods

This paper introduces a framework for performing temporal coalescing within sliding windows, distinguishing between two primary strategies:

  1. Lazy Coalescing: The window extent stores raw, un-coalesced tuples. Coalescing is deferred until the "scan" phase when a query is executed. This approach ensures fast updates but results in slower query performance.
  2. Eager Coalescing: Tuples are coalesced immediately upon arrival. While this requires a more complex update algorithm, it drastically speeds up query scans and can reduce the memory footprint by storing fewer, longer-duration tuples.
The conventional data stream model (top) vs. the proposed window extent model (bottom) showing how new and expired tuples interact with the window.

Key Innovations

To support eager coalescing, the authors propose Timestamp Vectors. By attaching a vector of timestamps to each coalesced tuple, the system can "remember" the individual components of a merged interval. This allows for the correct handling of component expiration as the window slides forward. Additionally, the framework includes formal algorithms for both tuple-based and time-based windows, specifically designed to handle the "splitting" and "re-merging" required when data arrives out-of-order.

Optimization for Concurrent Queries

For systems running multiple concurrent queries, the choice between eager and lazy strategies is not binary. The authors formulate this as a 0-1 integer programming problem. This optimization model dynamically decides, for each query, whether to maintain a dedicated eager window or share a common lazy window based on the query's specific attributes and the stream's characteristics.

Evaluation and Insights

The researchers evaluated their approach using synthetic data (200,000 tuples) and real-world sensor data from the Intel Berkeley Research Lab (2.3 million readings). Key findings include:

  • The Out-of-Order Penalty: Late-arriving tuples can force expensive "split" operations in eager windows. If the out-of-order probability is high, the overhead of these updates makes lazy coalescing the more efficient choice.
  • The Crossover Point: Eager coalescing excels when the probability of data being value-equivalent is high and the data is largely in-order. As update costs rise due to stream disorder, the system should flip to a lazy strategy.
  • Multi-Query Efficiency: The optimization model consistently identified the lowest-cost configuration, outperforming baseline "all-eager" or "all-lazy" approaches by effectively balancing query sharing with specialization.

Conclusion

By introducing a cost-based optimization model and the timestamp vector mechanism, this research provides a robust solution for temporal coalescing in stream processing. Future work will explore attribute-level timestamping and the integration of specialized temporal indices to further enhance the performance of lazy coalescing strategies.

Summary updated

BibTeX
@article{alkateb2011temporal,
  author = {Mohammed Al-Kateb and Sasi Sekhar Kunta and Byung Suk Lee},
  title = {{Temporal Coalescing on Window Extents over Data Streams}},
  journal = {IEICE Trans. Information and Systems},
  year = {2011},
  doi = {10.1587/transinf.e94.d.489},
}
Figure