Sybase CEP projects are made up of one or more discrete units called query modules. Every project contains one main query module, represented in Sybase CEP Studio by the same icon as the project.
Creating a project automatically creates the main query module. Likewise, loading, unloading, compiling, and running a project automatically loads, unloads, compiles, or runs the main query module.
You can define other, nested, query modules, called submodules, within a main query module. When you compile and run a project, you compile and run the submodules.
Query modules include groups of CCL statements (sometimes called queries) that process data, data streams that carry data, formatted into rows and columns, through Sybase CEP Engine, adapters that translate data to or from a format compatible with Sybase CEP Engine, and windows that retain rows until a specified count or period of time is reached.
The following diagram illustrates the components of a Sybase CEP project and how data typically flows through Sybase CEP Engine:
Data typically flows through Sybase CEP Engine as follows:
Data enters Sybase CEP Engine from an external source through an input adapter, which converts data into a Sybase CEP-compatible format and publishes it to an input stream.
Queries run continuously, subscribe to input streams, process the incoming rows, and publish rows to output streams.
An output adapter converts the data into a format suitable for its external destination.
A few more details about data streams:
Input: Streams receive data from outside the current query module, either through input adapters as shown in the diagram, or through bindings to streams in other modules. Input streams cannot be used as the destination for CCL statements as you cannot send data to an input stream with a query.
Output: Streams send data to destinations outside the current query module, either through output adapters as shown in the diagram, or through bindings to streams in other modules.
Local: Streams carry data solely within the current query module. They cannot be connected to input or output adapters, and they can only be bound to input and output streams in the query module's submodules. They cannot connect to streams outside the current project.
For more information about these components and how to work with them in CCL, see the Sybase CEP CCL Reference Guide.