Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Protocol Terms

  Any binary protocol will require following things

 
  1. Version: This indicates the API version.

  2. Request Type: This indicates API needs to invoke.

  3. Correlation Id: This helps to relate request-response.

  4. Object Type: What is the type of serialized object.

  5. Response Type: It indicates whether resposne a response is partial or complete.

  6. Error HandlingErrorCodes: It indicates the problem with API invocation.

  7. Streaming support: To support the large request, response or continuous response.

  8. Request Format: Api request and response.

  9. Byte Order(Big Endian)

  10. Message: Bytes which contains defined format.

  11. Request: It indicates client's message

  12. Response: It indicates server's message.Message: Bytes which contains defined format.

Connect 

The new protocol will be integrated with current Geode server. The new client driver can connect with Geode server by sending byte “110”.

...

ValueObject --> Serializedbytes
Serializedbytes --> SerializedBytesHeader PartialSerializedBytes [SerializedBytesHeader PartialSerializedBytes]
SerializedBytesHeader --> Size isPartialBytes
Size --> int (Number of serialized bytes)
isPartialBytes --> boolean

ProtocolTypes

Format contains following fixed and variable types. They need to serialize in Big Indian byte order as showed in example.

TypeNumber Of BytesValueSerializedBytes
booleanFixed = 1true0x01 
booleanFixed = 1false0x00
int8Fixed = 110x01
int16Fixed = 210x00 0x01 
int32Fixed = 410x00 0x00 0x00 0x01 
String(utf)

Variable

  • 2 byte for length of encoded String
  • Utf Encoding
"Geode"

0x00 0x05 (length)

0x47 0x65 0x6f 0x64 0x65 (utf encoding)

 

APIS

PutRequestResponse

PutRequest --> RegionName KeyObject CallbackArg ValueObject
RegionName --> String
KeyObject --> Serialized bytes of Geode key object type
CallbackArg –-> Serialized bytes of Geode object type

...