Sujet : schema
-
Protocol Buffers: field numbers, unknown fields and the rules for evolving a message
In Protocol Buffers the field number, not the name, identifies a field on the wire, so numbers must never change or be reused; adding fields is wire-safe, removing them is safe only if the number is never reused (a reserved statement enforces that), old readers keep unknown fields, and widening int32 to int64 is only conditionally safe. ProtoJSON has its own, different rules.
-
Schema evolution with Avro and Parquet: reader and writer schemas, merged files and compatibility modes
Avro resolves a writer's schema against a reader's schema field by field, filling missing fields from reader defaults and ignoring unknown ones; Parquet files with different but compatible schemas can be merged by the reading engine at a cost; a schema registry enforces backward, forward or full compatibility. Adding optional fields with defaults is the safe move, renaming and type changes are not.
-
Schema registries for event streams: subjects, schema IDs in the payload and checks at registration time
A schema registry stores versioned schemas per subject and lets producers embed a short schema ID in each message instead of the schema itself; it refuses new versions that break the subject's compatibility mode before any message is published. The subject naming strategy and the compatibility mode follow from how topics are shared and in which order clients are deployed.
Lisible par machine : JSON