# Internet of Things and Its Applications: A Comprehensive Survey
## 3 Background  
The principal advantage of IoT consists of its ability to enable communication between an infinite amount of machines incorporated into a large-scale wireless network [47]. These automated devices and sensors together produce and transmit information in real-time, which is useless in the case of incorrect or insufficient filtering and data processing. Moreover, data storage and transmission are the most important and challenging matters in a dynamic IoT network. This section discusses the structure and protocols that have been used in the IoT network [48]. A hybrid IoT architecture consists of the things involved, followed by the insight data processes which end with the action that needs to be done (as shown in Figure 2) [49; 50]. The benefit of it is that it can comprise several subsystem architectures [51]. Listed below are the functions of each component in a conventional IoT architecture, as shown in Figure 2:  
* **IoT Edge Devices** form the smart IoT actuator since they are able to conduct some processing themselves;
* **IoT Sensors** are connected to the cloud, where they can transmit and receive the data;
* **Device Provision** helps to connect a large number of devices to be registered;
* **IoT Gateway/Framework** proves a cloud hub to the IoT devices and provides command, management, and control of the devices;
* **Stream Processing** analyzes complex execution using time windowing ductions, stream aggregation, and external source combing;
* **Machine Learning** allows the algorithms to be predicted and executed using extreme data. It also analyzes and enables predictive maintenance, according to different scenarios;
* **Reporting Tools** help to hold and store the data, while providing the necessary tools for batch processing;
* **User Management** can restrict and permit which users or groups are authorized to perform an action on the device. The process is done by using the capacities of the application of each user. Generally, IoT systems are designed with two management architectures, including time-based and event-driven architectures. The event-driven architecture consists of sensors transmitting data when activity is sensed, the same as when an alarm is activated once a gate is opened [52]. However, for the time-based architecture, the components of the system transmit data continuously at a specified interval of time [53]. Additionally, it works recurrently after a break to be separately adjusted for each device or setup in a central management system sending queries to endpoint devices and sensors [54]. Various protocols have been used to enable data transmission for the IoT network [55]. It consists of a syntactic and semantic set of regulations determining the operating activity block of the computer network during data transmission [56]. The role of the utilized protocol is to determine the behavior of an entity during data transmission [57]. The traditional Internet Protocols (IPs) are unfortunately not appropriate for ensuring proper data exchange. It is very challenging to design an IoT network, as it comprises several sensors that cannot be added to the general address schema, affecting the possibility of obtaining a fully-fledged node. Besides, these nodes are strongly dependent on a constant energy source, the channel throughput capacity, and the storage parameters, requiring advanced management of the resources. Concerning Wireless Sensor Networks (WSNs), it is necessary to add a data sink to the network [58]. The process consists of first storing the data collected in the sink, before reaching to the other nodes and repeating the process [59]. The proper selection of a strategy for transferring data has a significant impact, as the sensor and sink disposition may enhance the IoT network bandwidth. It ensures security and privacy through the prevention of sending and receiving the same data from multiple sensors, which reduces the energy costs [60; 61; 62]. Moreover, several messaging protocols are being developed to support the use of IoT and make it easy to employ.