Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: remove reference to request/response header; add anchors; fix links to MetaData

...

Every message will adhere to the following generic message definition. A Message will comprise of a MessageHeader and either a Request or Response component.

Message = MessageHeader (Request Request Response)Description
MessageHeadertype = MessageHeaderThe MessageHeader corresponding to this Message.
Requesttype = RequestThis field will contain the Request component.
Response

type = Response

 

This field will contain the Response component.

Anchor
MessageHeader
MessageHeader
MessageHeader

The Message header is a fixed size header which contains the size of a message, boolean flag to indicates whether a message is partial, and correlation id for that request message. The correlation id is used for the dual purpose here.

...

MessageHeader = Size CorrelationId isPartialMessage hasMetaDataDescription
Sizetype = int32Size of request or response (not including this header)
CorrelationIdtype = int32The correlationID used to match a request to its corresponding response. This will be important if/when we allow for out-of-order messages in the future.
isPartialMessagetype = booleanIs this a partial message? The exact semantics of partial messages is to be determined.

Anchor
Request
Request
Request

The request would contain the fixed size request header, contains optional metadata and the request API parametersstructure itself

Request = [MetaData] RequestAPI
 Notes
Description
MetaDataoptional, type = MetaDataThis field is optional and will be populated if the MessageHeader.hasMeta is true

RequestAPI

type = variable

The specific Request message. Here are some examples of Request messages.

PutRequest | GetRequest | PutAllRequest | GetAllRequest |ServerConfigRequest | ClientConfigRequest | AuthRequest

Anchor
Response
Response
Response

The response will contain the fixed size response header, contains optional metadata and the return valuesvalue.

Response = [MetaData] APIResponse

Description
MetaData

optional, type = MetaData

This field is optional and will be populated if the MessageHeader.hasMeta is true
APIResponsetype = variable

The Api specific Reponse message. Here are some examples of Response messages

PutResponse GetResponse | PutAllResponse | GetAllResponse | ServerConfigResposne | ClientConfigResponse | AuthResponse | ErrorResponse

Anchor
ErrorResponse
ErrorResponse
ErrorResponse

The server will raise the error when it failed to execute API request from the client. The error code and message should help the client to diagnose the issue.

ErrorResponse = errorMessageDescription
errorMessagetype = StringThe error message

Anchor
Value
Value
Value

The Value is serialized bytes for the Geode region value. It contains value header and series of bytes. Using value header, we can send a big serialized object in more than one chunk. 

Value = {ValueHeader value}Description
ValueHeadertype = ValueHeaderThe ValueHeader corresponding to this Value entry
valuetype = bytesSerialized Value Object which Geode can understand

Anchor
ValueHeader
ValueHeader
ValueHeader

The value header contains the value bytes size, and a flag indicates whether it contains all the value bytes. 

ValueHeader = Size hasPartialBytesDescription
Sizetype = int32Number of serialized bytes
hasPartialBytestype = booleanWhether this contains partial bytes of value

Anchor
MetaData
MetaData
MetaData

The purpose of a metadata to pass defined key value pair with request and response. That will be optional for a client. If there is any metadata associated with request or response, then need to set "hasMetadata" flag to "true" in request or response header. After that send metadata in the following format.

...