4 ms·
Avro has a solution to this that I always thought was quite elegant. Schemas are external (serialized data isn't self-describing) but the library exploits this
by nly 8y ago
Avro has a solution to this that I always thought was quite elegant. Schemas are external (serialized data isn't self-describing) but the library exploits this to it easy to read and write old versions.
To quote the documentation:
The library provides "a resolving decoder, which accepts calls for according to a reader's schema but decodes data corresponding to a different (writer's) schema doing schema resolution according to resolution rules in the Avro specification."
Those resolution rules are defined here: https://avro.apache.org/docs/current/spec.html#Schema+Resolution https://avro.apache.org/docs/current/spec.html#Schema+Resolu...
The downside, of course, is performance.