Stream and incremental processing
Problems
- Complex event processing
Detect patterns of events, such as sequences with predicates and time limits, over a stream and report each match.
advanced - View maintenance problem
Keep a materialized view equal to its defining query as the base tables change: by recomputation or by incremental deltas, at once or deferred.
advanced
Algorithms
- Symmetric hash join
Keep a hash table for each input; each arriving tuple is inserted in its own table and probes the other, producing results at once.
1 languagescore - Chain scheduling
Schedule stream operators by the slopes of the lower envelopes of their progress charts, so that tuples shrink as fast as possible and the queues between operators use little memory.
1 languagesadvanced - Incremental view maintenance
Update a materialized view from the changes to its base tables by delta rules, such as dR join S + R join dS + dR join dS, in place of a full recomputation.
1 languagesadvanced - XJoin
A symmetric hash join for unreliable sources that spills partitions to disk and joins them while inputs are blocked.
1 languagesadvanced - Asynchronous barrier snapshotting
Take consistent snapshots of a stream job by injecting barriers into the sources and aligning them at each operator, without stopping the job.
1 languagesresearch - DRed algorithm
Maintains a recursive Datalog view after inserts and deletes of stored facts: overdelete every fact with a derivation through a deleted fact, rederive the ones that remain true, then insert.
1 languagesresearch - Differential dataflow
Incremental computation for iterative dataflow programs that keeps differences indexed by a partial order of versions and iterations.
1 languagesresearch - Higher-order incremental view maintenance
Materialize the deltas of a view, the deltas of those deltas and so on, so each update is applied by simple arithmetic on maps.
1 languagesresearch - NFA-based event pattern matching (SASE)
Evaluate event sequence patterns with an automaton over the stream and a shared buffer of partial matches, then apply predicates and windows.
1 languagesresearch
Data structures
- FlatFAT
A complete binary tree in an array that keeps partial aggregates of a window under any associative operator, with O(log n) operator calls per single update and amortized O(1) resizing.
1 languagesresearch
Techniques
- Delta rules
Rules that give the change of a query result from the changes of its inputs, for each operator of relational algebra.
1 languagescore - Deferred view maintenance
Record base changes in logs and bring a materialized view up to date later, at query time or on a schedule, not in each update.
advanced - Pane-based window aggregation
Split a sliding window of range R and slide S into panes of length gcd(R, S), aggregate each pane once, and compute each window from its R / gcd(R, S) pane partials.
1 languagesadvanced - Stream slicing
Cut a stream into non-overlapping slices at the window boundaries of all queries, keep one partial aggregate per slice, and combine slices to answer each window, so that windows share work.
1 languagesresearch
Concepts
- Materialized view
A view whose result is computed and stored. Queries can read it in place of the base tables, but it must be kept up to date when the base tables change.
core - Watermark (event time)
A timestamp that moves forward with the stream and claims that no more elements with an earlier event time will arrive. Elements that arrive behind it are late.
core - Punctuation (data streams)
A marker embedded in a data stream that says no later tuple will match a given predicate, so that blocking operators can emit results and stateful operators can drop state.
advanced
Definitions
- Continuous query
A query that is registered once and runs over unbounded input streams, producing new results as data arrives.
core - Self-maintainable view
A materialized view that can be updated from its old contents and the base changes alone, without reading the base relations.
advanced
Models
- CQL stream-relation model
Define stream queries by window operators that turn streams into relations, relational operators, and operators that turn relations back into streams.
advanced - Dataflow model
A model of stream computation that separates what is computed, where in event time (windows), when in processing time (triggers) and how results refine (accumulation).
advanced - DBSP
A model of incremental computation over streams of changes to Z-sets, with an algorithm that turns any query into an incremental circuit.
research - Timely dataflow
A dataflow model with logical timestamps on messages and progress tracking, which supports cyclic, incremental and low-latency computation.
research