...
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 | |
---|---|---|
MessageHeader | type = MessageHeader | The MessageHeader corresponding to this Message. |
Request | type = Request | This field will contain the Request component. |
Response | type = Response
| This field will contain the Response component. |
Anchor | ||||
---|---|---|---|---|
|
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 hasMetaData | Description | |
---|---|---|
Size | type = int32 | Size of request or response (not including this header) |
CorrelationId | type = int32 | The 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. |
isPartialMessage | type = boolean | Is this a partial message? The exact semantics of partial messages is to be determined. |
Anchor | ||||
---|---|---|---|---|
|
The request would contain the fixed size request header, contains optional metadata and the request API parametersstructure itself.
Request = [MetaData] RequestAPI | Notes | Description |
---|---|---|
MetaData | optional, type = MetaData | This 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 | ||||
---|---|---|---|---|
|
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 |
APIResponse | type = variable | The Api specific Reponse message. Here are some examples of Response messages PutResponse | GetResponse | PutAllResponse | GetAllResponse | ServerConfigResposne | ClientConfigResponse | AuthResponse | ErrorResponse |
Anchor | ||||
---|---|---|---|---|
|
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 = errorMessage | Description | |
---|---|---|
errorMessage | type = String | The error message |
Anchor | ||||
---|---|---|---|---|
|
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 | |
---|---|---|
ValueHeader | type = ValueHeader | The ValueHeader corresponding to this Value entry |
value | type = bytes | Serialized Value Object which Geode can understand |
Anchor | ||||
---|---|---|---|---|
|
The value header contains the value bytes size, and a flag indicates whether it contains all the value bytes.
ValueHeader = Size hasPartialBytes | Description | |
---|---|---|
Size | type = int32 | Number of serialized bytes |
hasPartialBytes | type = boolean | Whether this contains partial bytes of value |
Anchor | ||||
---|---|---|---|---|
|
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.
...