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. Correlation Id: This helps to relate 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)

Connect 

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

  • byte - 110 : Message will contain the whole request or response. 
  • byte - 111 : Request or Response can be divided into multiple messages, if those are large.

...

  • 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 Type

Following table contains the request api type and its corresponding Api id. The ApiId would recognize the API, which client want wants to invoke on the server. The request format will contain the 1-byte(int8) for Api id. It will be marked as ApiId in the request format.

RequestTypeApiId
AuthenticationRequestType 1
PutRequestType 2
GetRequestType 3
PutAllRequestType 4
GetAllRequestType 5
ClientConfigRequestType6
ServerConfigRequestType7
CreateRequestType 8
InvalidateRequestType 9
DestroyRequestType 10
KeySetRequestType 11
ValuesRequestType 12
EntrySetRequestType 13
ContainsValueForKeyRequestType 14
ContainsKeyRequestType 15
ContainsValueRequestType 16
RemoveAllRequestType 17
SizeRequestType 18
PutIfAbsentRequestType 19
RemoveIfValueIsSameRequestType 20
ReplaceIfValueIsSameRequestType 21
ReplaceIfValueExistType 22
FunctionRequestType 23

...