Protocols - Adafruit IoT Episode 2


Protocols are a shared language and rule set to allow machines to talk to the internet. They get data from point A to B.

HTTP - Hyper Text Transfer Protocol
It’s stateless, which means it needs a connection per date transfer. It needs one to read and one to write. It can process large amounts of data, but it’s not lightweight or fast. It is one client, one server and one request at a time.

REST - Representational State Transfer
Rest has 4 commands. They are get, which is to request data, put, which is to send data, post, which is to create data, and delete, which is to delete data. It uses URLs (Universal Resource Locations), which are broken down by using /.

XML - Extensible Markup Language
It is used to store and transport data. It’s typically not used due to it’s complexity and robustness

JSON - Java Script Object Notation
It is one of the most commonly used protocols. It’s lightweight, readable by humans and machines, and can be used any programming language.

MQTT - Message Queue Telemetry Transport
It’s a publish and subscribe messaging protocol. It minimizes network bandwidth while ensuring relaibility and assurance of delivery. It’s simple to use and lightweight.

CoAP - Constrained Application Protocol
It’s similar to rest, but smaller. Data can be sent and received at any time. It can be used to transfer data between a web app and IoT Device

Brokers and Clients
The broker is the reliable one. It is always available even if the transport of data is disconnected. There can only be one broker, but can have multiple clients. The client uses / to organize storage similar to how windows uses them. It has wild card options. Wild card + allows you to see all of one thing. Wild card # allows all remaining levels of hierarchy.

More information
To learn more information about protocols, watch episode 2 and 2a of Adafruit and Digi-Key’s IoT series. or visit Adafruit’s break down of the video