In any scalable IoT system it is important to use an embedded protocol that can handle the workload while doing it efficiently. In this week’s breakdown of the Embedded IoT Protocols white paper, written by Patrick Barrett, we will be looking at the benefits and implications of XMPP.
BENEFITS OF THE PROTOCOL FORMALLY KNOWN AS JASPER
XMPP, previously known as Jabber, is a protocol originally designed for use in instant messaging. Early IoT developers were interested in XMPP because of its real-time nature. It provides low latency communication back to a single, central server. Exosite offers an XMPP-based API that was developed for use in IoT deployments patters where latency is the highest priority.
HEAVY DATA OVERHEAD
However, XMPP has a number of problems that make it somewhat undesirable for embedded IoT protocols. As an XML-based protocol, XMPP is very verbose, even more so than HTTP, and has heavy data overhead. A single request/response exchange to send one byte of data from an IoT connected device to the server is more than 0.5 kB.
There is a draft specification that would compress XMPP using an XML encoding called efficient XML Interchange (EXI). But even with EXI, the same one byte of data gets hundreds of bytes of protocol overhead from XMPP alone. EXI is also a much harder format to process than other options now available. Because of these inherent problems, it is generally recommended to avoid using XMPP in embedded IoT applications.1 Like