UGent - imec
PREFIX ex: <http://rsp.js/>
REGISTER RStream
SELECT (AVG(?temperature) AS ?temp)
FROM NAMED WINDOW ex:w1 ON STREAM ex:stream [RANGE 30min STEP 15min]
WHERE {
WINDOW ex:w1 {
?sensor :hasTemperature ?temperature .
}
}
In distributed and decentralized systems,
Different RSP Agents may have different queries running over the same or different streams.
The results of these queries can be reused to optimize the execution of other queries.
Query containment
Results of one query are always a subset of the results for another query
Query Isomorphism
Queries are structurally identical, and will produce the same results.
Given a set of RSP Agents and their queries, if a parent query is introduced to the system.
Query Containment relationships between the parent query and the child queries are used to determine the reusability of the child query results.
So to get dependable correct results. We should just query the original data source?
New Query can be registered into the RSP Agent with the chunked window semantics.
The query registered can have the same aggregation function as the parent query.
SPARQL 1.1 Functions | Derivable Aggregation |
---|---|
COUNT, SUM | AVG |
AVG, COUNT | SUM |
MIN, MAX | RANGE (compute seperately, not SPARQL 1.1) |
SPARQL Functions | Derivable Aggregation |
---|---|
COUNT, SUM | AVG |
AVG, COUNT | SUM |
MIN, MAX | RANGE (compute seperately) |
SUM, COUNT, SUM OF SQUARES, SQRT | VAR, STDEV |
COUNT(DISTINCT), COUNT(*) | COUNT_DUPLICATES |
Streaming Query Hive is a Microservice which combines Multiple Streaming Queries to solve for a single parent query.
It is currently in development.