## 4 The Architecture of IoT
The mechanisms for standard plug-and-play applications should be employed. The data are digitized at this layer to be forwarded securely to the abstraction layer. This is also named the device layer, as it is the initiation point of the knowledge within the IoT system, providing an interface between the system and the physical world. Technologies such as QR codes, smart meters and sensors, RFID, and others fall under this layer [26];
2. **The object abstraction layer or data-link layer** further transfers the information to the service management layer. Information is forwarded through secure channels using technologies such as RFID, 3G, GSM, UMTS, WiFi, Bluetooth Low-Energy, infrared, and ZigBee. Some cloud computations are also processed at this layer and forwarded to the upper layers [26; 2],
3. **The layer for service management or middleware** includes the pairing service that has its requester-supported list of addresses and names. The IoT application programmers can work with diverse objects at this layer without any constraints regarding a particular set of hardware. Additionally, the received data are processed at this point, where the decisions to deliver the required services over the network are made;
4. **The application layer** provides the data and services that the clients request, such as temperature and air humidity measurements. The high-quality services that fulfill the customer's needs through mobile and web applications, relevant reports, and other modes show the importance of this layer [26];
5. **The business layer** is where the business management tasks over the IoT system activities are performed. At this layer, the graphs, flowcharts, and reports for the whole business model or the whole smart solution provided by the IoT platform are generated based on the received data from the previous layer. From here the platform designers are supposed to style, analyze, implement, evaluate, and monitor the connected components in order to support the right decision-making based on massive information analyses. In other words, all of the underlying layers can be observed from this point to enhance the overall services and to provide a user interface [2]. Considering that there are around 700 IoT service providers that offer storage and IoT security management systems based on the cloud, as well as various forms of data analytics services, it is obvious that the number of IoT design choices is huge. In addition, there are constantly changing PAN, LAN, and WAN protocols that make the decision-making for IoT architecture designers even harder. The wrong choice for a protocol can result in very low quality for the communication and the signal. Additionally, the interference effects in the LAN and WAN should be considered before any deployment action is taken. Another factor to be considered while designing the architecture is the resiliency of the components and how costly the loss of data may be. Some Internet protocol choice examples include MQTT versus CoAP and AMQP, so possible causes of future migration of one cloud vendor to another should be analyzed. Another important factor to keep in mind is the storage of data, or where the data should reside. Here, the concept of fog computing comes into play as a method of data processing close to the source, which solves the problems with latency. Recently, more attention has been paid to the concept of fog computing as it reduces the bandwidth and costs of moving data over several WANs and clouds. It is crucial to make sure that the IoT design implements relevant analytic engines and data analytics algorithms, considering the effect of the computations on the cloud-sensor communication and the end device battery life. Besides, if an architecture design does not implement security measures on every level, then the whole IoT system in a city could be the largest attack surface in that city [36].