Stream Questions

Answers to questions about streams, stream URIs, stream schemas, and related topics.

Questions


What is a schema in Sybase CEP Engine?

Just like an XML schema defines the format of an XML message, a schema in Sybase CEP Engine defines the format of a stream. A schema contains the names of the columns in the stream and their types. The schema itself is a simple XML file that can be created manually, or automatically by Sybase CEP Studio. Once the schema is defined, it is very easy to reuse it and associate new streams with the schema.

What is a stream URI?

Streams are a basic way to do pub/sub within Sybase CEP Engine environment. Each stream has a URI, of the form:

ccl://hostname:port/Stream/Workspace/Project/StreamName

This URI is all that's needed for someone to publish data to a stream and to subscribe to the stream to receive the published data.

The CCL: URI is a "logical" URI that identifies the stream regardless of the server in the cluster where the stream is currently hosted. The "physical" location of the stream is given by an http: URI, which can be viewed by right-clicking on the stream in Sybase CEP Studio and choosing Properties from the Sybase CEP Studio menu.

How does data get into Sybase CEP Engine?

Sybase CEP Engine has an extensive adapter architecture for converting many kinds of data to a normalized form. For example, an adapter may take data from a Tibco RV bus, or an RFID reader, or a syslog server, and convert it to CSF. Sybase CEP Engine builds some adapters, but also includes a very simple Adapter SDK that makes it easy to implement adapters in C/C++, Java 1.5, .NET3, and so on. CEP Engine can also access traditional historical data through the use of ODBC and JDBC adapters.

What kinds of data does Sybase CEP Engine produce?

The Sybase CEP Engine produces processed data, alerts, commands, and so on, in Common Stream Format (CSF). Just like there are input adapters for converting data into CSF, data produced in the Sybase CEP Engine is converted by output adapters before being sent to external dashboards in whatever format necessary. The converted data may then be stored in any database, or may be used by external applications for issuing commands or taking action (for example, to block an IP address in a firewall if an attack is discovered).

Can the Sybase CEP Engine process XML messages?

Yes, this is a very common use case. There are multiple ways to process XML messages in Sybase CEP Engine. Input and output adapters are available for reading and writing XML messages. Sybase CEP Engine includes an XML data type and a number of pre-defined functions specific to XML. These functions may be used to convert data between the XML data type and other CCL data types, extract values and elements from XML columns, produce rows based on aggregates of XML rows, create XML elements, append attributes or processing instructions to XML elements or append comments to XML trees, find XML values within XML elements, concatenate, insert, update or delete XML content, determine the values of XML expressions and apply XSL transformation to XML.


Created March 8, 2010. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com