On correctness in RDF stream processor benchmarking

16
On correctness in RDF stream processor benchmarking Daniele Dell’Aglio, Jean-Paul Calbimonte, Marco Balduini, Oscar Corcho and Emanuele Della Valle

Transcript of On correctness in RDF stream processor benchmarking

Page 1: On correctness in RDF stream processor benchmarking

On correctness in RDF stream processor benchmarking

Daniele Dell’Aglio, Jean-Paul Calbimonte, Marco Balduini, Oscar Corcho and Emanuele Della Valle

Page 2: On correctness in RDF stream processor benchmarking

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

Executio

n

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?

width

slide

All of them!

ISWC, 24 October 2013On correctness in RDF stream processor benchmarking2/16

Page 3: On correctness in RDF stream processor benchmarking

The correctness problem (2)

System 1 System 2

Which system behaves in the

correct way?

Executio

n

1° answer 2° answer

1 :hall [6] :kitchen [11]

2 :hall [5] :kitchen [10]

3 :hall [6] :kitchen [11]

4 - [7] - [12]

Executio

n

1° answer 2° answer

1 :hall [3] :kitchen [9]

2 No answers

3 :hall [3] :kitchen [9]

4 No answers

S1 S2 S3 S4S

t3 6 91

:bob :isIn :hall :bob :isIn :kitchen

:alice :isIn :hall :alice :isIn :kitchen

Both!

ISWC, 24 October 2013On correctness in RDF stream processor benchmarking3/16

Page 4: On correctness in RDF stream processor benchmarking

Different results for the same query? Yes!

Given the same data and the same query, we notice that a system can provide multiple correct answers

The operational semantics of the systems often do not explain this behaviour

Two systems can provide different correct answers

Even if the system implements similar operational semantics, they behave in different ways (that the model does not explain)

Why is it important to understand those

behaviours?

To assess the correct implementation of the systems

To improve the comprehension of the benchmarking

ISWC, 24 October 2013On correctness in RDF stream processor benchmarking4/16

Page 5: On correctness in RDF stream processor benchmarking

Our contribution

A common model for the RDF stream processor

operational semantics

We propose CSR-bench, an extension of the

SRbench benchmark that focuses on correctness

An oracle (an automatic correctness validator)

A test suite

We considered the window-based RDF stream

processors

CQELS

C-SPARQL

SPARQLstream

ISWC, 24 October 2013On correctness in RDF stream processor benchmarking5/16

Page 6: On correctness in RDF stream processor benchmarking

The CSR Model (by CQL)

Converts the infinite stream of RDF elements in a

finite set of mappings

The window operators: time-based, tuple-based,

Transform a set of mappings in another set of

mappings

SPARQL 1.0/1.1 queries

Each set of mapping produced by the R2R

operator is transformed and appended to the

output stream

Operators: RStream, DStream, IStream

S2R

operator

R2R

operator

R2S

operator

Input stream

Output stream

ISWC, 24 October 2013On correctness in RDF stream processor benchmarking6/16

Page 7: On correctness in RDF stream processor benchmarking

R2R operator

The window operator (through SECRET)

S3

S4 S5

S6

S7

S8

S9 S10

S11

S12

SS1

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

ISWC, 24 October 2013On correctness in RDF stream processor benchmarking7/16

Page 8: On correctness in RDF stream processor benchmarking

Classification of existing systems

The report and the tick policies are related to the

RSPs implementation and on how they implement

the window operators

Analysing the RSPs and their related documentation

(papers, technical reports, etc.), we classified the

systems:

CQELS C-SPARQL SPARQLstream

Report Content-change Window-close

Non-empty

content

Window-close

Non-empty

content

Tick Tuple-driven Tuple-driven Tuple-driven

Empty relation

notification

No Yes No

ISWC, 24 October 2013On correctness in RDF stream processor benchmarking8/16

Page 9: On correctness in RDF stream processor benchmarking

RSP output correctness

S1 S2 S3 S4S

t3 6 91

:bob :isIn :hall :bob :isIn :kitchen

t0=0

Execution 1° answer 2° answer

1 :hall [6] :kitchen [11]

2 :hall [5] :kitchen

[10]

3 :hall [6] :kitchen [11]

4 - [7] - [12]

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

ISWC, 24 October 2013On correctness in RDF stream processor benchmarking9/16

Page 10: On correctness in RDF stream processor benchmarking

RSP output correctness

System 1 System 2

Executio

n

1° answer 2° answer

1 :hall [6] :kitchen [11]

2 :hall [5] :kitchen [10]

3 :hall [6] :kitchen [11]

4 - [7] - [12]

Executio

n

1° answer 2° answer

1 :hall [3] :kitchen [9]

2 No answers

3 :hall [3] :kitchen [9]

4 No answers

S1 S2 S3 S4S

t3 6 91

:bob :isIn :hall :bob :isIn :kitchen

:alice :isIn :hall :alice :isIn :kitchen

Window-close vs

content-change

report policy

Empty relation

notification

(yes|no)ISWC, 24 October 2013On correctness in RDF stream processor benchmarking10/16

Page 11: On correctness in RDF stream processor benchmarking

Online

Offline

The oracle

Stream

importer

Query

transformer

Query

executor

Result

matcher

RSP

S q

M

Correctness

assessment

Available at: https://github.com/dellaglio/csrbench-oracle

(Apache 2.0 licence)

ISWC, 24 October 2013On correctness in RDF stream processor benchmarking11/16

Page 12: On correctness in RDF stream processor benchmarking

Design of the tests

As data set, we consider the LinkedSensorData data

set

Data stream describing blizzards and hurricanes in the

US

We designed the query set taking into account

Window size and slide parameters

Presence of aggregation operators

Joins of timestamped triples

We collected a set of seven parametrized queries

The list of the queries and their explanation is

available at: http://www.w3.org/wiki/CSRBench

ISWC, 24 October 2013On correctness in RDF stream processor benchmarking12/16

Page 13: On correctness in RDF stream processor benchmarking

Results

All the three systems that we

considered in our experiments

showed wrong behaviours

The defects we identified are related

to:

the window operator

Initialization

Slide parameter

Window contents

timestamps of the triples

Internal timestamp management

CQ

ELS

C-S

PA

RQ

L

SP

AR

QL

stre

a

Q1

Q2

Q3

Q4

Q5

Q6

Q7

ISWC, 24 October 2013On correctness in RDF stream processor benchmarking13/16

Page 14: On correctness in RDF stream processor benchmarking

(Removable) constraints

S2R

R2R R2SS2R

S2R

From single

to multi

window

From single to

multi stream

Reasonin

g

q2

Static

knowledgeMultiple

queries

ISWC, 24 October 2013On correctness in RDF stream processor benchmarking14/16

Page 15: On correctness in RDF stream processor benchmarking

Conclusions

A model that describes in a more accurate way the

RSPs’ operational semantics helps their

improvement:

Better design of the system

Prediction of the expected behaviours

A common and shared test environment helps

developers of both existing and upcoming RSPs

It becomes easier to set up experiments to detect defects

and to correct them

Possible improvements of the existing

benchmarks (e.g., SRbench and LSBench)

Design of new tests

Better interpretation of the experiment resultsISWC, 24 October 2013On correctness in RDF stream processor benchmarking15/16

Page 16: On correctness in RDF stream processor benchmarking

Thank you! Questions?

On correctness in RDF stream processor

benchmarkingDaniele Dell’Aglio (DEIB, Politecnico di Milano)

Jean-Paul Calbimonte (OEG, Universidad Politécnica de Madrid)

Marco Balduini (DEIB, Politecnico di Milano)

Oscar Corcho (OEG, Universidad Politécnica de Madrid)

Emanuele Della Valle (DEIB, Politecnico di Milano)

wiki: http://www.w3.org/wiki/CSRBench

software: https://github.com/dellaglio/csrbench-oracle

ISWC, 24 October 2013On correctness in RDF stream processor benchmarking16/16