Towards Comparing RDF Stream Processing Semantics

Minh Dao-Tran, Harald Beck, Thomas EiterHiDeSt@KI 2015 · OpenReview

Introduction

RDF Stream Processing (RSP) has emerged as a critical technology for integrating real-time data streams with the rich, structured knowledge of the Semantic Web. However, the RSP landscape is currently fragmented. While several engines—most notably C-SPARQL and CQELS—have been developed to query these streams, they differ significantly in their underlying data models, execution modes, and semantics. These differences often lead to diverging results for the same query, a phenomenon that existing benchmarks struggle to explain.

This paper introduces a formal, "white-box" method for comparing RSP engine semantics. By translating engine-specific query languages and execution behaviors into the logic-based LARS (Logic-based framework for Analyzing Reasoning over Streams) framework, the authors provide a common ground to analyze why and how these systems diverge.

The Problem: Black-Box Benchmarking

Traditional RSP benchmarks, such as SRBench or LSBench, typically evaluate engines as black boxes. They compare the final outputs of different systems but offer little insight into the cause of discrepancies. A difference in output could stem from a bug, a variation in windowing logic, or the fundamental execution mode—specifically, whether an engine "pushes" results as data arrives (event-driven) or "pulls" them on a fixed schedule (periodic).

Without a common formal language, it is nearly impossible to determine if two engines are semantically equivalent or if their differences are inherent to their design. The authors address this gap by using LARS as a unifying host language to model the operational behavior of these engines.

Methodology: The LARS Framework

The authors' approach involves translating the core components of RSP engines into LARS rules. This process consists of four primary technical steps:

  1. Execution Mode Translation: The authors developed LARS rules to simulate both push-based execution (typical of CQELS, where every incoming triple triggers an evaluation) and pull-based execution (typical of C-SPARQL, where evaluation occurs at periodic intervals).
  2. Window Mapping: RSP window expressions (e.g., [RANGE 30m] or [ROWS N]) are mapped to specific LARS window operators, ensuring that the temporal logic of the streams is preserved.
  3. Query Translation: By extending existing SPARQL-to-Datalog translations to handle streaming patterns, the authors represent complex RSP queries as sets of logic rules within LARS.
  4. Defining Formal Agreement: Because push and pull engines operate on different temporal triggers, they cannot be expected to produce identical outputs at every millisecond. The authors propose a formal definition of "agreement": engines agree if the union of all outputs from a push-based engine over a specific interval matches the discrete output of a pull-based engine at the end of that interval.

Case Study: Geo-Marketing Scenario

To demonstrate the framework, the paper utilizes a running scenario involving a real-time geo-marketing application. This scenario includes:

  • Static Background Data: Information regarding shop locations and product categories.
  • Dynamic Streams: Real-time discount coupons issued by shops and user location updates.

Through this example, the authors illustrate how different execution modes and windowing strategies affect the visibility of coupons to users as they move through a physical space.

Key Insights and Results

The "Origin" Problem

A significant finding involves C-SPARQL’s handling of stream snapshots. Because C-SPARQL merges stream data into a default graph, it can lose the "origin" of specific triples. If the static dataset and the stream share similar patterns, C-SPARQL may produce "phantom" results—inferences that a more cautious engine like CQELS, which maintains strict separation between streams, would avoid.

Impact of Throughput

The paper notes that under high data throughput, semantic agreement between push and pull modes becomes increasingly unlikely. In high-velocity environments, the state of a stream can change significantly between the start and end of a pull interval, leading to inherent divergence that is a product of the execution architecture rather than the query logic itself.

Formal Faithfulness

The authors provide formal propositions demonstrating that their LARS translations accurately capture the intended semantics of the RSP engines. This confirms that LARS can serve as a reliable "semantic bridge," moving the field from empirical testing toward rigorous formal analysis.

Limitations and Future Work

While the framework provides a robust foundation, some areas remain for future development. The current translation does not yet account for SPARQL solution modifiers such as ORDER BY or LIMIT. Additionally, the Relation-to-Stream (R2S) operators—which convert internal relations back into output streams—are treated as operational concerns rather than semantic ones in this study.

The authors suggest that the next step is the practical implementation of these translations into a benchmarking system capable of comparing a wider array of engines and more complex query features.

Summary updated

BibTeX
@inproceedings{daotran2015towards,
  author = {Minh Dao-Tran and Harald Beck and Thomas Eiter},
  title = {{Towards Comparing RDF Stream Processing Semantics}},
  booktitle = {HiDeSt@KI},
  year = {2015},
  url = {https://openreview.net/forum?id=aCFWNlyQOR},
}
Figure