## 7 Fog Computing  
Fog computing is another way of implementing distributed computing. It reduces the overall time to transmit information to end users because of the vicinity of fog nodes [70]. It is a robust complement to cloud computing, putting the network's power and computation at the edge. Fog computing technology is a better solution for smart cities because it provides flexible platforms for meeting users' and operators' demands [71]. The fog computing structure makes the interaction between entities in the platform easily controlled [72]. The first part of the fog architecture is the physical layer, which establishes the connection between devices in a single platform and transfers information. This layer includes devices, sensors, and virtual sensors. Sensors sense data and transmit it faster to nearby locations, i.e., the upper layer of the architecture. The next part is the monitoring layer, which supervises the resource usage and manages the nodes. The following part is the pre-processing layer, which manages the data analysis by filtering the unwanted and reducing the worthless communication. The next is the storage layer, \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**No.** & **Data Group** & **Characteristics** & **MEC Benefit** & **Applications** \\ \hline \multirow{4}{*}{I} & \multirow{4}{*}{Hard real-time data} & This has a threshold latency; the edge servers handle services and applications with hard real-time requirements and provide efficient low latency because of their vicinity to UEs. & Achieving the ultra-low latency required & \(\bullet\) & Gaming Video streaming Healthcare services \\ \hline \multirow{4}{*}{II} & \multirow{4}{*}{Soft real-time data} & This tolerates some predefined and bounded latency; the edge servers implement tasks for applications with soft real-time requirements. Data will be moved to the cloud when the response time exceeds this. & Achieving the low latency required & \(\bullet\) & Traffic control system \\ \hline \multirow{4}{*}{III} & \multirow{4}{*}{Non-real-time data} & This can tolerate latency and is non-sensitive to time. Their tasks are moved to the cloud for load balancing with non-real-time issues. & Achieving load balancing & \(\bullet\) & Air quality analysis Land use analysis Cultural resource management \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Data categories and characteristics of MEC-based smart cities. which stores information records in a summary style. The following part is the security layer, which maintains the information when sending it to oblique channels. The last layer is the transport layer, which passes the data to the cloud [72]. Fog computing decouples the software and hardware functions in multi-level architecture for the running applications. It can also reconfigure different applications dynamically when transmitted to intelligent computing or services [73]. Edge computing provides a transmission service for running applications directly in an enclosed location. It has a restricted number of devices; in contrast, fog computing is highly hierarchical and processes, controls, and stores accelerated data [74]. We can summarize the differences between fog and other computing approaches as follows [71; 72; 73; 74; 75]:  
* Delay-sensitive and location awareness: Fog nodes communicate with each other since fog nodes are location aware. Thus, fog computing analyzes the information faster than other cloud paradigms and suggests the best path with the lowest delay. * Real-time response: fog computing analyzes the data at the edge, and thus, applications' time and latency-sensitivity functions come closer. * Fog node's agility and scalability: the network and data load changes when fog computing at groups and levels integrates resources. * Heterogeneity: fog computing supports all data types as different data collections and processing. * Geographical distribution: unlike the centralized cloud, fog nodes are distributed geographically.