Public Windows

Various components can query public windows, including Sybase CEP Projects, SDKs, and the Sybase CEP public windows ODBC driver.

The Sybase CEP Server public window feature enables the rows in a window to be queried by any of the following:

For more information about public windows, see "Public Windows" in the Sybase CEP CCL Reference Guide .

Sybase CEP Project

If you wish to access the public window from another Sybase CEP project, configure the Sybase CEP Server performing the query so that the server can access the public window as though it were a table in a remote database. This is necessary even if the project with the query and the project with the public window are on the same Sybase CEP Server. Specifically, create a database service entry in the c8-services.xml file; this makes the public windows in the project look like a service that the Database Statement or a database subquery can access. For information about the c8-services.xml file and its PublicWindow entries, see the Sybase CEP Installation Guide .

The following Sybase CEP SDKs enable you to write a program to read from a public window:

Sybase CEP SDK

To query a public window using an SDK, call an SDK function and supply a query written using Sybase CEP SQL syntax. See "Sybase CEP SQL" in the Sybase CEP CCL Reference Guide for information about the syntax. The SQL statement must be a SELECT statement, and you must submit only one statement per query. The function returns a result set containing zero or more rows. You can then access each individual row in the result set.

Tip:

Test the Sybase CEP SQL query from inside Sybase CEP Studio before using it in an SDK call. This is especially important for SDK calls that use the Query Public Windows in Module command on the Debug menu.

Sybase CEP Public Windows ODBC Driver

Sybase CEP Server includes an ODBC driver for use with public windows. When you set up a new User DSN for the Sybase CEP Public Windows ODBC driver, you provide the ccl URI of the project containing the public window. The URI is in the form ccl://host:port/Project/workspace/project_name, where workspace is the name of the Workspace in which the project runs, and project_name is the name of the project. For example:

ccl://mymachine:6789/Project/Default/Filter

When you execute a query against the public window, provide the name of the window.

The Sybase CEP Public Windows ODBC driver provides the core level of ODBC compliance, as defined by Microsoft athttp://msdn.microsoft.com/en-us/library/ms714086(VS.85).aspx.

Note:

As you design a system that uses public windows, remember that storing and updating public windows requires Sybase CEP Server to consume both memory and CPU cycles. You may see a reduction in the performance of other queries when you add public windows or add queries of public windows.