Versions Compared

Key

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

...

Byte order is little-endian. Strings are UTF-8 with int prefix (no null terminator). All data types in this proposal are Java-like (byte = 8 bits, short = 2 bytes, int = 4 bytes, long = 8 bytes).

Binary Objects

User data, such as cache keys and values, is represented in Ignite Binary Object format. Binary Object can be a primitive or a complex object.

Primitives

Primitives are represented as a type code + value:

byteType code
...Value

Available primitives are listed below:

NameType CodeSize
byte  
   
   

 

Message format

All messages, request and response, including handshake, start with int message length (excluding these first 4 bytes). E.g. empty message would be represented by 4 zero bytes.

...

Response
longRequest id (see above)
...Operation-specific data

Available operations are listed below

...

Operation codes and request ids are omitted everywhere below for brevity.

OP_CACHE_GET = 1

1
Request
int
cacheId; //
Cache ID: Java-style hash code of the cache name
byteflags flags; // 0 = none, 1 = binary mode
BinaryObject key;BinaryObject value;
    
key    

Message Exchange Example

Let's see how request and response would look for a cache.get operation for integer key and value:

...