Write your own plugin to communicate with remotely callable procedures. This is useful if you want to call a remote procedure that does not use SOAP or HTTP protocols.
A general overview for writing a RPC plugin is below. See the SOAP and HTTP Plugins that provides for more examples. On Microsoft Windows, these are typically located in:
C:\Program Files\SybaseC8\Server\sdk\c\examples\c8_rpc_http.cpp
C:\Program Files\SybaseC8\Server\sdk\c\examples\c8_rpc_soap.cpp
On UNIX-like operating systems, these are typically located in:
/home/<userid>/sybasec8/server/sdk/c/examples/c8_rpc_http.cpp
/home/<userid>/sybasec8/server/sdk/c/examples/c8_rpc_soap.cpp
Every RPC plugin .dll or .so library file must contain at least three functions:
An initialize function: This function is called exactly once before any calls are made to the execute function. The initialize function may connect to the RPC server, allocate resources (such as memory), or take other appropriate initialization actions. If no initialization is required, the initialize function can return immediately to the caller.
An execute function: This function is called once for each row processed by the CCL statement. For example, in an application examining email messages for viruses, the execute function might be called once for each email message received by the data stream and passed on to the RPC server.
A shutdown function: This function is called once when the RPC server shuts down. Typically, a shutdown function closes connections and releases resources. If no shutdown work is required, the shutdown function can return immediately to the caller.
The .dll or .so file that contains these three functions can contain other functions as well. These often include additional functions called by the execute function.
It is recommended, but not required, that you use a separate .dll or .so file for each remote service. A single file may contain multiple sets of initialize, execute and shutdown functions, each of which is used for a separate service. Multiple services that share the same .dll or .so file can each use different initialize, execute and shutdown functions, or can share any number of these functions.
To write your own plugin, use an SDK. The SDK that supports RPC Plugins is Sybase CEP C/C++ SDK.For more information see RPC Plugins