On the Semantics of TPF-QS

Towards Publishing and Querying RDF Streams at a lower cost

Ruben Taelman

SEMANTiCS, 12 September 2018

On the Semantics of TPF-QS

Towards Publishing and Querying RDF Streams at a lower cost

1Ghent University – imec – IDLab, Belgium

2Dipartimento di Elettronica, Informazione e Bioingegneria, Politecnico of Milano, Italy

Song information as a slow RDF stream

How to publish slow streams
at a low cost?

TPF-QS: Triple Pattern Fragments Query Streamer (Taelman 2016)

Linked Data Fragments

How does TPF-QS compare to other RDF Stream Processing (RSP) engines, both formally and experimentally?

TPF-QS is a client-side RSP engine

RDF stream annotation to indicate expiration times

Assumption: expiration time of each stream element is predefined

Triple Pattern Fragments, (Verborgh 2016)
a low-cost Linked Data interface

Linked Data Fragments

Client evaluates only when needed

Continuous SPARQL query:

SELECT ?song WHERE { radio:my m:plays ?song }

RDF Stream:
  • 09:15 - 09:20  
    radio:my m:plays song-x
  • 09:20 - 09:25  
    radio:my m:plays song-y
  • 09:25 - 09:30  
    radio:my m:plays song-z
Query results:
  • 09:15  
    song-x
  • 09:20  
    song-y
  • 09:25  
    song-z

Client evaluates only when needed

Continuous SPARQL query:

SELECT ?song WHERE { radio:my m:plays ?song }

RDF Stream:
  • 09:15 - 09:20  
    radio:my m:plays song-x
  • 09:20 - 09:25  
    radio:my m:plays song-y
  • 09:25 - 09:30  
    radio:my m:plays song-z
Query results:
  • 09:15  
    song-x
  • 09:20  
    song-y
  • 09:25  
    song-z

Client evaluates only when needed

Continuous SPARQL query:

SELECT ?song WHERE { radio:my m:plays ?song }

RDF Stream:
  • 09:15 - 09:20  
    radio:my m:plays song-x
  • 09:20 - 09:25  
    radio:my m:plays song-y
  • 09:25 - 09:30  
    radio:my m:plays song-z
Query results:
  • 09:15  
    song-x
  • 09:20  
    song-y
  • 09:25  
    song-z

RSP-QL: A unifying RSP Query Model (Dell'Aglio 2014)

Captures the differences between systems such as CQELS, C-SPARQL.

Extension of RDF and SPARQL, adding time semantics.

RSP-QL applies windows to streams

RSP-QL applies windows to streams

RSP-QL applies windows to streams

TPF-QS in terms of RSP-QL (summary)

Experimental comparison using CityBench (Ali 2015)

Adaptation of CityBench for TPF-QS

CityBench does not work out-of-the-box with TPF-QS, so changes were needed.

Experimental Setup of CityBench

TPF-QS achieves lower server CPU usage and lower latency for simple queries

Q1 Q2 Q3
CPU
Latency

TPF-QS reaches higher server load for complex queries because of increased data transfer

Q6 Q9 Q11*
CPU
Latency
*C-SPARQL fails for Q11

TPF-QS client load initially peaks,
and then drops

Conclusion: there is potential for lightweight streaming interfaces