Sybase® Event Stream Processor uses data-flow programming for processing event streams.
In data-flow programming, you define a set of event streams and the connections between them, and apply operations to the data as it flows from sources to outputs.
Data-flow programming breaks a potentially complex computation into a sequence of operations with data flowing from one operation to the next. This technique also provides scalability and potential parallelization, since each operation is event driven and independently applied. Each operation processes an event only when it is received from another operation. No other coordination is needed between operations.
The sample project shown in the figure shows a simple example of this.
Each of the continuous queries in this simple example—the VWAP aggregate, the IndividualPositions join object, and the ValueByBook aggregate—is a type of derived stream, as its schema is derived from other inputs in the diagram, rather than originating directly from external sources. You can create derived streams in a diagram using the simple query elements provided in the Studio Visual editor, or by defining your own explicitly.
Element | Description |
---|---|
PriceFeed |
Represents an input window, where incoming data from an external source complies with a schema consisting of five columns, similar to a database table with columns. The difference is that in ESP, the streaming data is not stored in a database. |
Positions |
Another input window, with data from a different external source. Both Positions and PriceFeed are included as windows, rather than streams, so that the data can be aggregated. |
VWAP |
Represents a simple continuous query that performs an aggregation, similar to a SQL Select statement with a Group By clause. |
IndividualPositions |
Represents a simple continuous query that performs a join of Positions and VWAP, similar to a SQL FROM clause that produces a join. |
ValueByBook |
Another simple query that aggregates data from the stream Individual Positions. |