Knowledgebase

Designing Message Payloads Print

  • internetthings, internet, bandwidth, guide, howto, solution, zillionkinghost, hosting
  • 0

What devices send.

WHAT EVERY MESSAGE NEEDS

A device identifier A timestamp The measurement and its units A schema or format version

WHY THE VERSION MATTERS

Devices in the field will run different firmware, and the platform must handle all of them.

WHAT TO INCLUDE FOR RELIABILITY

A sequence number, revealing gaps A message identifier, enabling deduplication

WHY SEQUENCE NUMBERS MATTER

They show what was lost, which silence does not.

WHAT FORMATS SUIT

Compact binary with a defined schema, for constrained links Structured text, where bandwidth permits and readability helps

WHAT TO DEFINE

The schema, versioned and documented.

WHY

Devices and platform are developed separately and must agree.

WHAT TO AVOID

Field names longer than necessary on constrained links Floating point where integers with a known scale suffice Nested structures adding overhead Units left implicit

WHY UNITS ESPECIALLY

Implicit units cause errors that are invisible until something behaves absurdly.

WHAT TO PLAN

Schema evolution: adding fields without breaking older consumers.

WHAT RULE TO FOLLOW

Adding optional fields is safe; removing or repurposing is not.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot