Saturday, April 9, 2016

Messaging Protocol to use


The differences between XMPP and MQTT. What are they, actually?

XMPP (eXtensible Messaging and Presence Protocol) was born as a protocol for messaging apps. Jabber uses it, Google Talk (today Hangouts) used it, WhatsApp uses it. It's a great and reliable messaging protocol, far more reliable than GCM is. It also has many implementation guides/tutorials/examples.
MQTT  (MQ Telemetry Transport) instead, was born as a communication protocol designed for low-power devices which have limited power capacity and low computational power. It's fast and reliable, and uses far less data&power than XMPP needs to do the same exact work. Facebook Messenger uses it. However it's not very popular and may lack tutorials/examples for beginning developers.
Here's a small table comparison on how much data those protocols use: XMPP versus MQTT: comparing apples with pears
...and here's a battery consumption comparison: Power Profiling: HTTPS Long Polling vs. MQTT with SSL, on Android


To conclude, which one you're going to use is up to you.
Both are good and reliable application protocols, even though XMPP relies on HTTP, which makes it automatically more heavyweight but it doesn't mean it's less adequate for this job.


https://www.quora.com/Which-is-the-best-protocol-to-use-for-IOT-implementation-MQTT-CoAP-XMPP-SOAP-UPnP
 

No comments:

Post a Comment