Versions Compared

Key

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

...

Geode is a reliable distributed data management tool. There is a demand to access Geode from various programming languages. But the existing client-server protocol is too complex to understand, undocumented. This establishes the need for a new client-server protocol.

Goals

Here are the high level goals.


Protocol Terms

  Any binary protocol will require following things:

  1. Version: This indicates the API version.

  2. Correlation Id: This helps to relate the request-response.

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

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

  5. ErrorCodes: It indicates the problem with API invocation.

  6. Chunk Response: Send large response in multiple chunks.

  7. Continuous Response: Client can register(Observer pattern) for events and then server notify the client if those events occur.

  8. Request: It indicates client's message

  9. Response: It indicates server's message.

  10. Request Format: Format of request api and its parameters, which client wants to invoke.

  11. Response Format: Format for api return value, which client invoked.

  12. Message: Set of bytes which contain the Message Header and Request/Response.

  13. Serialized Byte Order: Big Endian

...

The new protocol will be integrated with the current Geode server. The new client driver can connect with the Geode server by sending a protocol byte. Initially, the Geode will support the following two protocolprotocols.

  • byte - 110: Message will contain the whole request or response. 
  • byte - 111: If the message is large then client or server can divide the message into the set of small messages. Then they need to collect all the small message and parse the whole request or response.

API Id

The ApiId  recognizes 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 fromat 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.

Object Type

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.

ObjectKeyType

Geode supports only few object types as the region Key. The region key will be marked as Key in the request format. the client needs to serialize key as described here.

ResponseType

ReponseType will indicate that whether the response is partial or complete. A client can process a partial response.  Response with the FullResponse type id will indicate the completion of that request. 

...