## 5 IoT Platform Communication with IoT Sensors and Applications
After receiving data from the publisher, the broker sends the data to the subscribed consumers for the related topic;
* Push-pull, involving dedicated data queues to which the data producers push the data and from which the consumers pull the data. In this model, the data producers and the consumers do not need to be aware of each other;
* Exclusive pair, which is a bidirectional and persistent connection model between the client and the server, where both can send messages to each other, unless the client requests the connection's closure. The server knows which connections are open so this model is a stateful model, unlike the request-response model, which is stateless [40]. The MQTT (Message Queue Telemetry Transport) protocol was introduced by IBM as a very lightweight and suitable communication protocol for mobile-to-mobile (M2M) and wireless sensor networks (WSNs), as well as IoT scenarios in which sensor nodes communicate using an MQTT message broker with various applications. It is asynchronous and provides flexibility and ease of implementation using a publish-subscribe pattern. MQTT is ideal for IoT and M2M systems and can provide routing for small, cheap, low-power, low-memory devices in attackable networks with low bandwidths. CoAP stands for the Constrained Application Protocol, which is a synchronous protocol using the request-response communication model at the application layer. It is designed to enable low-power devices with limited computation and communication capabilities to use the Representational State Transfer or RESTful interactions. With CoAP, the resource-constrained devices are provided with web service functionalities, since it is an HTTP-like web protocol that can extend the REST architecture to LoWPANs. It is estimated that millions of end devices will be used in vast applications using CoAP as the standard protocol for device interactions in the future. It is a binary protocol running over UDP to remove the TCP overhead and reduce the bandwidth requirements. CoAP also utilizes both synchronous and asynchronous responses. CoAP is aimed at the IoT and M2M networks and includes no built-in security features [41]. As the IoT devices are constrained in power usage and the amount of data or information that can be transferred with each message, the protocols used at each level of communication are optimized based on the limitations. Like in the standard web model protocols, the protocols used for IoT applications can be optimized with the implementation of NB-IoT radio communication technology at the data link layer. In both models, the CoAP protocol becomes the new spanning technology in the IoT model with NB-IoT. As CoAP includes features such as congestion control, transfer fragmentation handling, efficient header or payload coding, and so on, it can be reused for IP- and non-IP-based NB-IoT deployments [42]. Generally, MQTT and CoAP are appealing protocols for resource-constrained devices. There are end devices that due to power restrictions do not support the TCP protocol. Such devices can only use CoAP, MQTT-SN, DDS, and UADP. Among the advantages of CoAP and MQTT are the low overheads, low message delivery delays, and low computing resource consumption rates [43]. Keeping the architectural design of the NB-IoT and IoT platforms in mind, one optimized model for CIoT (core IoT) with the Evolved Packet System (EPS) is designed, in which, unlike conventional EPS architectures, both the control and user plane are used to give small data delivery permission to the network in both planes. This is possible because of the CIoT Service Gateway Node or C-SGN and the Service Capability Exposure Function or SCEF, as well as the S11-U interface with which the data transmission between the MMEand S-GW is enabled. Originally, the SCEF entity was used for service provisioning to third parties. Now, when it is connected to an MME, it is utilized for NIDD. Figure 10 shows the architectural design of such a model.