Versions Compared

Key

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

...

Apache Geode is a data management platform that provides real-time, consistent access to data-intensive applications throughout widely distributed cloud architectures. While it currently has high-speed client interfaces for Java, C++ and .NET there is both a need to create lighter-weight clients and a demand to access Geode from other programming languages. Unfortunately the , the existing client-server protocol is undocumented.  It evolved over time and is overly complex to meet either of these needs.

...

You will notice that this document describes the protocol down to the level of byte-ordering and "bytes on the wire".  This is a description of the native serialization of the protocol that will be used for the initial implementation.  It is our intent to make this pluggable so that alternative serialization technologies may be used instead, such as protobuf Protobuf or thrift Apache Thrift.  How that is done will be left as a goal for the architecture of the server component, with an additional goal of providing an IDL description of the protocol.

At the same time, we realize that serialization of application keys, values, callback arguments, function parameters and so forth are a separate matter and are not necessarily tied to the serialization protocol used for client/server messaging.  The initial protocol will support primitive types such as scalars, strings, and byte-arrays.  It will also support JSON documents as values and convert between these and Geode PDX-serialized objects in the servers.

Goals

Here are the high level goalsThe high-Level Goals for the protocol are defined here.


Protocol Terms

  Any binary protocol requires the following things:

  1. Version: This indicates the API version.

  2. Correlation Id: This should be different per request sent. It allows correlation of request and response.

  3. Object Type: The type of a 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 request API and its parameters, which client wants to invoke.

  11. Response Format: Format for api 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

...

In order to fit into the existing Geode client/server infrastructure, we will be leveraging the current Geode "cache server" component.  It accepts an initial byte that tells it what type of client is connecting to the server and how the client should be handled. A client using the new protocol can connect with the Geode server by sending a protocol byte. Initially, we will support the following two protocols:

...