Stream Reasoning for Linked Data
- M. Balduini, J-P Calbimonte, O. Corcho,
- D. Dell'Aglio, E. Della Valle
http://streamreasoning.org/events/sr4ld2014
C-SPARQL: A Continuous Extension of SPARQL Marco Balduini - - PowerPoint PPT Presentation
Stream Reasoning for Linked Data M. Balduini, J-P Calbimonte, O. Corcho, D. Dell'Aglio, E. Della Valle http://streamreasoning.org/events/sr4ld2014 C-SPARQL: A Continuous Extension of SPARQL Marco Balduini marco.balduini@polimi.it Share,
http://streamreasoning.org/events/sr4ld2014
http://streamreasoning.org/events/sr4ld2014
– “[source http://streamreasoning.org/rsp2014]” at the end of each reused slide – a credits slide stating
Data 2013” by M. Balduini, J-P Calbimonte, O. Corcho, D. Dell'Aglio,
2
http://streamreasoning.org/events/sr4ld2014
3
http://streamreasoning.org/events/sr4ld2014
4
http://streamreasoning.org/events/sr4ld2014
5
http://streamreasoning.org/events/sr4ld2014
6
http://streamreasoning.org/events/sr4ld2014
7
R
f 4 f
R
4
f
http://streamreasoning.org/events/sr4ld2014
8
Observation Sensor Person Post Room where discusses who
subClassOf subClassOf posts subPropOf
isWith isIn isConnectedTo
http://streamreasoning.org/events/sr4ld2014
Running Example
9
http://streamreasoning.org/events/sr4ld2014
Running Example
10 Sensor Room Person Time-stamp RedSensor RedRoom Alice T1 … … … … Person ChecksIn Time-stamp Bob BlueRoom T2 … … … Person IsIn With Time-stamp Carl null Bob T2 David RedRoom Elena T3 … … … …
http://streamreasoning.org/events/sr4ld2014
Running Example
– Timestamps are not required to be unique, they must be non- decreasing
11
Streamed RDF graph Time- stamp Stream :RedSensor :observes [ :who :Alice; :where :RedRoom ] . T1 rfid :Bob :posts [ :who :Bob ; :where :BlueRoom ] . T2 fs :Carl :posts [ :who :Carl , :Bob ] . T2 fb :David :posts [ :who :David , :Elena ; :where :RedRoom] T3 fb
http://streamreasoning.org/events/sr4ld2014
– QUERY form – STREAM form
12
http://streamreasoning.org/events/sr4ld2014
13
C-SPARQL Language
http://streamreasoning.org/events/sr4ld2014
C-SPARQL Language
14
http://streamreasoning.org/events/sr4ld2014
C-SPARQL Language
15
http://streamreasoning.org/events/sr4ld2014
C-SPARQL Language
16
http://streamreasoning.org/events/sr4ld2014
C-SPARQL Language
17
http://streamreasoning.org/events/sr4ld2014
18
C-SPARQL Language
http://streamreasoning.org/events/sr4ld2014
C-SPARQL Language
19
http://streamreasoning.org/events/sr4ld2014
C-SPARQL Language
20
http://streamreasoning.org/events/sr4ld2014
C-SPARQL Language
21
http://streamreasoning.org/events/sr4ld2014
C-SPARQL Language
22
http://streamreasoning.org/events/sr4ld2014
23
C-SPARQL Language
d1 d1 d1 d1 d1 d2 d2 d2 d2 d3 d3
t+40
t+50 t+60 t+70 t+80
http://streamreasoning.org/events/sr4ld2014
C-SPARQL Language
24
http://streamreasoning.org/events/sr4ld2014
C-SPARQL Language
25 Is in on 4 query
Stream
Stream Is with on f query Is In across
query Stream Stream
:Bob :posts [ :who :Bob ; :where :BlueRoom ] . :Carl :posts [ :who :Carl , :Bob ] . :Bob :isIn :BlueRoom . :Carl :isWith :Bob . :Carl :isIn :BlueRoom .
http://streamreasoning.org/events/sr4ld2014
26
C-SPARQL Language
http://streamreasoning.org/events/sr4ld2014
C-SPARQL Language
27
http://streamreasoning.org/events/sr4ld2014
C-SPARQL Language
REGISTER QUERY FindFollowers AS PREFIX f: <http://larkc.eu/csparql/sparql/jena/ext#> PREFIX : <http://…/sr4ld2014-onto#> SELECT ?someOne ?someOneElse ?room FROM STREAM <http://…/isIn> [RANGE 1m STEP 10s] WHERE { ?someOne :isIn ?room . ?someOneElse :isIn ?room . FILTER(?someOne!=?someOneElse ) FILTER (f:timestamp(?someOne :isIn ?room) < f:timestamp(?someOneElse :isIn ?room) }
28
http://streamreasoning.org/events/sr4ld2014
C-SPARQL Language
29
IRI identifying the graph containing the background information
http://streamreasoning.org/events/sr4ld2014
C-SPARQL Language
REGISTER QUERY QueryUnderRDFSEntailmentRegime AS PREFIX : <http://…/sr4ld2014-onto#> SELECT ?x ?room ?person FROM STREAM <http://…/fs> [RANGE 1m STEP 10s] FROM STREAM <http://…/sensors> [RANGE 1m STEP 10s] WHERE { ?x :observes [ :who ?person ; :where ?room ] .}
30 RDF graph Time-stamp Stream :RedSensor :observes [ :who :Alice; :where :RedRoom ] . t1 sensors :Bob :posts [ :who :Bob ; :where :RedRoom] . t2 fs ?x ?room ?person :RedSensor :RedRoom :Alice :Bob :RedRoom :Bob
http://streamreasoning.org/events/sr4ld2014
31
http://streamreasoning.org/events/sr4ld2014
Introduction
32
http://streamreasoning.org/events/sr4ld2014
Introduction
– RDF streams – C-SPARQL query – Result listerners
– http://streamreasoning.org/download/csparqlreadytogopack
– https://github.com/streamreasoning/CSPARQL-engine – https://github.com/streamreasoning/CSPARQL-ReadyToGoPack
33
http://streamreasoning.org/events/sr4ld2014
Introduction
34
http://streamreasoning.org/events/sr4ld2014
Introduction
– http://streamreasoning.org/download/rsp-service4csparql
– https://github.com/streamreasoning/rsp-services-csparql – https://github.com/streamreasoning/rsp-services-api – https://github.com/streamreasoning/rsp-services-client-example
35
http://streamreasoning.org/events/sr4ld2014
§ Read out more
– Davide Francesco Barbieri, Daniele Braga, Stefano Ceri, Emanuele Della Valle, Michael Grossniklaus: C-SPARQL: a Continuous Query Language for RDF Data
–
RDF streams with C-SPARQL, SIGMOD Record 39 (1) (2010) 20–26.
– M Balduini,E Della Valle: A Restful Interface for RDF Stream Processors. International Semantic Web Conference (Posters & Demos) 2013: 209-212
§ Downloads
§ See demos
§ Contact points
36
http://streamreasoning.org/events/sr4ld2014