Data contracts in one minute

What is a number in a distributed system? A guess.

A sensor sends
326000
no label
Boundary
?
nothing to check
The receiver has to guess
326 000 Wa power plant?
326 Wif it was milliwatts
326 kWhif it was energy

A sensor sent this. What is it?

Watts, milliwatts, energy, which device, which firmware? Nothing that travels with the number says so, so every receiver decides on its own.

Try it with your phone →

One contract, power_reading: @1 in watts, @2 in milliwatts, @3 adds a field the hub does not know. Contract names, versions and shape hashes are from the live demo's aimdb.lock files. The chain without contracts is illustrative, not measured.