Versions Compared

Key

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

...

  1. Offsets are serialized with data:
    1. Order of fields is not guaranteed - for optimization like compaction.
    2. First 4bytes - offset to the root of vtable, that stores offsets to other fields. Vtable can be anywhere relative to fields.
    3. Size of data must be know before serializing to prepare the vtable.
    4. It starts serializing from nested objects, calculate it sizes and fill tables, and then write root object.
  2. No streaming is possible.

Avro

https://avro.apache.org/docs/

  1. Avro relies that schema is known on both sides. And avoid writing field numbers, offsets. Only data. And it can be done in streaming way.
  2. Schema resolution is based on field names.

Bson

  1. Writes field names like json. Suppose that received doesn't have a schema.