Versions Compared

Key

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

...

Geode supports only few object types as the region Key. The region key will be marked as KeyObject Key in the request format.

ObjectValueType

All the supported Geode types can be defined as the region value. In the request format, the region value will be marked as ValueObject. The ValueObject will contain the serialized bytes. We will have the ability to send those bytes in the chunk.

ResponseType

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

The response format will contain the 2-bytes(int16) for response type. It will be marked as FullResponse or PartialResponse in ResponseType in the response format.

ResponseTypeResponseTypeId
FullResponse1
PartialResponse2

...

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)

bytes

Variable: series of bytes which contains all the

meta info to create java object.

  


Message(Framing) 

A message is series of bytes which contains request or response. If the message is large, then we will have provision to divide the message into small messages. The message will be sent in following way.

...

Response => ResponseHeader [MetaData] APIResponse
MetaData => Optional
APIResponse => (PutResponse | GetResponse | PutAlLRequest | GetAllRequest)

 

Response HeaderResponseHeader

The response header will have resposneType, which indicates its partial response, full response or error. A hasMetaData flag indicates whether the response contains some metadata.

ResponseHeader => (ResponseTypeId | ErrorCode) hasMetaDataDescription
ResponseTypeId => fixedSize = 2 bytes, type = int16 
ErrorCode => fixedSize = 2 bytes, type = int16 
hasMetaData => fixedSize = 1 byte, type = booleanif there is any meta data associated with this request

 

ValueBytes

 

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 large number of bytes in more than one chunk. 

Value ValueBytes => ValueHeader bytes value [ValueHeader bytesvalue]Description
Valueheader ValueHeader => defined below 
bytes value => series of bytesSerialized bytes Value Object which Geode can understand

...


ValueHeader

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

...