Versions Compared

Key

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

...

  • If a message is sent in multiple sub-messages then it will be used for combining the whole message. 
  • The Client would use correlation id to match the response to its request as well.
MessageHeader --> Size PartialMessage isPartialMessage CorrelationId
Size --> fixedSize = 4 bytes, type = int32 (Size of request or response)
PartialMessage isPartialMessage --> boolean (isMessageCompleted) fixedSize = 1 byte, type = boolean
CorrelationId -->int32( to co-relate request and response)> fixedSize = 4 bytes, type = int32


Request Format

The request would contain the fixed size request header, optional metadata and Request api parameters. The request header will have requestType, apiVersion, and hasMetaData flag to indicate whether the request contains some metadata.

Request --> RequestType RequestTypeId apiVersion hasMetaData [MetaData] RequestAPI
RequestType RequestTypeId --> RequestTypeId fixedSize = 2 bytes, type = int16
apiVersion --> fixedSize = 2 bytes, type = int16, sdhjk
hasMetaData --> fixedSize = 1 byte, type = boolean (if there is any meta data associated with this request)
MetaData --> optional

RequestAPI --> (PutRequest | GetRequest | PutAllRequest | GetAllRequest)

 

Response Format

The response would contain the fixed size response header, optional metadata and return values. The resposne header will have resposneType, which indicates its partial response, full response or error. A hasMetaData flag indicates whether the response contains some metadata.

  

Response --> (ResponseTypeId | ErrorCode) hasMetaData [MetaData] APIResponse
ResponseTypeId --> int16(codes defined above) fixedSize = 2 bytes, type = int16
ErrorCode --> int16 (codes defined above) fixedSize = 2 bytes, type = int16
hasMetaData --> fixedSize = 1 byte, type = boolean (if there is any meta data associated with this request)
MetaData --> Optional
APIResponse –> (PutResponse | GetResponse | PutAlLRequest | GetAllRequest)

 

ValueObject

The purpose of ValueObject to divide the large serialized value into small value chunks. We will have SerializedBytesHeader with each partial serialized bytes. It would contain size of 

ValueObject --> Serializedbytes
Serializedbytes --> SerializedBytesHeader PartialSerializedBytes {SerializedBytesHeader PartialSerializedBytes}
SerializedBytesHeader --> Size isPartialBytes
Size --> int32 (Number of serialized bytes)
isPartialBytes --> boolean

...