The API communicates with RoboServer through an RQLService. The RQLService is a RoboServer component which listens for API requests on a specific network port. When you start a RoboServer you specify if the RoboServer should use the encrypted SSL service, or the plain socket service, or both (using two different ports). All RoboServers in a cluster must be running the same RQLService (although the port may be different).
Assuming we have started a RoboServer with the SSL RQLService on port 50043, like this
RoboServer -service ssl:50043
we can use the following code
All we need to do is to create the cluster as an SSL cluster and specify the SSL port used by each RoboServer. Now all communication between RoboServer and the API will be encrypted.
For this example to work you need
commons-ssl-0.3.8.jar in you application classpath, you can
find it next to the API jar file inside your kapow installation.
In addition to data encryption, SSL offers the possibility to verify the identity the remote party. This type of verification is very important on the Internet, as rouge websites could otherwise pretend to be someone they are not. Most often your API client and RoboServers will be on the same local network, so you rarely need to verify the identity of the other party, but the API supports this feature should it become necessary.
Because identity verification is almost never used we will not describe it in this guide. If you are interested, you should look at the SSL examples that are included with the Java API.