Versions Compared

Key

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

...

Goals

Here are the high level goals.


Protocol Terms

  Any binary protocol will require following things:

  1. Version: This indicates the API version.

  2. Correlation Id: This helps to relate the request-response.

  3. Object Type: What is the type of serialized object.

  4. Response Type: It indicates whether a response is partial or complete.

  5. ErrorCodes: It indicates the problem with API invocation.

  6. Chunk Response: Send large response in multiple chunks.

  7. Continuous Response: Client can register(Observer pattern) for events and then server notify the client if those events occur.

  8. Request: It indicates client's message

  9. Response: It indicates server's message.

  10. Request Format: Format of request api and its parameters, which client wants to invoke.

  11. Response Format: Format for api return value, which client invoked.

  12. Message: Set of bytes which contain the Message Header and Request/Response.

  13. Serialized Byte Order: Big Endian

...

PutRequestMessagePutResponseMessage
Code Block
PutRequestMessage {
	MessageHeader {
  		Size, 4 byte, int32
 		isPartialMessage, 1 byte, boolean
		CorrelationId, 4 byte, int32
 	}
 
 	RequestHeader {
 		ApiId, 2 byte, int16
 		ApiVersion, 1 byte, int8
	    hasMetaData, 1 byte, boolean
 	}
 	PutRequest {
 		regionName, varaible , String {
			len, 2 byte, int16
			variable, utf encoding		
		}
 		key, variable, bytes
		CallbaclArg, 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
        isPartialMessage, 1 byte, boolean
		CorrelationId, 4 byte, int32
    }
    ResponseHeader {
 		ResponseTypeId, 2 byte, int16
 		hasMetaData, 1 byte, boolean
 	}
  	Success, 1 byte, boolean
}
GetRequestMessageGetResponseMessage
Code Block
GetRequestMessage {
	MessageHeader {
  		Size, 4 byte, int32
 		isPartialMessage, 1 byte, boolean
		CorrelationId, 4 byte, int32
 	}
 
 	RequestHeader {
 		ApiId, 2 byte, int16
 		ApiVersion, 1 byte, int8
	    hasMetaData, 1 byte, boolean
 	}
 	GetRequest {
 		regionName, varaible , String {
			len, 2 byte, int16
			variable, utf encoding		
		}
 		key, variable, bytes
		CallbaclArg, variable, bytes
 	}
}
Code Block
GetResponseMessage {
	MessageHeader {
    	Size, 4 byte, int32
        isPartialMessage, 1 byte, boolean
		CorrelationId, 4 byte, int32
    }
    ResponseHeader {
 		ResponseTypeId, 2 byte, int16
 		hasMetaData, 1 byte, boolean
 	}
  	Result, variable, bytes
}
PutAllRequestMessagePutAllResponseMessage
Code Block
PutAllRequestMessage {
	MessageHeader {
  		Size, 4 byte, int32
 		isPartialMessage, 1 byte, boolean
		CorrelationId, 4 byte, int32
 	}
 
 	RequestHeader {
 		ApiId, 2 byte, int16
 		ApiVersion, 1 byte, int8
	    hasMetaData, 1 byte, boolean
 	}
 	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
				}
			}
 		}
		CallbaclArg, variable, bytes
 	}
}
Code Block
PutAllResponseMessage {
	MessageHeader {
    	Size, 4 byte, int32
        isPartialMessage, 1 byte, boolean
		CorrelationId, 4 byte, int32
    }
	ResponseHeader {
 		ResponseTypeId, 2 byte, int16
 		hasMetaData, 1 byte, boolean
 	}
  	NumberOfKeysFailed , 4 byte, int32
}
GetAllRequestMessageGetAllResponseMessage
Code Block
GetAllRequestMessage {
	MessageHeader {
  		Size, 4 byte, int32
 		isPartialMessage, 1 byte, boolean
		CorrelationId, 4 byte, int32
 	}
 
 	RequestHeader {
 		ApiId, 2 byte, int16
 		ApiVersion, 1 byte, int8
	    hasMetaData, 1 byte, boolean
 	}
 	GetRequest {
 		regionName, varaible , String {
			len, 2 byte, int16
			variable, utf encoding		
		}
		NumberOfKeys, 4 byte, int32 
		keys {
 			key, variable, bytes
		}
		CallbaclArg, variable, bytes
 	}
}
Code Block
GetAllResponseMessage {
	MessageHeader {
    	Size, 4 byte, int32
        isPartialMessage, 1 byte, boolean
		CorrelationId, 4 byte, int32
    }
    ResponseHeader {
 		ResponseTypeId, 2 byte, int16
 		hasMetaData, 1 byte, boolean
 	}
  	NumberOfKeyValuePair, 4 byte, int32 
	KeyValuePair  { 
		key, variable, bytes		
 		value, variable, bytes
	}
}

 

RPC Frameworks

The RPC frameworks provide tools to generate client -server library based on message schema. We plan to support various RPC framework to create the GEODE client in various languages quickly.