Protocol Field Definitions
The ApiId recognizes the API, a client wants to invoke on the server. The request format will contain the 2-byte(int16) for API id. It will be marked as ApiId in the request format.
API version will be associated with the request API. The request format will contain a 1-byte(int8) for the version. It will be marked as ApiVersion in the request format. Its current value will be 1.
The purpose of correlation id to match the request and its corresponding response. The request format will contain the 4-bytes(int32) for correlation Id. It will be marked as CorrelationId in the request and response format. The client needs to send correlation id with the request and server will send the same id with the response.
We will support all the object types which Geode understands. This would include all the primitive java types, an array of primitive types, collections, java serialization, data serializable, PDX serialization and custom user data serializers. The client needs to serialize objects as described here. This might be extended as part of making the Geode storage format pluggable.
The Response Type indicates whether the response is partial or complete. The response with the FullResponse type id indicates the completion of that request. And the response with PartialResponse type id indicates the response is partial. The response format will contain the 2-bytes(int16) for response type. It will be marked as ResponseTypeId in the response format.
The Error codes indicate the issue with the invocation of API at the server. We have defined the error code for various issues here. The response format will contain the 2-bytes(int16) for error codes. It will be marked as ErrorCode in the response format.
Supported Data Type Definitions
The protocol descriptions use the following types. These may be mapped to a pluggable serialization description language but their native serialization is described here. The native serialization uses network byte order ("big-endian").
Number Of Bytes
|boolean||Fixed = 1||true||0x01|
|boolean||Fixed = 1||false||0x00|
|int8||Fixed = 1||1||0x01|
|int16||Fixed = 2||1||0x00 0x01|
|int32||Fixed = 4||1||0x00 0x00 0x00 0x01|
|int64||Fixed = 8||1||0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01|
0x00 0x05 (length)
0x47 0x65 0x6f 0x64 0x65 (utf encoding)
0x00 0x02 (length)
Variable: series of bytes containing a serialized value.