Your SlideShare is downloading. ×
0
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

RDF Stream Processing Models (RSP2014)

199

Published on

Presentation on RDF Stream Processing models given at the RSP2014 tutorial (ESWC 2014)

Presentation on RDF Stream Processing models given at the RSP2014 tutorial (ESWC 2014)

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
199
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Tutorial on RDF Stream Processing M. Balduini, J-P Calbimonte, O. Corcho, D. Dell'Aglio, E. Della Valle http://streamreasoning.org/rsp2014 RDF Stream models Continuous query models Daniele Dell’Aglio daniele.dellaglio@polimi.it
  • 2. http://streamreasoning.org/rsp2014 Share, Remix, Reuse — Legally  This work is licensed under the Creative Commons Attribution 3.0 Unported License.  Your are free: to Share — to copy, distribute and transmit the work to Remix — to adapt the work  Under the following conditions Attribution — You must attribute the work by inserting – “[source http://streamreasoning.org/rsp2014]” at the end of each reused slide – a credits slide stating - These slides are partially based on “Tutorial on RDF stream processing 2014” by M. Balduini, J-P Calbimonte, O. Corcho, D. Dell'Aglio and E. Della Valle http://streamreasoning.org/rsp2014  To view a copy of this license, visit http://creativecommons.org/licenses/by/3.0/ 2
  • 3. http://streamreasoning.org/rsp2014 Outline 1. Continuous RDF model extensions • RDF Streams, timestamps 2. Continuous extensions of SPARQL • Continuous evaluation • Additional operators 3. Overview of existing systems • Features • Comparison 3
  • 4. http://streamreasoning.org/rsp2014 Outline 1. Continuous RDF model extensions • RDF Streams, timestamps 2. Continuous extensions of SPARQL • Continuous evaluation • Additional operators 3. Overview of existing systems • Features • Comparison 4
  • 5. http://streamreasoning.org/rsp2014 Continuous extensions of RDF  As you know, “RDF is a standard model for data interchange on the Web” (http://www.w3.org/RDF/) <sub1 pred1 obj1> <sub2 pred2 obj2>  We want to extend RDF to model data streams  A data stream is an (infinite) ordered sequence of data items  A data item is a self-consumable informative unit 5
  • 6. http://streamreasoning.org/rsp2014 Data items  With data item we can refer to: 1. A triple 2. A graph 6 <:alice :isWith :bob> <:alice :posts :p> <:p :who :bob> <:p :where :redRoom> :graph1
  • 7. http://streamreasoning.org/rsp2014 Data items and time  Do we need to associate the time to data items? • It depends on what we want to achieve (see next!)  If yes, how to take into account the time? • Time should not (but could) be part of the schema • Time should not be accessible through the query language • Time as object would require a lot of reification  How to extend the RDF model to take into account the time? 7
  • 8. http://streamreasoning.org/rsp2014 Application time  A timestamp is a temporal identifier associated to a data item  The application time is a set of one or more timestamps associated to the data item  Two data items can have the same application time • Contemporaneity  Who does assign the application time to an event? • The one that generates the data stream! 8
  • 9. http://streamreasoning.org/rsp2014 Missing application time  A RDF stream without timestamp is an ordered sequence of data items  9 S e1 :alice :isWith :bob
  • 10. http://streamreasoning.org/rsp2014 Missing application time  A RDF stream without timestamp is an ordered sequence of data items  9 S e1 :alice :isWith :bob e2 :alice :isWith :carl
  • 11. http://streamreasoning.org/rsp2014 Missing application time  A RDF stream without timestamp is an ordered sequence of data items  9 S e1 :alice :isWith :bob e2 :alice :isWith :carl e3 :bob :isWith :diana
  • 12. http://streamreasoning.org/rsp2014 Missing application time  A RDF stream without timestamp is an ordered sequence of data items  9 S e1 :alice :isWith :bob e2 :alice :isWith :carl e3 :bob :isWith :diana e4 :diana :isWith :carl
  • 13. http://streamreasoning.org/rsp2014 Missing application time  A RDF stream without timestamp is an ordered sequence of data items  The order can be exploited to perform queries • Does Alice meet Bob before Carl? • Who does Carl meet first? 9 S e1 :alice :isWith :bob e2 :alice :isWith :carl e3 :bob :isWith :diana e4 :diana :isWith :carl
  • 14. http://streamreasoning.org/rsp2014 Application time: point-based extension  One timestamp: the time instant on which the data item occurs  10 e1S t3 6 91 :alice :isWith :bob
  • 15. http://streamreasoning.org/rsp2014 Application time: point-based extension  One timestamp: the time instant on which the data item occurs  10 e1 e2S t3 6 91 :alice :isWith :bob :alice :isWith :carl
  • 16. http://streamreasoning.org/rsp2014 Application time: point-based extension  One timestamp: the time instant on which the data item occurs  10 e1 e2 e3S t3 6 91 :alice :isWith :bob :alice :isWith :carl :bob :isWith :diana
  • 17. http://streamreasoning.org/rsp2014 Application time: point-based extension  One timestamp: the time instant on which the data item occurs  10 e1 e2 e3 e4S t3 6 91 :alice :isWith :bob :alice :isWith :carl :bob :isWith :diana :diana :isWith :carl
  • 18. http://streamreasoning.org/rsp2014 Application time: point-based extension  One timestamp: the time instant on which the data item occurs  We can start to compose queries taking into account the time • How many people has Alice met in the last 5m? • Does Diana meet Bob and then Carl within 5m? 10 e1 e2 e3 e4S t3 6 91 :alice :isWith :bob :alice :isWith :carl :bob :isWith :diana :diana :isWith :carl
  • 19. http://streamreasoning.org/rsp2014 Application time: interval-based extension  Two timestamps: the time range on which the data item is valid (from, to]  11 S t3 6 91 :alice :isWith :bob e1
  • 20. http://streamreasoning.org/rsp2014 Application time: interval-based extension  Two timestamps: the time range on which the data item is valid (from, to]  11 S t3 6 91 :alice :isWith :bob :alice :isWith :carl e1 e2
  • 21. http://streamreasoning.org/rsp2014 Application time: interval-based extension  Two timestamps: the time range on which the data item is valid (from, to]  11 S t3 6 91 :alice :isWith :bob :alice :isWith :carl :bob :isWith :diana e1 e2 e3
  • 22. http://streamreasoning.org/rsp2014 Application time: interval-based extension  Two timestamps: the time range on which the data item is valid (from, to]  11 S t3 6 91 :alice :isWith :bob :alice :isWith :carl :bob :isWith :diana :diana :isWith :carl e1 e2 e3 e4
  • 23. http://streamreasoning.org/rsp2014 Application time: interval-based extension  Two timestamps: the time range on which the data item is valid (from, to]  It is possible to write even more complex constraints: • Which are the meetings the last less than 5m? • Which are the meetings with conflicts? 11 S t3 6 91 :alice :isWith :bob :alice :isWith :carl :bob :isWith :diana :diana :isWith :carl e1 e2 e3 e4
  • 24. http://streamreasoning.org/rsp2014 Outline 1. Continuous RDF model extensions • RDF Streams, timestamps 2. Continuous extensions of SPARQL • Continuous evaluation • Additional operators 3. Overview of existing systems • Features • Comparison 12
  • 25. http://streamreasoning.org/rsp2014 Continuous query evaluation  From SPARQL • One query, one answer • The query is sent after that the data is available  To a continuous query language • One query, multiple answers • The query is registered in the query engine • The registration usually happens before that the data arrives • Real-time responsiveness is usually required 13
  • 26. http://streamreasoning.org/rsp2014 Let’s process the RDF streams!  In literature there are two different main approaches to process streams  Data Stream Management Systems (DSMSs) • Roots in DBMS research • Aggregations and filters  Complex Event Processors (CEPs) • Roots in Discrete Event Simulation • Search of relevant patterns in the stream • Non-equi-join on the timestamps (after, before, etc.)  Current systems implements feature of both of them • EPL (e.g. Esper, ORACLE CEP)  Now we focus on the CQL/STREAM model • Developed in the DSMS research • C-SPARQL (and others) is inspired to this model 14
  • 27. http://streamreasoning.org/rsp2014 Our assumptions  In the following we will consider the following setting • A RDF triple is an event • Application time: point-based <:alice :isWith:bob>:[1] <:alice :isWith:carl>:[3] <:bob :isWith :diana>:[6] ... 15 e1 e2 e3 e4S t3 6 91 :alice :isWith :bob :alice :isWith :carl :bob :isWith :diana :diana :isWith :carl
  • 28. http://streamreasoning.org/rsp2014 Querying data streams – The CQL model 16 Streams Relations … <s,τ> … <s1> <s2> <s3> infinite unbounded sequence finite bag Mapping: T  R Stream Relation R(t)
  • 29. http://streamreasoning.org/rsp2014 Querying data streams – The CQL model 16 Streams Relations … <s,τ> … <s1> <s2> <s3> infinite unbounded sequence finite bag Mapping: T  R stream-to-relation Stream Relation R(t)
  • 30. http://streamreasoning.org/rsp2014 Querying data streams – The CQL model 16 Streams Relations … <s,τ> … <s1> <s2> <s3> infinite unbounded sequence finite bag Mapping: T  R stream-to-relation Stream Relation R(t) Sliding windows
  • 31. http://streamreasoning.org/rsp2014 Querying data streams – The CQL model 16 Streams Relations … <s,τ> … <s1> <s2> <s3> infinite unbounded sequence finite bag Mapping: T  R stream-to-relation relation-to-relation Stream Relation R(t) Sliding windows
  • 32. http://streamreasoning.org/rsp2014 Querying data streams – The CQL model 16 Streams Relations … <s,τ> … <s1> <s2> <s3> infinite unbounded sequence finite bag Mapping: T  R stream-to-relation relation-to-relation Stream Relation R(t) Relational algerbra Sliding windows
  • 33. http://streamreasoning.org/rsp2014 Querying data streams – The CQL model 16 Streams Relations … <s,τ> … <s1> <s2> <s3> infinite unbounded sequence finite bag Mapping: T  R stream-to-relation relation-to-stream relation-to-relation Stream Relation R(t) Relational algerbra Sliding windows
  • 34. http://streamreasoning.org/rsp2014 Querying data streams – The CQL model 16 Streams Relations … <s,τ> … <s1> <s2> <s3> infinite unbounded sequence finite bag Mapping: T  R stream-to-relation relation-to-stream relation-to-relation Stream Relation R(t) Relational algerbra *Stream operators Sliding windows
  • 35. http://streamreasoning.org/rsp2014 CQL extension for querying RDF data streams 17 RDF Streams RDF Mappings
  • 36. http://streamreasoning.org/rsp2014 CQL extension for querying RDF data streams 17 RDF Streams RDF Mappings S2R operators Sliding windows
  • 37. http://streamreasoning.org/rsp2014 CQL extension for querying RDF data streams 17 RDF Streams RDF Mappings S2R operators SPARQL operators Sliding windows
  • 38. http://streamreasoning.org/rsp2014 CQL extension for querying RDF data streams 17 RDF Streams RDF Mappings S2R operators R2S operators SPARQL operators *Stream operators Sliding windows
  • 39. http://streamreasoning.org/rsp2014 39 Time-based sliding window S3 S4 S5 S6 S7 S8 S9 S10 S11 S12 S S1 S2 t
  • 40. http://streamreasoning.org/rsp2014 40 R2R operator Time-based sliding window S3 S4 S5 S6 S7 S8 S9 S10 S11 S12 S S1 S2 W(ω,β) t
  • 41. http://streamreasoning.org/rsp2014 41 R2R operator Time-based sliding window S3 S4 S5 S6 S7 S8 S9 S10 S11 S12 S S1 S2 W(ω,β) t
  • 42. http://streamreasoning.org/rsp2014 42 R2R operator Time-based sliding window S3 S4 S5 S6 S7 S8 S9 S10 S11 S12 S S1 S2 W(ω,β) ω t width
  • 43. http://streamreasoning.org/rsp2014 43 R2R operator Time-based sliding window S3 S4 S5 S6 S7 S8 S9 S10 S11 S12 S S1 S2 W(ω,β) ω t width
  • 44. http://streamreasoning.org/rsp2014 44 R2R operator Time-based sliding window S3 S4 S5 S6 S7 S8 S9 S10 S11 S12 S S1 S2 W(ω,β) β ω t widthslide
  • 45. http://streamreasoning.org/rsp2014 45 R2R operator Time-based sliding window S3 S4 S5 S6 S7 S8 S9 S10 S11 S12 S S1 S2 W(ω,β) β ω t widthslide
  • 46. http://streamreasoning.org/rsp2014 46 Time-based sliding window - tumbling S3 S4 S5 S6 S7 S8 S9 S10 S11 S12 S S1 S2 t
  • 47. http://streamreasoning.org/rsp2014 47 R2R operator Time-based sliding window - tumbling S3 S4 S5 S6 S7 S8 S9 S10 S11 S12 S S1 S2 W(ω,β) t
  • 48. http://streamreasoning.org/rsp2014 48 R2R operator Time-based sliding window - tumbling S3 S4 S5 S6 S7 S8 S9 S10 S11 S12 S S1 S2 W(ω,β) t
  • 49. http://streamreasoning.org/rsp2014 49 R2R operator Time-based sliding window - tumbling S3 S4 S5 S6 S7 S8 S9 S10 S11 S12 S S1 S2 W(ω,β) ω t width
  • 50. http://streamreasoning.org/rsp2014 50 R2R operator Time-based sliding window - tumbling S3 S4 S5 S6 S7 S8 S9 S10 S11 S12 S S1 S2 W(ω,β) ω t width
  • 51. http://streamreasoning.org/rsp2014 51 R2R operator Time-based sliding window - tumbling S3 S4 S5 S6 S7 S8 S9 S10 S11 S12 S S1 S2 W(ω,β) β ω t widthslide
  • 52. http://streamreasoning.org/rsp2014 52 R2R operator Time-based sliding window - tumbling S3 S4 S5 S6 S7 S8 S9 S10 S11 S12 S S1 S2 W(ω,β) β ω t widthslide
  • 53. http://streamreasoning.org/rsp2014 53 Tuple-based sliding window S3 S4 S5 S6 S7 S8 S9 S11 S12 S S1 S2 t
  • 54. http://streamreasoning.org/rsp2014 54 R2R operator Tuple-based sliding window S3 S4 S5 S6 S7 S8 S9 S11 S12 S S1 S2 W(ω,β) t
  • 55. http://streamreasoning.org/rsp2014 55 R2R operator Tuple-based sliding window S3 S4 S5 S6 S7 S8 S9 S11 S12 S S1 S2 W(ω,β) t
  • 56. http://streamreasoning.org/rsp2014 56 R2R operator Tuple-based sliding window S3 S4 S5 S6 S7 S8 S9 S11 S12 S S1 S2 W(ω,β) ω tuples in the window t
  • 57. http://streamreasoning.org/rsp2014 57 R2R operator Tuple-based sliding window S3 S4 S5 S6 S7 S8 S9 S11 S12 S S1 S2 W(ω,β) ω tuples in the window t
  • 58. http://streamreasoning.org/rsp2014 58 R2R operator Tuple-based sliding window S3 S4 S5 S6 S7 S8 S9 S11 S12 S S1 S2 W(ω,β) Slide of β tuplesω tuples in the window t
  • 59. http://streamreasoning.org/rsp2014 59 R2R operator Tuple-based sliding window S3 S4 S5 S6 S7 S8 S9 S11 S12 S S1 S2 W(ω,β) Slide of β tuplesω tuples in the window t
  • 60. http://streamreasoning.org/rsp2014 60 R2R operator Tuple-based sliding window S3 S4 S5 S6 S7 S8 S9 S11 S12 S S1 S2 W(ω,β) Slide of β tuplesω tuples in the window t
  • 61. http://streamreasoning.org/rsp2014 61 R2R operator Tuple-based sliding window S3 S4 S5 S6 S7 S8 S9 S11 S12 S S1 S2 W(ω,β) Slide of β tuplesω tuples in the window t Contemporaneity implies a non-deterministic selection
  • 62. http://streamreasoning.org/rsp2014 62 SPARQL: a quick recap
  • 63. http://streamreasoning.org/rsp2014 63 SPARQL: a quick recap
  • 64. http://streamreasoning.org/rsp2014 The query output  Which is the format of the answer?  We can distinguish two cases 1. No R2S operator: the output is a relation (that changes during the time) 2. R2S operator: a stream. – An RDF stream? It depends by the Query Form 22 S2R operators R2S operators SPARQL operators RDF Mappings RDF Streams
  • 65. http://streamreasoning.org/rsp2014 No R2S operator: relation 23 RSP SELECT ?a ?b … FROM …. WHERE …. a … b… [t1] a … b… a … b… [t3] a … b… [t5] a … b… [t7] queries bindings
  • 66. http://streamreasoning.org/rsp2014 No R2S operator: relation 23 RSP SELECT ?a ?b … FROM …. WHERE …. CONSTRUCT {?a :prop ?b } FROM …. WHERE …. a … b… [t1] a … b… a … b… [t3] a … b… [t5] a … b… [t7] <… :prop … > [t1] <… :prop … > <… :prop … > [t3] <… :prop … > [t5] <… :prop … > [t7] queries bindings triples
  • 67. http://streamreasoning.org/rsp2014 R2S operator: stream  R2S operators  Three operators:  Rstream: streams out all data in the last step  Istream: streams out data in the last step that wasn’t on the previous step, i.e. streams out what is new  Dstream: streams out data in the previous step that isn’t in the last step, i.e. streams out what is old 24 CONSTRUCT RSTREAM {?a :prop ?b } FROM …. WHERE …. … <… :prop … > [t1] <… :prop … > [t1] <… :prop … > [t3] <… :prop … > [t5] < …:prop … > [t7] … RSP query stream
  • 68. http://streamreasoning.org/rsp2014 Brief overview on the CEP operators  Sequence operators and CEP world  SEQ: joins eti,tf and e’ti’,tf’ if e’ occurs after e  EQUALS: joins eti,tf and e’ti’,tf’ if they occur simultaneously  OPTIONALSEQ, OPTIONALEQUALS: Optional join variants 25 e1 e2 e3 e4 S 3 6 91 Sequence Simultaneous
  • 69. http://streamreasoning.org/rsp2014 Outline 1. Continuous RDF model extensions • RDF Streams, timestamps 2. Continuous extensions of SPARQL • Continuous evaluation • Additional operators 3. Overview of existing systems • Features • Comparison 26
  • 70. http://streamreasoning.org/rsp2014 Existing RSP systems (oversimplified!)  C-SPARQL: RDF Store + Stream processor • Combined architecture  27 RDF Store Stream processor C-SPARQL query continuous results translator
  • 71. http://streamreasoning.org/rsp2014 Existing RSP systems (oversimplified!)  C-SPARQL: RDF Store + Stream processor • Combined architecture  CQELS: Implemented from scratch. Focus on performance • Native + adaptive joins for static-data and streaming data 27 RDF Store Stream processor C-SPARQL query continuous results Native RSPCQELS query continuous results translator
  • 72. http://streamreasoning.org/rsp2014 Existing RSP systems (oversimplified!)  SPARQLstream: Ontology-based stream query answering • Virtual RDF views, using R2RML mappings • SPARQL stream queries over the original data streams.  EP-SPARQL: Complex-event detection • SEQ, EQUALS operators  28 DSMS/CEPSPARQLStream query continuous results rewriter R2RML mappings Prolog engine EP-SPARQL query continuous results translator
  • 73. http://streamreasoning.org/rsp2014 Existing RSP systems (oversimplified!)  SPARQLstream: Ontology-based stream query answering • Virtual RDF views, using R2RML mappings • SPARQL stream queries over the original data streams.  EP-SPARQL: Complex-event detection • SEQ, EQUALS operators  Instans: RETE-based evaluation 28 DSMS/CEPSPARQLStream query continuous results rewriter R2RML mappings Prolog engine EP-SPARQL query continuous results translator
  • 74. http://streamreasoning.org/rsp2014 Classification of existing systems Model Continuous execution Union,Join, Optional, Filter Aggregates Timewindow Triplewindow R2Soperator Sequence, Co-ocurrence TA- SPARQL TA-RDF ✗ ✔ Limited ✗ ✗ ✗ ✗ tSPARQL tRDF ✗ ✔ ✗ ✗ ✗ ✗ ✗ Streaming SPARQL RDF Stream ✔ ✔ ✗ ✔ ✔ ✗ ✗ C-SPARQL RDF Stream ✔ ✔ ✔ ✔ ✔ Rstream only time function CQELS RDF Stream ✔ ✔ ✔ ✔ ✔ Istream only ✗ SPARQLStr eam (Virtual) RDF Stream ✔ ✔ ✔ ✔ ✗ ✔ ✗ EP- SPARQL RDF Stream ✔ ✔ ✔ ✗ ✗ ✗ ✔ Instans RDF ✔ ✔ ✔ ✗ ✗ ✗ ✗ 29Disclaimer: other features may be missing
  • 75. http://streamreasoning.org/rsp2014 Classification of existing systems Model Continuous execution Union,Join, Optional, Filter Aggregates Timewindow Triplewindow R2Soperator Sequence, Co-ocurrence TA- SPARQL TA-RDF ✗ ✔ Limited ✗ ✗ ✗ ✗ tSPARQL tRDF ✗ ✔ ✗ ✗ ✗ ✗ ✗ Streaming SPARQL RDF Stream ✔ ✔ ✗ ✔ ✔ ✗ ✗ C-SPARQL RDF Stream ✔ ✔ ✔ ✔ ✔ Rstream only time function CQELS RDF Stream ✔ ✔ ✔ ✔ ✔ Istream only ✗ SPARQLStr eam (Virtual) RDF Stream ✔ ✔ ✔ ✔ ✗ ✔ ✗ EP- SPARQL RDF Stream ✔ ✔ ✔ ✗ ✗ ✗ ✔ Instans RDF ✔ ✔ ✔ ✗ ✗ ✗ ✗ 29Disclaimer: other features may be missing
  • 76. http://streamreasoning.org/rsp2014 Similar models, similar (not equals!) query languages 30
  • 77. http://streamreasoning.org/rsp2014 Similar models, similar (not equals!) query languages 30 SELECT ?sensor FROM NAMED STREAM <http://www.cwi.nl/SRBench/observations> [NOW-3 HOURS SLIDE 10 MINUTES] WHERE { ?observation om-owl:procedure ?sensor ; om-owl:observedProperty weather:WindSpeed ; om-owl:result [ om-owl:floatValue ?value ] . } GROUP BY ?sensor HAVING ( AVG(?value) >= "74"^^xsd:float ) SPARQLStream
  • 78. http://streamreasoning.org/rsp2014 Similar models, similar (not equals!) query languages 30 SELECT ?sensor FROM NAMED STREAM <http://www.cwi.nl/SRBench/observations> [NOW-3 HOURS SLIDE 10 MINUTES] WHERE { ?observation om-owl:procedure ?sensor ; om-owl:observedProperty weather:WindSpeed ; om-owl:result [ om-owl:floatValue ?value ] . } GROUP BY ?sensor HAVING ( AVG(?value) >= "74"^^xsd:float ) SELECT ?sensor FROM STREAM <http://www.cwi.nl/SRBench/observations> [RANGE 1h STEP 10m] WHERE { ?observation om-owl:procedure ?sensor ; om-owl:observedProperty weather:WindSpeed ; om-owl:result [ om-owl:floatValue ?value ] . } GROUP BY ?sensor HAVING ( AVG(?value) >= "74"^^xsd:float ) SPARQLStream C-SPARQL
  • 79. http://streamreasoning.org/rsp2014 Similar models, similar (not equals!) query languages 30 SELECT ?sensor FROM NAMED STREAM <http://www.cwi.nl/SRBench/observations> [NOW-3 HOURS SLIDE 10 MINUTES] WHERE { ?observation om-owl:procedure ?sensor ; om-owl:observedProperty weather:WindSpeed ; om-owl:result [ om-owl:floatValue ?value ] . } GROUP BY ?sensor HAVING ( AVG(?value) >= "74"^^xsd:float ) SELECT ?sensor WHERE { STREAM <http://www.cwi.nl/SRBench/observations> [RANGE 10800s SLIDE 600s] { ?observation om-owl:procedure ?sensor ; om-owl:observedProperty weather:WindSpeed ; om-owl:result [ om-owl:floatValue ?value ] .} } GROUP BY ?sensor HAVING ( AVG(?value) >= "74"^^xsd:float ) SELECT ?sensor FROM STREAM <http://www.cwi.nl/SRBench/observations> [RANGE 1h STEP 10m] WHERE { ?observation om-owl:procedure ?sensor ; om-owl:observedProperty weather:WindSpeed ; om-owl:result [ om-owl:floatValue ?value ] . } GROUP BY ?sensor HAVING ( AVG(?value) >= "74"^^xsd:float ) SPARQLStream CQELS C-SPARQL
  • 80. http://streamreasoning.org/rsp2014 80 The correctness problem (1)    S1S t1 :alice :isIn :hall
  • 81. http://streamreasoning.org/rsp2014 81 The correctness problem (1)    S1 S2S t31 :alice :isIn :hall :bob :isIn :hall
  • 82. http://streamreasoning.org/rsp2014 82 The correctness problem (1)    S1 S2 S3S t3 61 :alice :isIn :hall :bob :isIn :hall :alice :isIn :kitchen
  • 83. http://streamreasoning.org/rsp2014 83 The correctness problem (1)    S1 S2 S3 S4S t3 6 91 :alice :isIn :hall :bob :isIn :hall :alice :isIn :kitchen :bob :isIn :kitchen
  • 84. http://streamreasoning.org/rsp2014 84 The correctness problem (1)  Where are Alice and Bob, when they are together?   S1 S2 S3 S4S t3 6 91 :alice :isIn :hall :bob :isIn :hall :alice :isIn :kitchen :bob :isIn :kitchen
  • 85. http://streamreasoning.org/rsp2014 85 The correctness problem (1)  Where are Alice and Bob, when they are together?  Let’s consider a tumbling window W(ω=β=5)  S1 S2 S3 S4S t3 6 91 :alice :isIn :hall :bob :isIn :hall :alice :isIn :kitchen :bob :isIn :kitchen
  • 86. http://streamreasoning.org/rsp2014 86 The correctness problem (1)  Where are Alice and Bob, when they are together?  Let’s consider a tumbling window W(ω=β=5)  Let’s execute the experiment 4 times on C- SPARQL S1 S2 S3 S4S t3 6 91 :alice :isIn :hall :bob :isIn :hall :alice :isIn :kitchen :bob :isIn :kitchen
  • 87. http://streamreasoning.org/rsp2014 87 The correctness problem (1)  Where are Alice and Bob, when they are together?  Let’s consider a tumbling window W(ω=β=5)  Let’s execute the experiment 4 times on C- SPARQL Execution 1° answer 2° answer 1 :hall [6] :kitchen [11] 2 :hall [5] :kitchen [10] 3 :hall [6] :kitchen [11] 4 - [7] - [12] S1 S2 S3 S4S t3 6 91 :alice :isIn :hall :bob :isIn :hall :alice :isIn :kitchen :bob :isIn :kitchen
  • 88. http://streamreasoning.org/rsp2014 88 The correctness problem (1)  Where are Alice and Bob, when they are together?  Let’s consider a tumbling window W(ω=β=5)  Let’s execute the experiment 4 times on C- SPARQL Execution 1° answer 2° answer 1 :hall [6] :kitchen [11] 2 :hall [5] :kitchen [10] 3 :hall [6] :kitchen [11] 4 - [7] - [12] S1 S2 S3 S4S t3 6 91 :alice :isIn :hall :bob :isIn :hall :alice :isIn :kitchen :bob :isIn :kitchen Which is the correct answer?
  • 89. http://streamreasoning.org/rsp2014 89 RSP output correctness: the t0 parameter Exec 1° answer 2° answer 1 :hall [6] :kitchen [11] 2 :hall [5] :kitchen [10] 3 :hall [6] :kitchen [11] 4 - [7] - [12] S1 S2 S3 S4S t3 6 91 :bob :isIn :hall :bob :isIn :kitchen :alice :isIn :hall :alice :isIn :kitchen
  • 90. http://streamreasoning.org/rsp2014 90 RSP output correctness: the t0 parameter Exec 1° answer 2° answer 1 :hall [6] :kitchen [11] 2 :hall [5] :kitchen [10] 3 :hall [6] :kitchen [11] 4 - [7] - [12] S1 S2 S3 S4S t3 6 91 :bob :isIn :hall :bob :isIn :kitchen t0=0 :alice :isIn :hall :alice :isIn :kitchen
  • 91. http://streamreasoning.org/rsp2014 91 RSP output correctness: the t0 parameter Exec 1° answer 2° answer 1 :hall [6] :kitchen [11] 2 :hall [5] :kitchen [10] 3 :hall [6] :kitchen [11] 4 - [7] - [12] S1 S2 S3 S4S t3 6 91 :bob :isIn :hall :bob :isIn :kitchen t0=0 Window 1° answer 2° answer t0=0 :hall [5] :kitchen [10] :alice :isIn :hall :alice :isIn :kitchen
  • 92. http://streamreasoning.org/rsp2014 92 RSP output correctness: the t0 parameter Exec 1° answer 2° answer 1 :hall [6] :kitchen [11] 2 :hall [5] :kitchen [10] 3 :hall [6] :kitchen [11] 4 - [7] - [12] S1 S2 S3 S4S t3 6 91 :bob :isIn :hall :bob :isIn :kitchen t0=0 Window 1° answer 2° answer t0=0 :hall [5] :kitchen [10] :alice :isIn :hall :alice :isIn :kitchen t0=1
  • 93. http://streamreasoning.org/rsp2014 93 RSP output correctness: the t0 parameter Exec 1° answer 2° answer 1 :hall [6] :kitchen [11] 2 :hall [5] :kitchen [10] 3 :hall [6] :kitchen [11] 4 - [7] - [12] S1 S2 S3 S4S t3 6 91 :bob :isIn :hall :bob :isIn :kitchen t0=0 Window 1° answer 2° answer t0=0 :hall [5] :kitchen [10] t0=1 :hall [6] :kitchen [11] :alice :isIn :hall :alice :isIn :kitchen t0=1
  • 94. http://streamreasoning.org/rsp2014 94 RSP output correctness: the t0 parameter Exec 1° answer 2° answer 1 :hall [6] :kitchen [11] 2 :hall [5] :kitchen [10] 3 :hall [6] :kitchen [11] 4 - [7] - [12] S1 S2 S3 S4S t3 6 91 :bob :isIn :hall :bob :isIn :kitchen t0=0 Window 1° answer 2° answer t0=0 :hall [5] :kitchen [10] t0=1 :hall [6] :kitchen [11] :alice :isIn :hall :alice :isIn :kitchen t0=1 t0=2
  • 95. http://streamreasoning.org/rsp2014 95 RSP output correctness: the t0 parameter Exec 1° answer 2° answer 1 :hall [6] :kitchen [11] 2 :hall [5] :kitchen [10] 3 :hall [6] :kitchen [11] 4 - [7] - [12] S1 S2 S3 S4S t3 6 91 :bob :isIn :hall :bob :isIn :kitchen t0=0 Window 1° answer 2° answer t0=0 :hall [5] :kitchen [10] t0=1 :hall [6] :kitchen [11] t0=2 - [7] - [12] :alice :isIn :hall :alice :isIn :kitchen t0=1 t0=2
  • 96. http://streamreasoning.org/rsp2014 96 RSP output correctness: the t0 parameter Exec 1° answer 2° answer 1 :hall [6] :kitchen [11] 2 :hall [5] :kitchen [10] 3 :hall [6] :kitchen [11] 4 - [7] - [12] S1 S2 S3 S4S t3 6 91 :bob :isIn :hall :bob :isIn :kitchen t0=0 Window 1° answer 2° answer t0=0 :hall [5] :kitchen [10] t0=1 :hall [6] :kitchen [11] t0=2 - [7] - [12] :alice :isIn :hall :alice :isIn :kitchen t0=1 t0=2
  • 97. http://streamreasoning.org/rsp2014 97 The correctness problem (2) Execution 1° answer 2° answer 1 :hall [6] :kitchen [11] 2 :hall [5] :kitchen [10] 3 :hall [6] :kitchen [11] 4 - [7] - [12] C-SPARQL S1 S2 S3 S4S t3 6 91 :bob :isIn :hall :bob :isIn :kitchen :alice :isIn :hall :alice :isIn :kitchen
  • 98. http://streamreasoning.org/rsp2014 98 The correctness problem (2) Execution 1° answer 2° answer 1 :hall [6] :kitchen [11] 2 :hall [5] :kitchen [10] 3 :hall [6] :kitchen [11] 4 - [7] - [12] Execution 1° answer 2° answer 1 :hall [3] :kitchen [9] 2 No answers 3 :hall [3] :kitchen [9] 4 No answers C-SPARQL CQELS S1 S2 S3 S4S t3 6 91 :bob :isIn :hall :bob :isIn :kitchen :alice :isIn :hall :alice :isIn :kitchen
  • 99. http://streamreasoning.org/rsp2014 99 The correctness problem (2) Execution 1° answer 2° answer 1 :hall [6] :kitchen [11] 2 :hall [5] :kitchen [10] 3 :hall [6] :kitchen [11] 4 - [7] - [12] Execution 1° answer 2° answer 1 :hall [3] :kitchen [9] 2 No answers 3 :hall [3] :kitchen [9] 4 No answers C-SPARQL CQELS Which system behaves in the correct way? S1 S2 S3 S4S t3 6 91 :bob :isIn :hall :bob :isIn :kitchen :alice :isIn :hall :alice :isIn :kitchen
  • 100. http://streamreasoning.org/rsp2014 100 The correctness problem (2) Execution 1° answer 2° answer 1 :hall [6] :kitchen [11] 2 :hall [5] :kitchen [10] 3 :hall [6] :kitchen [11] 4 - [7] - [12] Execution 1° answer 2° answer 1 :hall [3] :kitchen [9] 2 No answers 3 :hall [3] :kitchen [9] 4 No answers C-SPARQL CQELS Which system behaves in the correct way? S1 S2 S3 S4S t3 6 91 :bob :isIn :hall :bob :isIn :kitchen :alice :isIn :hall :alice :isIn :kitchen Both!
  • 101. http://streamreasoning.org/rsp2014 101 R2R operator The window operator (through SECRET) S3 S4 S5 S6 S7 S8 S9 S10 S11 S12 S S1 S2 W(ω,β) β ω t
  • 102. http://streamreasoning.org/rsp2014 102 R2R operator The window operator (through SECRET) S3 S4 S5 S6 S7 S8 S9 S10 S11 S12 S S1 S2 W(ω,β) β ω t0: When does the window start? (internal window param) t
  • 103. http://streamreasoning.org/rsp2014 103 R2R operator The window operator (through SECRET) S3 S4 S5 S6 S7 S8 S9 S10 S11 S12 S S1 S2 W(ω,β) β ω t0: When does the window start? (internal window param) TICK: When are data stream elements added to the window? Triple-based vs graph-based t
  • 104. http://streamreasoning.org/rsp2014 104 R2R operator The window operator (through SECRET) S3 S4 S5 S6 S7 S8 S9 S10 S11 S12 S S1 S2 W(ω,β) β ω t0: When does the window start? (internal window param) TICK: When are data stream elements added to the window? Triple-based vs graph-based REPORT: When is the window content made available to the R2R operator? Non-empty content, Content-change, Window-close, Periodic t
  • 105. http://streamreasoning.org/rsp2014 Understanding the RSPs  They share similar models, but they behave in different ways  The C-SPARQL, CQELS and SPARQLstream models does not allow to determine in a unique way which should be the answer given the inputs and the query • There are missing parameters (encoded in the implementations)  Why is it important to understand those behaviours? • To assess the correct implementation of the systems • To improve the comprehension of the benchmarking  W3C RDF stream processor community group started to jointly work out a recommendation in 2014  http://www.w3.org/community/rsp/ 35
  • 106. http://streamreasoning.org/rsp2014 References  DSMSs and CEPs • Arasu, A., Babu, S., Widom, J.: The CQL continuous query language : semantic foundations. The VLDB Journal 15(2) (2006) 121–142 • Gianpaolo Cugola, Alessandro Margara: Processing flows of information: From data stream to complex event processing. ACM Comput. Surv. 44(3): 15 (2012) • Botan, I., Derakhshan, R., Dindar, N., Haas, L., Miller, R.J., Tatbul, N.: Secret: A model for analysis of the execution semantics of stream processing systems. PVLDB 3(1) (2010) 232–243  RDF Stream Processors • Barbieri, D.F., Braga, D., Ceri, S., Della Valle, E., Grossniklaus, M.: C-SPARQL: A continuous query language for RDF data streams. IJSC 4(1) (2010) 3–25 • Calbimonte, J.P., Jeung, H., Corcho, O., Aberer, K.: Enabling Query Technologies for the Semantic Sensor Web. IJSWIS 8(1) (2012) 43–63 • Le-Phuoc, D., Dao-Tran, M., Xavier Parreira, J., Hauswirth, M.: A native and adaptive approach for unified processing of linked streams and linked data. In: ISWC. (2011) 370–388 • Anicic, D., Fodor, P., Rudolph, S., Stojanovic, N.: EP-SPARQL: a unified language for event processing and stream reasoning. In: WWW. (2011) 635–644  Benchmarks and RSP comparison • Ying Zhang, Minh-Duc Pham, Óscar Corcho, Jean-Paul Calbimonte: SRBench: A Streaming RDF/SPARQL Benchmark. International Semantic Web Conference (1) 2012: 641-657 • Danh Le Phuoc, Minh Dao-Tran, Minh-Duc Pham, Peter A. Boncz, Thomas Eiter, Michael Fink: Linked Stream Data Processing Engines: Facts and Figures. International Semantic Web Conference (2) 2012: 300-312 • Daniele Dell'Aglio, Jean-Paul Calbimonte, Marco Balduini, Óscar Corcho, Emanuele Della Valle: On Correctness in RDF Stream Processor Benchmarking. International Semantic Web Conference (2) 2013: 326-342 36
  • 107. Tutorial on RDF Stream Processing M. Balduini, J-P Calbimonte, O. Corcho, D. Dell'Aglio, E. Della Valle http://streamreasoning.org/rsp2014 RDF Stream models Continuous query models Daniele Dell’Aglio daniele.dellaglio@polimi.it

×