Database Reference
In-Depth Information
about time synchronization, power management, or the details of networking
protocols—they simply express their data processing application using the
WaveScript language, and the WaveScope runtime takes care of executing
these programs in an ecient manner.
In the remainder of this section, we briefly overview the WaveScope data
and programming model, focusing on expressing a few simple example appli-
cations.
11.2.3.1
The WaveScript Data Model
The WaveScript data model is designed to e ciently support high volumes
of isochronous sensor data. Data is represented as streams of tuples in which
each tuple in a particular stream is drawn from the same schema . Each field
in a tuple is either a primitive type (e.g., integer, float, character, string), an
array, a set, a tagged union, or a special kind of object called a signal segment
(SigSeg).
A SigSeg represents a window into a signal (time series) of fixed bit-width
values that are regularly spaced in time (isochronous). Hence, a typical signal
in WaveScope is a stream of tuples, where each tuple contains a SigSeg object
representing a fixed-size window on that signal. A SigSeg object is conceptu-
ally similar to an array in that it provides methods to get values of elements
in the portion of the signal it contains and determine its overall length.
Although values within a SigSeg are isochronous, the data stream itself
may be asynchronous, in the sense that the arrival times of tuples are not
constrained to arrive regularly in time.
The WaveScope data model treats SigSegs as first-class entities that are
transmitted in streams. This is unlike other DSMSs 3 - 5 that impose windows
on individual tuples as a part of the execution of individual operators. By
making SigSegs first-class entities, windowing can be done once for a chain of
operators, and logical windows passed between operators, rather than being
defined by each operator in the data flow, greatly increasing eciency for high
data rate applications.
11.2.4 The WaveScript Language
With WaveScript, developers use a single language to write all aspects of
stream processing applications, including queries, subquery-constructors, cus-
tom operators, and functions. The WaveScript approach avoids mediating
between the main script and user-defined functions defined in an external
language, while further allowing type-safe construction of queries. In contrast,
while SQL is frequently embedded into other languages, there is no compile-
time guarantee that such queries are well-formed.
An example WaveScript: Figures 11.2 and 11.3 show a WaveScript
for performing marmot detection on a single four-channel microphone array,
Search WWH ::




Custom Search