- Download Protobuf for the target language of choice, build it, and install it.
- Download the latest pre-built release of Geode and install it.
Start a Geode locator, start a Geode server, and create a region with the following
- Extract the Protobuf message definition artifacts from the Geode release:
Generate the language bindings from the message definitions using the relevant target language Protobuf library using the appropriate Protobuf utility such as
- Create your application that connects a TCP socket to the server running on the host
Within your application, build a NewConnectionHandshake message, write it in a delimited fashion to the socket.
Read the handshake response message in a delimited fashion from your socket. Note that your implementation language may not provide an API to explicitly read and/or write delimited messages. These messages are prepended with the message length encoded as a varint value. If you do not have an appropriate API, you may need to read and decode this value first, in order to determine how much data to read from the network to receive a complete message.
Also be aware that messages may not arrive in one packet and may require multiple read() calls to receive all data from the network. The response should match the following:
To exercise the protocol to interact with the server, within your application build a put request message to put the value
barfor the key
foo, write it in a delimited fashion to the socket, and read the put response message in a delimited fashion from it.
If an error occurs, your message will contain an ErrorResponse:
Outside your application, verify that the put request message took effect with the following