Query Module Persistence

A description of the Query Module Persistence features, which offer information protection if Container failure occurs.

A stream-oriented query system such as Sybase CEP Engine stores data in memory, instead of in tables on a long-term storage medium, such as a hard disk drive. Under normal circumstances, Sybase CEP Engine automatically saves window and query state. In the event of Container failure, however, Sybase CEP Engine loses window state information, and may lose some rows of data during failover.

Query Module Persistence features minimize loss of rows and state information in the event of Container failure. When Persistence is turned on in a project, Sybase CEP Server stores information about the state of named windows, queries, adapters, and data streams on the disk drive, in the storage directory. The default location of the Storage directory is in SybaseC8/Server/Storage. This allows a new Container to recapture most of the state leading up to the failure. Of course, the more data you write to the disk, the slower your performance is; turning on Persistence results in lower maximum performance, though the extent of the reduction depends in part on your query structure.

If you want a Container to replace another Container in the event of Container failure, and you have enabled Persistence, the replacement Container must be able to read the same storage - such as a disk drive - that the failed Container was using. Furthermore, if the storage device crashes, the replacement Container will not be able to take advantage of the Persistence feature. To ensure against loss of data due to hardware failure, you may wish to use a combination of RAID and dual-port disk drives.

For information about using Persistence settings in Sybase CEP Studio, see the Sybase CEP Studio Guide .

Note that, while enabling Persistence features drastically reduces the amount of information that may be lost if a Container fails, it does not ensure that Sybase CEP Engine retains all rows and state information. To ensure that no rows are lost in the event of Container failure, use Persistence features in combination with Guaranteed Delivery features, described in the Sybase CEP Integration Guide , the Sybase CEP CCL Reference Guide and the Sybase CEP Studio Guide .