Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Tuple serialization

...

int Length of Payload
...Payload

Tuple serialization

  • This IEP covers Table API - Ignite#tables(), which is the only public API available at the moment.
  • Table API operates on tuples (Tuple and TupleBuilder interfaces).
  • Tuple is a set of key-value pairs - column name and value.
  • Values can be of basic types described above and in IEP-54, according to the table schema. 
  • Table schema can evolve over time, columns get added and removed. Ignite tracks the evolution with incrementing integer schema version.
  • All schema versions are stored by Ignite. It is possible to retrieve the set of columns for any version.

A simple way to serialize a tuple would be to write a map (String → ...) from column name to value.

However, thanks to schema-first approach, we can avoid sending column names with the values (serializing strings is expensive). Instead, we can write integer schema version, and then an array of values for every column in that schema.

intSchema version
arrColumn values in schema order. nil when there is no value for a particular column.

To read or write a value for a column, we get the column type from the schema and use corresponding MsgPack data type according to Data Types Mapping above.

Handshake


Request
4 bytesMagic number 49 47 4E 49, or "IGNI". Helps identifying misconfigured SSL or other apps probing the port.
intPayload length
intVersion major
intVersion minor
intVersion patch
intClient code (1 for JDBC, 2 for general-purpose client)
binFeatures (bitmask)
map (string → any)Extensions (auth, attributes, etc). Server can skip unknown extension data (when client is newer).

...