Streams and Adapters

An input adapter reads data from an external data source, and puts the data into a Sybase CEP stream. The input may be read from a file, a socket, a database server, or an RSS feed.

An input adapter reads data from an external data source, and puts the data into a Sybase CEP stream. The input may be read from a file, a socket, a database server, an RSS feed, and so on.

An output adapter reads data from the Sybase CEP output stream, converts the data to an appropriate external data format, and writes the data to the data destination. The output may be written to a file, a socket, a database server, an email program, and so on.

The basic flow of data in a Sybase CEP Engine is thus:

Sybase CEP provides adapters that will read data from an external data source and write it to a Sybase CEP stream (or read from a Sybase CEP stream and write to an external data destination). For example, the ReadFromCSVFile adapter (supplied by Sybase CEP) reads data from a file of Comma-Separated Values (CSV) and publishes the data to a stream. The Sybase CEP Server does not directly read data from the input file; the server reads only from data streams. The adapters supplied by Sybase CEP are described in Sybase CEP Adapters.

Some input and output adapters supplied by Sybase CEP can be used from inside Sybase CEP Studio. To use these, you typically do the following:

  1. Right-click on the stream to which you wish to attach an adapter.
  2. Choose "Attach Input Adapter" or "Attach Output Adapter".
  3. Select the appropriate adapter type (such as "Read from CSV file").
  4. Fill in the appropriate parameters for that adapter. For example, if you attach the adapter that reads from a Comma-Separated Values (CSV) file, you will specify the name of the file to read from.

    If none of the adapters supplied by Sybase CEP will fit your needs, you may write your own adapter. Your adapter, like a Sybase-supplied adapter, will read (or write) data in a format appropriate for your application, and publish the data to (or read the data from) the Sybase CEP Server.

    Sybase CEP provides SDKs (Software Development Kits) that allow you to write input and output adapters in the following languages: