A description of the multi-step RPC procedure and the software components involved.
As compared to a CCL statement, an RPC is a simple operation. However, each RPC call involves multiple steps. The following diagram shows the components involved and how they are related:
RPC functionality requires the following software components:
A project (query module) that includes a CCL Remote Procedure Statement or remote subquery that calls the remote procedure. For more information about this CCL statement and subquery please refer to the Sybase CEP CCL Reference.
An RPC plugin that interfaces between and the RPC server. When the server wants to call a remote procedure (or function), the server calls a function inside this RPC plugin, and the RPC plugin then calls the remote procedure and returns any values to .
The RPC plugin must know how to call the remote procedure. For example, the RPC plugin may know the HTTP URI of the remote procedure and know how to execute an HTTP POST operation to invoke that remote procedure. Sybase CEP Serveritself does not need to know how to communicate with every remote procedure that is written; the plugin handles the communications.
Complile the RPC plugin as a dynamically linkable library (.dll file) or shared object library (.so file) so that Sybase CEP Servercan call it.
A section of the c8-services.xml file that describes the RPC plugin and enables the to call it. You must describe each RPC plugin in a separate section of the c8-services.xml file.
For each remotely callable procedure, Sybase CEP Server must know the name of the library file that contains the corresponding RPC plugin.
An externally executable program that includes a procedure or function that you can call remotely. The program must be capable of receiving and responding to requests from external applications. This manual refers to such programs as RPC servers. The RPC server may run on the same computer as the or on a different computer.
These components work together as follows:
The CCL Remote Procedure Statement or remote subquery invokes the RPC plugin by specifying the plugin's unique service name (as identified in the c8-services.xml file) and may also pass values to the plugin, which are then passed on to the RPC server.
The uses the service name and the information defined for the service in the c8-services.xml file to determine which RPC plugin to use and which function(s) in that plugin to call. The Sybase CEP Servercan also read some plugin configuration parameters (defined in the c8-services.xml file service entry) and make these available to the plugin, which can read them by calling appropriate function(s) in the API.
The RPC plugin communicates with the RPC server and invokes the remotely callable procedure. When appropriate, the plugin passes remote procedure parameter values from the CCL query to that RPC and/or receives values back from the RPC and makes them available to the CCL query.