RSP4J is an API for RDF stream processing that addresses gaps in existing solutions. It provides an extensible architecture, declarative access to streams and queries, and programming abstractions to enable fast prototyping, benchmarking, and dissemination of RSP techniques. The API generalizes common operators, implements execution semantics of engines like YASPER and CSPARQL 2.0, and allows controlling query execution. RSP4J aims to foster practical RSP research by simplifying the implementation of new solutions, engines, and optimizations.
6. Is it possible to make sense in real time of multiple,
heterogeneous, gigantic and inevitably noisy and
incomplete data streams in order to support the decision
processes of extremely large numbers of concurrent users?
E. Della Valle, S. Ceri, F. van Harmelen & H. Stuckenschmidt, 2010
Research question
STREAM REASONING
Emanuele Della Valle - http://emanueledellavalle.org - @manudellavalle 6
9. time
What is a Stream?
9
• Streams: unbounded partially ordered sequence of data in
form of object-timestamp pairs <o,t>, e.g.,
• o is a coloured box
• t is a natural number
10. Sort out all the colours in the streams
What is Stream Processing?
stateless
order
…..
…..
…..
…..
…..
…..
10
11. ( , 15)
time
1 minute wide window
How many boxes, grouped by color,
there are in the last minute?
What is Stream Processing?
stateful
11
23. ff
erences
• Syntaxes are not interoperable
• Have di
ff
erent operational
semantics
• Not all of them integrate static
knowledge
• RDF Streams ok, but graphs or
triples?
RSP Dialects & Engines
23
24. Similarities
• Extend SPARQL with windows
• Evaluates queries under
continuous semantics
• Optimise the execution for low-
latency high-throughput (stream
processing requirements)
RSP Dialects & Engines
24
25. Dell’Aglio et al.
• Reference model that uniforms
existing solutions
• has formal semantics
(denotational)
• can explain operational
semantics
• Solutions published after
(e.g., YASPER 1.0, TPF-QS,
Strider) align to it
RSP-QL
Continuous
Querying:
SPARQL
Identifiers: URI
Cryptography
Trust
Ontologies: OWL
Proof
Unifying Logic
Rules: RIF/SWIRL
Taxonomies: RDFS
Data Interchange: RDF
Character Set: UNICODE
Syntax: XML, TTL, NT, JSON-LD
User Interfaces and Applications
25
26. Dell’Aglio et al.
• Reference model that uniforms
existing solutions
• has formal semantics
(denotational)
• can explain operational
semantics
• Solutions published after
(e.g., YASPER 1.0, TPF-QS,
Strider) align to it
RSP-QL
Continuous
Querying:
RSP-QL
Identifiers: URI
Cryptography
Trust
Ontologies: OWL
Proof
Unifying Logic
Rules: RIF/SWIRL
Taxonomies: RDFS
Continuous Interchange:
RDF Stream
Character Set: UNICODE
Syntax: XML, TTL, NT, JSON-LD
User Interfaces and Applications
?
?
?
?
26
Continuous
Querying:
SPARQL
Data Interchange: RDF
28. The Stream Reasoning community needs systems and tools
that can encourage re-use and foster the adoption of existing
solutions for RDF Stream Processing.
Tommasini, and Della Valle. "Challenges & Opportunities of RSP-QL Implementations."
WSP/WOMoCoE@ ISWC. 2017.
Problem Statement
RSP4J
28
29. Currently, the following tasks are hard to do..
Uncomfortable Truths
You need to
implement your RSP
engine from scratch
29
• Introducing new window operators
• Experiment optimisation techniques
• Comparing di
ff
erent engines
Does he bite? No, but he can hurt
you in other ways!
31. Requirements
1. Extensible Architecture.
2. Declarative Access
3. Programming Abstractions
4. Experimentation
5. Observability
C1 C2 C3 C4 C5 C6 C7 C8 C9 C10
R1 ✓ ✓ ✓ ✓ ✓
R2 ✓ ✓ ✓
R3 ✓ ✓ ✓
R4 ✓ ✓ ✓
R5 ✓ ✓ ✓ ✓ ✓
R
R
R
R
R
And their relation to the challenges
31
32. RSP4J
30.000ft View: Architecture
Extensible parser based on
the RSP-QL Syntax Proposal
(R1, R2)
Abstract representing the
evaluation under continuous
semantics (R3,R5)
Abstract Representation of A
Streaming Dataset for
backwards compatibility with
SPARQL (R3)
Con
fi
gurable engine capable
of reproducing existing
behaviours (R4,R5)
Versatile Object for
representing streams (non
strictly RDF based) (R1)
Operator Interface based on
RSP-QL/CQL (R1, R3)
(e)
32
34. 10.000ft View: Streams
• Two main interfaces:
• Web Stream (vid. Vocals)
• Data Stream (generic)
• Simple Approach for production
and consumption
• We recently added the IO
package with lots of sources
RSP4J
34
35. 10.000ft View: Streams
• Two main interfaces:
• Web Stream (vid. Vocals)
• Data Stream (generic)
• Simple Approach for production
and consumption
• We recently added the IO
package with lots of sources
RSP4J
35
36. 10.000ft View: Operators
• Generalise CQL Style of operators
families
• Includes already canonical
examples of S2R
• CQELS’s Window Operator
• CSPARQL’s Window Operator
• Includes generic implementation of
R2S
• RStream, IStream, DStream
RSP4J
36
37. 10.000ft View: Engine
• Allows controlling the engine,
e.g., query registration and
cancellation.
• RSP4J can reproduce the
execution semantics of common
RSP engines
• Already include some bindings,
YASPER, CSPARQL 2.0,
ONSPER*
RSP4J
RSP4J: Engine
YASPER CSPARQL 2.0
Esper + Jena
RDF Commons
+ JGraphT
ONSPER
Esper + Calcite
+ Ontop
binds
Runtime
Interface
37
38. Enables the following research directions
Does the window operator X
outperform window operator Y for
both C-SPARQL and CQELS
execution semantics?
RSP4J
IMPLEMENT
MY RSP
SOLUTION
FROM
SCRATCH
RSP4J
38
39. Enables the following research directions
Does this alternative memory
representation optimise CityBench’
RSP-QL queries using the Strider
Engine?
RSP4J
IMPLEMENT
MY RSP
SOLUTION
FROM
SCRATCH
RSP4J
39
40. Enables the following research directions
Can I apply a bunch of RSP
engines to my use-case and
observe which performs better?
RSP4J
IMPLEMENT
MY RSP
SOLUTION
FROM
SCRATCH
RSP4J
40
41. • June 28-July 2, 2021, Virtual
Event, Italy
• http://streamreasoning.org/
events/web-stream-processing-
with-rsp4j
• We will prototype an engine!
• Big Updates: Publishing &
New Abstract API!
DEBS 21 Tutorial (Free)
Learning N di
ff
erent
RSP Dialects
N > 4
Learning
RSP4J
41
42. Conclusion
Roadmap
RSP4J is a community effort that we hope will
foster further practical research on RSP/SR
We plan to organise events and
hackathons to foster its adoption
We plan to integrate it with RSPLab and
existing benchmarks like CityBench
We plan to integrate more engines, provide
more operators, and (hopefully) optimisations
To foster data science, we plan to make it available via
Jupyter Notebook with python Bindings (RSPLib)
…
Benchmarks
Integration
RSP4J
RELEASE
CQELS
bindings
42
Python
Bindings
DEBS 2021
TUTORIAL
RSP4J Repo
Stream Reasoning
Workshop 2021
Publication and
Abstraction API
Questions?