| ISSUE 303/456 · COMPUTER SCIENCE |
~4 MIN |
FOUNDATION / SOFTWARE SYSTEMS · READING DATE 2027-07-31 · JULY 2027 — SOFTWARE AND FLUIDS
How an old app can read a newer message
START HERE
A delivery message might contain a name, parcel count and destination. A byte is a group of eight digits, each 0 or 1, used to hold information. Serialization turns information held by a programme into a defined sequence of bytes for storage or transmission. A schema is the agreement describing a message’s named parts and how their values should be interpreted.
|
/ WHY NOW
Updating the sender does not update every reader at once. A message format needs an evolution rule so an old programme can handle new information without mistaking it for something else.
|
/ THE IDEA
Consider a tagged binary format such as Protocol Buffers. Each field, meaning a named part of the message, has an identifying number and a specified value type. The receiver uses those identifiers to recognise known fields instead of assuming every value occupies the same fixed position forever. For a compatible addition, a newer writer can include a new numbered field that an old reader does not understand. The old reader can still parse its known fields under the format’s rules. A newer reader must also know what an absent new field means when an old writer sends a message.
THE FORMAL IDEA
field identity = field number + agreed type and meaning
| Field numbers are unitless identifiers, not counts or positions in time. A field’s unit, such as kilograms or parcel count, is part of its agreed meaning. | | The bracketed pairs below are a readable toy notation for numbered fields, not actual Protocol Buffers bytes or valid source syntax. |
|
RUN THE TINY EXAMPLE
Change one thing. Predict what happens.
Version 1 understands field 1 as name and field 2 as parcel count. It reads [(1, Ada), (2, 3)] as Ada with 3 parcels. Change the input by adding field 3 for delivery note: [(1, Ada), (2, 3), (3, side door)]. The old reader still gets Ada and 3; a new reader also obtains the note.
|
Adding information did not require reinterpreting the existing fields. But if field 2 were reused to mean kilograms, an old reader could silently report “3 parcels” from a value that now meant “3 kilograms”. Successful parsing would hide a broken agreement.
/ SO WHAT?
This is why removed field numbers should remain reserved rather than being recycled. Compatibility also has directions: can new readers handle old messages, and can old readers handle new ones? Testing both directions with stored examples catches failures that testing only two freshly updated components can miss. Defaults deserve deliberate meaning too.
ONE CAVEAT |
| The described additions apply to the compatible binary format under its actual rules. Text representations can have different constraints, and byte-level compatibility does not guarantee the application can sensibly use a new value or missing field. |
KEEP THIS
A format evolves safely when old field identities keep their meaning and every reader has a deliberate rule for information it does not know or does not receive.
|
NEXT: Why a wider orbit takes much more time
|