Communication Protocols Flashcards
What communication protocol is great for sending events from devices to phones over bluetooth or over wifi?
MQTT (Message Queuing Telemetry Transport)
Show an example of endpoints for MQTT
wearable/{id}/realtime
wearable/{id}/raw
analytics/{id}/summary
analytics/{id}/alerts
What is a cloud based broker and local edge broker used for in MQTT?
A cloud based broker allows the device to send messages over wifi to the backend and a local edge broker allows a device to send messages to a phone or edge device.
Describe the three approaches to using a device with MQTT and an edge device like a phone for real time analytics
Simultaneous Device → App & Cloud Real-time cloud processing, live AI coaching, multiplayer leaderboards
Device → App → Cloud (Syncing) Battery efficiency, offline mode, stable cloud storage
Hybrid (Best Option) Instant local processing + Adaptive cloud syncing (real-time only for critical events)
Do you need a persistent connection to servers for MQTT?
YES and NO. If a server goes down another one can spin back up with a broker and the messages that are pending will be resent. If youre using load balancing the messages can be redirected to another server that can allow the connection.
But you can take an alternate approach depending on your use case. You can sync to the device then have that device sync to the cloud when it reaches wifi - which could be done via post eliminating the need for persitent connections
Name some popular MQTT Brokers and their connection amounts
Mosquitto ~50K - 200K Lightweight setups, small/medium IoT deployments - EDGE DEVICES LIKE PHONES
HiveMQ 1M+ Large-scale cloud systems, enterprise applications
EMQX 10M+ Massive-scale IoT & real-time analytics
Whats a good way to prevent message loss on the backend using MQTT?
Load balancer -> clustered broker setup -> kafka/redis message q -> consumers
brokers are reliable due to cluster and load balancing and will get messages into q. Consumers can handle from theree and also scale up and down.