## 2 Related Work
### Load Balancing among the Four IoT Network Layers  
This section provides an overview of recent studies conducted between 2019 and 2022 that focused on workload balancing and task management within IoT systems across the Edge, Mist, Fog, and Cloud layers. The objective of these studies was to leverage the capabilities of all four layers and optimize their utilization within the system. However, this section also highlights the existing gaps in these studies and proposes potential solutions to address them. In their work, [PERSON] et al. (2021) [2] introduced a new algorithm known as the RAO-1 ALGORITHM, which aimed to minimize energy consumption within the Mist computing environment of IoT networks. The proposed approach consisted of two stages: reducing the number of unutilized microcomputers and effectively allocating tasks to suitable participating microcomputers. By implementing the algorithm using Python 3.7, the results demonstrated reduced power consumption and superior performance compared to the ECTC and MaxMaxUtil algorithms. However, from our perspective, simply reducing the number of unused microcomputers within the Mist layer may not provide an effective solution. It would be more beneficial for the authors to focus on effectively utilizing all available microcomputers and achieving workload balance to alleviate the burden on the Cloud and Fog computing environments. Furthermore, considering factors beyond just task completion time, such as data size, can contribute to making better resource allocation decisions. In traditional IoT networks using the MQTT communication protocol, the MQTT brokers are distributed in the network and concentrated to Cloud nodes. Thus, the traditional MQTT protocol is inappropriate for time-sensitive applications because it does not support real-time communication between IoT devices. Therefore, [PERSON] et al., 2021 [3] proposed a new approach called MQTT-MBD to meet task deadlines and improve network efficiency by distributing MQTT brokers over Mist nodes. To ensure that MQTT-MBD improves communication delay, the authors identify four steps: registration, selection, assignment, and connection, to select an appropriate broker. The broker selection is based on three criteria: enough energy, meeting the real-time constraint, and CPU utilization. Finally, a task will be sent to the Mist broker only if the Cloud broker, the Fog broker, and Edge broker cannot answer the deadline. The simulation results showed that MQTT-MBD achieved better results than Extended-EMMA and DM-MQTT in energy efficiency and delay. The only notable drawback that can be seen in this proposed approach is that the process of selecting an MQTT Mist broker to control tasks for the systems comes at a very late stage. This is because IoT tasks must travel to all layers in a decreasing order, starting from the Cloud to the Mist layer, and ask each computing layer if it can meet the deadline requirements for the task until it reaches the Mist layer. This process increases the execution time and consumes power; however, these circumstances can be avoided if selecting the Mist broker comes earlier. Resource allocation and managing tasks among Cloud, Fog, and Mist computing in the IoT networks is a challenge. Therefore, Refaat 2020 [4] proposed a new model called multi-level IoT tasks scheduling (MLITS) to manage and allocate resources for IoT tasks and distribute these tasks over the Cloud, Fog, and Mist computing environments. The criteria to distribute tasks among these computing environments is based on the task's deadline and the urgency to execute it. Using CloudSim 3.0.2, the proposed approach succeeded in achieving better results than the Min-Min, CBS, and EFDF algorithms in terms of the time to complete a task, as well as having less waiting time and more significant throughput. However, the MLITS has some drawbacks; the criteria to distribute tasks is limited, especially when it is known that the Fog, Cloud, and Mist have different source capabilities.