## 7 IoT-Defined Application Protocols
### Extensible Messaging and Presence Protocol (XMPP)  
Extended messaging is dealt with in the dynamic host control protocol (DHCP) on a network layer of the OSI model for IP. Thus, XMPP [50] is the most advanced form of IoT networking based on the characteristics of DHCP, i.e., the message length can be extended for a single packet based on the network specification and data requirement [17]. Furthermore, each node is dealt with as a separate entity using three identification marks commonly known as node ID, source ID, and cache type. These attributes are used by the concentrator/gateway that serves as a primary router for the local IoT. The attributes are unique for each node within the local network, so they can be reached by a client outside the network.  
XMPP registers things on demand with a concentrator. The attributes are accompanied by data as string and data as numeric tags [47]. The process registers each node that is being communicated in the IoT; thus, tagging is important because the registry might be searched for certain terms and comparisons should be made according to the tag type accordingly for fast routing and packet tracing. The process allows things to be registered that are only known by the owner of the things. Security and data integrity is thus never breached when using this mechanism.  
Tags or meta data are used to avoid re-registration of the same node with the owner node. In addition, as the network can be formed by any node, the owner can thus dedicate itself for a specific group of nodes it is surrounding. XEP documentation suggests five different architectures for an XMPP-based network.  
* **xep-0000-IoT-BatteryPoweredSensors:** this protocol defines the way for handling power constraints by the IoT. Such a protocol is widely used in intermittently available network nodes.
* **xep-0000-IoT-Events:** this extension gives privileges to network nodes for defining their set of events for subscription and response.
* **xep-0000-IoT-Interoperability:** IoT may or may not consist of the same types of devices. This protocol definition is used for setting priorities on defining communication rate and type between different devices that are working on slightly different technology/data.
* **xep-0000-IoT-Multicast:** it defines multicasting methods for efficient transmission of data between sensors in a network.  
* **xep-0000-IoT-PubSub:** publications that are the result of subscriptions by anodes for specific data in specific formats are efficiently done using this method.
* **xep-0000-IoT-Chat:** user-friendly human-to-machine interface is designed using this tool. The basic architecture of IoT is used as the underlying platform for meaningful information exchange because of human-defined queries. Automatic response is also provided by using chat options in IoT XMPP.  
XMPP is relatively simple because it uses high-level XML scripts. Though it is the most suitable protocol for heterogeneous IoT, yet it has four major drawbacks. Its commands are more specified, and thus, it uses more CPU power for processing each command. The bandwidth requirement can be controlled by the underlying XML scripts but cannot be as optimized as other protocols can be. QoS is not guaranteed, and the communication is restricted to text data. Visualization is relatively easy for users by using XMPP. Interoperability and bidirectional communication between man-machine are the key features of XMPP.