-
Notifications
You must be signed in to change notification settings - Fork 12
Stream to Relation Operators
public interface StreamToRelationOp<I, O> extends Consumer<I> {
String iri();
default boolean named() {
return iri() != null;
}
Report report();
Tick tick();
Time time();
Content<I, O> compute(long t_e, Window w);
Content<I, O> getContent(long now);
List<Content<I, O>> getContents(long now);
TimeVarying<O> set(SDS<O> sds);
}
In RSP-QL syntax, an iri can be used to
name the pair windowOp-stream.
The methods iri()
and named()
of the StreamToRelationOp
relates to this language feature.
The methods report()
, tick()
, time()
relates to the engine Execution Semantics, and how it refelcts on the Operators implementation.
The most important methods are those related to content, which is also part of the SECRET MODEL, but specifically relates to the window behavior.
In particular, the StreamToRelationOp
interface is parametrics.
- I represents the variable type of the input, e.g., RDF TRIPLE, RDF GRAPHS OR TUPLE
- O represents the variable type of the maintained status, e.g., BAG of RDF Triple, RDF Graph (set) or RELATION
It extends the Consumer
interface (see below), which allow sending timestamped data items.
public interface Consumer<I> {
void notify(I arg, long ts);
}
RSP-QL is a declarative language, therefore we must decouple the runtime logic of the window operator from the syntax interpretation and parsing. The factory represents the logic of applying the Operator Specification to a given stream, under a given name.
public interface StreamToRelationOperatorFactory<I, O> {
TimeVarying<O> apply(WebDataStream<I> s, IRI iri);
}