# Recent Advances in Evolving Computing Paradigms: Cloud, Edge, and Fog Technologies
## 3 Evolving Computing Paradigms and Related Concepts
### Fog Computing
#### 3.12.2 Architecture
Maintaining reliability is critical, as a complex fog system encompasses IoT and fog devices alongside the cloud with many failure possibilities. The scalability component assures that the fog resources are scalable when resource demand surges at peak hours. The fog model aspires to offer horizontal as well as vertical scalability, while the cloud platform ensures horizontal scalability. With distributed resources for processing, networking, and storage, the resource allocation unit allocates, deallocates, and reallocates resources. As multiple applications are run concurrently in fog systems, the scheduling of applications is managed by the application scheduling component. The energy-efficient resource management is handled by an energy-saving component at this layer, which reduces operational costs. The security layer deals with all issues that relate to security, such as encrypting communication, securing stored data, preserving fog users' privacy, etc. Similar to cloud computing, fog computing is deliberated as a utility model. As users connect to the cloud for availing services, users also connect to the fog system for services; however, the fog middleware manages interactions with the cloud. The provider must authorize the user attempting the service connection, and the authentication unit authenticates the user'srequest to avail fog service. To ensure security and evade security breaches by intruders, every interaction has to be encrypted. The component of encryption encrypts the connection between IoT devices and the cloud. The majority of fog components is connected wirelessly, and ensures security is critical. Fog systems acting on users' private data should not reveal those without proper user approval. At times where users accept a provider's security policy without reading it, it is critical to assure that user privacy is upheld. Application Layer  
Numerous applications, such as smart homes, smart cities, smart grids, smart water management, smart transportation, smart agriculture, augmented reality, virtual reality, smart healthcare, and smart vehicles, compel the fog framework's efficient services. The fog computing applications described here are depicted in Figure 11.  
A smart grid extends the reliable, efficient, automated electricity distribution model aiming to cut down operation costs, enhance transmission efficiency, and offer to smoothly integrate with systems involving renewable energy [112]. It further enables service providers and consumers to track and regulate the real-time price, output, and consumption of power [113]. The fog systems play a key part in favoring smart grids within smart cities, minimizing electricity bills. Here, the data produced by the fog devices can be locally analyzed and filtered by fog collectors deployed at the edge and transmitted to the cloud for complex analysis, visualization, and long-term storage [114]. As per varying demands, such as a low-cost and energy, smart grids allow switching over to any other supplies of energy, such as solar or wind, with edge/fog devices gathering local data to decide in real-time [115]. Smart traffic lights and transportation systems  
In smart traffic light applications, smart traffic lights aid in lowering traffic congestion, noise, fuel consumption and avert accidents thus, improving the driving experience. These  
Figure 11: Applications of fog computing. connected lights functioning as fog devices are adept at detecting the ambulance's flashing lights and changing the traffic signal to open lanes for the ambulance to travel through [116]. It recognizes pedestrians and cyclists and figures out the speed and distance of vehicles approaching and collaborates to provide warning messages to adjacent vehicles. Moreover, smart lighting is switched on when movement is detected and turned off automatically when traffic passes. This system comes handy in averting accidents, maintaining low and steady traffic, and collecting pertinent data to enhance performance.