Introduction
Connecting devices in the internet of things (IoT) requires communication methods that work well with limited power and bandwidth. Choosing the right protocol helps devices talk efficiently and reliably.
Imagine sending letters through the postal service versus sending quick notes by a bike messenger. The postal service (HTTP) is reliable and thorough but slower and heavier. The bike messenger (CoAP) is faster and lighter but may need quick checks to ensure the note arrived.
┌─────────────┐ ┌─────────────┐ │ HTTP │ │ CoAP │ │ (Web use) │ │ (IoT use) │ ├─────────────┤ ├─────────────┤ │ TCP (reliable)│ │ UDP (light) │ │ Larger msgs │ │ Smaller msgs│ │ TLS security │ │ DTLS security│ │ No built-in │ │ Resource │ │ resource disc│ │ discovery │ └─────────────┘ └─────────────┘
Pass the test and this pattern moves unknown