Versions Compared

Key

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

...

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.

Code Block
languagejava
titleTuple serialization (pseudocode)
for (Column col : tuple) {
	switch (col.type().spec()) {
    	case BYTE:
        	packer.packByte(tuple.byteValue(col.name()));
	        break;
	    case SHORT:
...


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).

...