Versions Compared

Key

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

...

Introducing a new protocol into GEODE has the potential to be highly disruptive. In order to minimize the disruption and maximize the feedback cycles, it is suggested to implement the changes in phased approach. To view the milestones for each phase please see the page Phases and Milestones.

Examples

PutRequest

string regionName = "ExampleRegion"

Key = 101

Value = "New Geode Client Server Protocol"

CallbackArg = Null

MessageHeader

 

RequestHeader

PutRequest

Size CorrelationId PartialMessage hasMetaDataRequestType apiVersionRegionName Key CallbackArg Value ( ValueHeader value )

Size = Size of Request (65)

0x00 0x00 0x00 0x42

RequestType (PutRequestType = 3)

0x00 0x03

RegionName(type:String, value:"ExampleRegion" )

 len = 0x00 0x0d

Utf Encoding = 0x45 0x78 0x61 0x6d 0x70 0x6c 0x65 0x52 0x65 0x67 0x69 0x6f 0x6e 

Size = (number of serialized bytes = 35)

 0x00 0x00 0x00 0x23

CorrelationId = 1

0x00 0x00 0x00 0x01 

apiVersion (1)

0x01

Key (Serialzied using geode types, value = 101)

 Geode Int type = 0x39

Value = 0x00 0x00 0x00 0x65 

isPartialBytes = (It contains all serialized bytes, type = boolean)

0x00

PartialMessage = (type = Boolean, value = false)

0x00

 

CallbackArg (Serialzied using geode types, value = null)

Value = 0x29 

value (Serialized as Geode String type, value = "New Geode Client Server Protocol")

Geode String type = 0x57

Serialized Encoded length = 0x00 0x20

Encoded String = 0x4e 0x65 0x77 0x20 0x47 0x65 0x6f 0x64 0x65 0x20 0x43 0x6c 0x69 0x65 0x6e 0x74

0x20 0x53 0x65 0x72 0x76 0x65 0x72 0x20 0x50 0x72 0x6f 0x74 0x6f 0x63 0x6f 0x6c

hasMetaData (false)

0x00

   

PutResponse

MessageHeader

ResponseHeaderPutResponse
Size CorrelationId PartialMessage hasMetaDataResponseTypeIdSuccess

Size = Size of Request (4)

0x00 0x00 0x00 0x04

ResponseTypeId (FullResponse, type=int16, value =1)

0x00 0x01

Success(type=boolean, value = true)

0x01

CorrelationId = 1

0x00 0x00 0x00 0x01 

 

 

PartialMessage = (type = Boolean, value = false)

0x00

  

hasMetaData (false)

0x00

  

Messages

PutRequestMessagePutResponseMessage
Code Block
PutRequestMessage {
	MessageHeader {
  		Size, 4 byte, int32
 		CorrelationId, 4 byte, int32
        isPartialMessage, 1 byte, boolean
        hasMetaData, 1 byte, boolean
 	}
 
 	RequestHeader {
 		ApiId, 2 byte, int16
 		ApiVersion, 1 byte, int8
 	}
 	PutRequest {
 		regionName, varaible , String {
			len, 2 byte, int16
			variable, utf encoding		
		}
 		key, variable, bytes
		CallbackArg, variable, bytes
 		Value {
 			ValueHeader {
				Size, 4 byte, int32
				hasPartialBytes, 1 byte, boolean
 			}
			value {
 				bytes, series of bytes
			}
 		}
 	}
}
Code Block
PutResponseMessage {
	MessageHeader {
    	Size, 4 byte, int32
        CorrelationId, 4 byte, int32
        isPartialMessage, 1 byte, boolean
        hasMetaData, 1 byte, boolean
    }
    ResponseHeader {
 		ResponseTypeId, 2 byte, int16	
 	}
  	Success, 1 byte, boolean
}
GetRequestMessageGetResponseMessage
Code Block
GetRequestMessage {
	MessageHeader {
  		Size, 4 byte, int32
 		CorrelationId, 4 byte, int32
        isPartialMessage, 1 byte, boolean
        hasMetaData, 1 byte, boolean
 	}
 
 	RequestHeader {
 		ApiId, 2 byte, int16
 		ApiVersion, 1 byte, int8
 	}
 	GetRequest {
 		regionName, varaible , String {
			len, 2 byte, int16
			variable, utf encoding		
		}
 		key, variable, bytes
		CallbackArg, variable, bytes
 	}
}
Code Block
GetResponseMessage {
	MessageHeader {
    	Size, 4 byte, int32
        CorrelationId, 4 byte, int32
        isPartialMessage, 1 byte, boolean
        hasMetaData, 1 byte, boolean
    }
    ResponseHeader {
 		ResponseTypeId, 2 byte, int16
 	}
  	Result, variable, bytes
}
PutAllRequestMessagePutAllResponseMessage
Code Block
PutAllRequestMessage {
	MessageHeader {
  		Size, 4 byte, int32
 		CorrelationId, 4 byte, int32
        isPartialMessage, 1 byte, boolean
        hasMetaData, 1 byte, boolean
 	}
 
 	RequestHeader {
 		ApiId, 2 byte, int16
 		ApiVersion, 1 byte, int8
 	}
 	PutRequest {
 		regionName, varaible , String {
			len, 2 byte, int16
			variable, utf encoding		
		}
		NumberOfKeyValuePair, 4 byte, int32 
		KeyValuePair  { 
	 		key, variable, bytes		
 			Value {
 				ValueHeader {
					Size, 4 byte, int32
					hasPartialBytes, 1 byte, boolean
 				}
				value {
 					bytes, series of bytes
				}
			}
 		}
		CallbackArg, variable, bytes
 	}
}
Code Block
PutAllResponseMessage {
	MessageHeader {
    	Size, 4 byte, int32
        CorrelationId, 4 byte, int32
        isPartialMessage, 1 byte, boolean
        hasMetaData, 1 byte, boolean
    }
	ResponseHeader {
 		ResponseTypeId, 2 byte, int16
 	}
  	NumberOfKeysFailed , 4 byte, int32
}
GetAllRequestMessageGetAllResponseMessage
Code Block
GetAllRequestMessage {
	MessageHeader {
  		Size, 4 byte, int32
		CorrelationId, 4 byte, int32
        isPartialMessage, 1 byte, boolean
        hasMetaData, 1 byte, boolean
 	}
 
 	RequestHeader {
 		ApiId, 2 byte, int16
 		ApiVersion, 1 byte, int8
 	}
 	GetRequest {
 		regionName, varaible , String {
			len, 2 byte, int16
			variable, utf encoding		
		}
		NumberOfKeys, 4 byte, int32 
		keys {
 			key, variable, bytes
		}
		CallbackArg, variable, bytes
 	}
}
Code Block
GetAllResponseMessage {
	MessageHeader {
    	Size, 4 byte, int32
		CorrelationId, 4 byte, int32
        isPartialMessage, 1 byte, boolean
        hasMetaData, 1 byte, boolean
    }
    ResponseHeader {
 		ResponseTypeId, 2 byte, int16
 	}
  	NumberOfKeyValuePair, 4 byte, int32 
	KeyValuePair  { 
		key, variable, bytes		
 		value, variable, bytes
	}
}

 

Glossary

...

Example messages

To better visualize the protocol messages a few sample messages have been provided on the page Protocol Message Examples