The Concept of Fog Computing with Iot, Algorithms and Challenges

: Fog computing has emerged as a solution to the challenges faced by cloud computing (CC) in the context of the Internet of Things (IOT), including performance, security, latency, and network disruptions. By bringing CC closer to the IOT, fog computing effectively tackles these issues. The primary function of fog computing is to provide proximity to IOT device-generated data at the edge. Instead of transferring the data to the cloud server, local information processing and storage occur at the fog node. When compared to the cloud, fog computing offers services characterized by high quality and fast response times. Hence, fog computing might be the ideal choice to allow the Internet of Things to supply a green and exceptionally secure carrier to IOT clients.


INTRODUCTION:
Fog computing is a developing technology aimed at resolving computing and networking challenges in the widespread implementation of IOT applications.It presents a promising alternative computing model to cloud computing, with computational, networking, storage, and acceleration components deployed at the edge and network layers.This multi-tier, distributed, and potentially collaborative approach offers a complementary solution.Virtualized computing functions can be located at edge devices or network points as needed, embodying the concept of "computing anywhere."To provide a comprehensive overview of current research, this paper offers a comprehensive classification system for the architectural, algorithmic, and technological aspects of fog computing.

Fig:
-Ease of Use authentication mechanisms are implemented at different layers to ensure data security and maintain privacy.2:8 Orchestration and Management: Fog computing architecture requires efficient orchestration and management mechanisms.It involves tasks such as resource allocation, task scheduling, load balancing, and fault tolerance.These management functions ensure optimal utilization of fog resources, seamless integration with the cloud, and overall system reliability.Overall, fog computing architecture provides a decentralized and distributed framework for processing data closer to the edge, offering low-latency services, efficient resource utilization, and improved scalability for various IOT applications.
Source: -Fog computing: from architecture to edge computing and big data processing "Springer Link".

How Does Fog Computing Work?
Fog networking serves as a complement to cloud computing as it facilitates near-edge short-term analytics while the cloud handles resource-intensive, long-term analytics.While data is generated and collected at edge devices and sensors, they often lack the computational and storage capabilities required for advanced analytics and machine learning tasks.Cloud servers, despite their capability, often face challenges in processing data and providing timely responses due to their distance.Moreover, relying on all endpoints to connect to the cloud and transmit raw data over the internet can raise concerns regarding privacy, security, and legal compliance, especially for sensitive data overned by different regulations across countries.Prominent applications of fog computing encompass smart grids, smart cities, smart buildings, vehicle networks, and software-defined networks.

3:1. How & Why Is Fog Computing Used?
Fog computing finds extensive applications across various use cases.An increasingly prevalent scenario involves its utilization in traffic control.Since sensors, including those used for traffic detection, are frequently connected to mobile networks, cities often deploy computing resources in close proximity to cellular towers.By enabling real-time analytics of traffic data, these computing capabilities empower traffic signals to dynamically respond to changing conditions.

3:2. What Are The Benefits Of Fog Computing?
Fog computing has its pros and cons.Some of the advantages to fog computing include the following:

Bandwidth conservation
Fog computing helps conserve bandwidth by reducing the amount of data transmitted to the cloud, resulting in decreased bandwidth usage and associated expenses.

Improved response time
Because the initial data processing occurs near the data, latency is reduced, and overall responsiveness is improved.The goal is to provide millisecond-level responsiveness, enabling data to be processed in near-real time.

Network-agnostic
Although fog computing generally places compute resources at the LAN level -as opposed to the device level, which is the case with edge computing --the network could be considered part of the fog computing architecture.At the same time, though, fog computing is network-agnostic in the sense that the network can be wired, Wi-Fi or even 5G.

3:3 Disadvantages Of Fog Computing
Fog computing also has its disadvantages, some of which include the following:

Physical location
Because fog computing is tied to a physical location, it undermines some of the "anytime/anywhere" benefits associated with cloud computing.

Potential security issues
Under the right circumstances, fog computing can be subject to security issues, such as Internet Protocol (IP) address spoofing or man in the middle (MitM) attacks.

Startup costs
Fog computing is a solution that utilizes both edge and cloud resources, which means that there are associated hardware costs.

Ambiguous concept
Even though fog computing has been around for several years, there is still some ambiguity around the definition of fog computing with various vendors defining fog computing differently.fog nodes' processing capacities, current workload, and utilization percentage.This information helps in determining the optimal fog node(s) for processing and ensures efficient resource allocation.The algorithm can dynamically update the workload and utilization information in the fog node table as fog nodes receive and process data partitions, allowing for real-time monitoring and adaptation.

4:2 Table-Mathematical Model
The main components in fog computing are discussed as follows.
• End-user nodes, also known as TNs or IOT-enabled have several attributes represented by a tuple T =<EUID, Status, τi, L, H, I(q)>.Each node is assigned a unique ID called EUID.The Status attribute indicates the current state of the node, where 0 represents an idle state and 1 represents an active state.The τi attribute signifies the type of event, chosen from a set of distinct events τ = {τ1, τ2, τ3, ..., τp}, where p is the total number of events.The L attribute captures the geographical location of the node along with a timestamp.The H field provides details about the hardware and software configuration of the node, including operational frequency, sampling rate, and wireless transmission hardware.Lastly, I(q) represents the ID of the application instances associated with the node.

4:3 Plagiarism: Virtual cluster:
The EU nodes form a virtual cluster, also termed as mini-cloud [38], that corresponds to the logical boundary of these EU nodes.Mathematically, these virtual cluster is defined as V =< VID, T (u), R, FID >, where VID refers to the ID of the virtual cluster, R denotes the region under the virtual cloud, FID refers to the physical fog instance to which this virtual cloud is mapped, and T (u) is the set of EU nodes under the virtual cluster.Note that |T (u)| changes as mobile EUs dynamically join or leave from any virtual cluster.

5.Fog computing instances:
Fog computing instances can be described as F =< FID, CAP, D(v) >.FID represents the unique ID assigned to each fog computing instance, CAP signifies the access point that connects the fog instance to the cloud, and D(v) stores the device IDs associated with the fog computing devices.Fog computing devices are represented by a tuple D =<DID, Type, Spec>.Here, DID represents the unique device ID, Type indicates the device type (e.g., router, gateway, processing or storage unit), and Spec provides hardware-and software-related details about the device.In essence, the mapping function from the virtual cluster set V to fog computing instances F, denoted as V →˜ F˜, is one-to-one ( injective), while the mapping function from the EU node set T to fog computing instances F, denoted as T →˜ F˜, is one-to-many (many-to-one).

5:1 Networking Model
Let's consider N as the total number of end-user nodes (EUs).Typically, these EUs are grouped into virtual clusters (VCs), where EUi represents the number of EUs in the ith VC, and V represents the total number of VCs.The data generated by these terminal nodes is transmitted from the edge gateway to the cloud.The set of edge gateways is denoted as E. Both data and service requests are forwarded through the link (e, f) between the virtual cluster and the fog computing instances, where e belongs to E and f belongs to F. The data generated by the virtual clusters is transferred to the fog instances through a bandwidth-limited link (e, f).The EUs' generated data can either be processed locally within the fog computing instances or redirected to the cloud for storage and processing purposes.The fog tier routing variable, represented by Xfogvi,e,f, defines the uplink path from the vi virtual cluster to the fog instances (vi → e → f).If there are insufficient resources to process the data or if the data need to be stored in the cloud for further analysis, the cloud tier routing variables (Xcloudf,g,c) define the path from fog instances to the fog gateway, and from the fog gateway to the cloud (f → g → c).The link between fog instances and the fog gateway (f, g) and the link between the cloud data center (DC) and the fog gateway have bandwidth constraints.However, data migration between the cloud DC allows for highbandwidth transfer.The variables Xfogvi,e,f and Xcloudf,g,c indicate the amount of generated data from virtual clusters that reaches the fog instances and is subsequently transferred to the cloud.These variables are also used to estimate service latency and power consumption in fog computing Numerous researchers have investigated latency challenges in fog computing.However, only a limited number of them have explored a comprehensive method to assess overall latency in fog computing.While computing time is influenced by multiple factors, for the purpose of analysis simplification, it is often represented as a linear function with respect to the workload n.Tcomputing(n) = ρ(n) + %, In the fog computing context, the parameters ρ and % represent the gradient and constant, respectively, in the computing function.It is assumed that each fog node Fj can handle a maximum workload capacity of n_max j and executes nj workload at a given time.The transmission delay DSi,Fj corresponds to the round-trip time between the source node Si and fog node Fj, excluding the computing time within the fog node.It is also assumed that a source node can utilize any available fog node in the network.Thus, the total latency, encompassing both computing and round-trip time, for workload nj at fog node Fj is expressed as Ttotal(wk) = DSi,Fj + Tcomputing(nj + wk), where wk represents the accepted workload by Fj, and it is 0 if the workload is not accepted.However, the assumption made in is overly simplistic and fails to consider other factors.A more comprehensive mathematical approach for latency calculation is presented.Additionally, due to various constraints and challenges, not all tasks can be offloaded to neighboring fog nodes or the cloud.In fog computing, the computation process takes into account user privacy and real-time operation.To efficiently utilize resources, a fraction of the task, represented by xi, is locally computed by the ith fog node.This fraction, λi, is computed as λi = αixi, where αi denotes the proportion of a unit task computed by the ith fog node.However, due to limited resources compared to the cloud data center (DC), the fog node may offload computing tasks to other fog nodes or the cloud.The tasks offloaded from the ith fog node to fog node j ∈ J (where J represents the set of available neighboring fog nodes) are given by λij = αijxi, with αij representing the fraction of the unit task that is offloaded to the jth fog node.Consequently, the fog layer performs computations using the expression αi + ∑(j∈J) αij * xi.The remaining tasks are offloaded to the cloud.Therefore, the total computation delay in fog computing is influenced by various factors .In fog computing, when tasks arrive from the end-user nodes (EUs) to the ith fog node, they need to wait in a transmission queue before being distributed to other fog nodes or the cloud.Assuming a Poisson distribution for task arrivals , the latency resulting from the transmission queue when a task of size K bits is transmitted from the ith fog node to the jth fog node can be modeled as follows: Tj (αij ) = λi 2µij (µij − λij ) | {z }waiting time at fog node I + 1 µij |{z} transmission delay

Fog Computing and the Internet Of Things
Due to the limitations of cloud computing in numerous Internet of Things (IOT) applications, fog computing is frequently employed as an alternative.Its decentralized approach caters to the requirements of IOT and Industrial IOT handling the substantial volume of data generated by smart sensors and IOT devices.Sending this data to the cloud for processing and analysis would be both expensive and timeconsuming.Fog computing minimizes bandwidth requirements and mitigates the back-and-forth communication between sensors and the cloud, thereby improving overall IOT performance.

Fog Computing and 5g
Fog computing is an architectural framework where a network of nodes receives real-time data from IOT devices.These nodes process the received data in real-time, achieving millisecond-level response times.Periodically, the nodes transmit summarized analytical information to the cloud.Subsequently, a cloud-based application analyzes the data collected from multiple nodes to generate actionable insights.This architecture requires more than just computing capabilities.It requires high-speed connectivity between IOT devices and nodes.Remember, the goal is to be able to process data in a matter of milliseconds.Of course, the connectivity options vary by use case.An IOT sensor on a factory floor, for example, can likely use a wired connection.However, a mobile resource, such as an autonomous vehicle, or an isolated resource, such as a wind turbine in the middle of a field, will require an alternate form of connectivity.5G is an especially compelling option because it provides the high-speed connectivity that is required for data to be analyzed in near-real time.

Fog Computing Using Robotics
Fog computing, when applied to robotics, offers a range of benefits and possibilities.By integrating fog computing with robotics, computational tasks can be distributed and processed closer to the robots themselves, enabling faster response times and reducing the reliance on distant cloud servers.This proximity facilitates real-time decision-making, enhances the overall performance and efficiency of robotic systems, and enables seamless interaction with the surrounding environment.Fog computing can also enable collaborative robotics, where multiple robots can share data and intelligence in a decentralized manner.This collaboration allows for more efficient task allocation, coordination, and problem-solving among robots, leading to increased productivity and flexibility in various domains such as manufacturing, logistics, healthcare, and agriculture.Moreover, fog computing in robotics can enhance privacy and security by minimizing the transmission of sensitive data to external cloud platforms.Critical data processing and analysis can occur locally within the fog nodes, reducing the exposure of sensitive information to potential threats.In summary, fog computing in robotics opens up exciting possibilities for real-time processing, collaborative capabilities, improved performance, and enhanced privacy and security.It empowers robots to operate more intelligently and efficiently in various applications, paving the way for advancements in the field of robotics.

. Fog Computing Using Space Science
Fog computing, when applied to space science, presents a promising approach to address the unique challenges and requirements of space exploration and satellite missions.By integrating fog computing with space science, computational tasks can be distributed and processed closer to the space-based assets, enabling efficient data processing, analysis, and decision-making in space.One of the key benefits of fog computing in space science is the reduction of data transmission and latency.In space missions, the vast amount of data generated by satellites and space probes needs to be processed and analyzed in real-time.By deploying fog nodes in proximity to the space assets, data processing can be performed locally, minimizing the need for data transmission to Earth-based servers.This significantly reduces latency and enables faster response times, critical for time-sensitive operations and experiments conducted in space.Fog computing also addresses the challenges of limited bandwidth and intermittent connectivity in space communications.Satellites often have limited bandwidth and may face periods of communication blackout when they are oust of range of ground stations.By utilizing fog computing, data can be processed and filtered locally on the satellite, allowing for efficient data compression and only transmitting essential information to the ground when connectivity is available.This approach optimizes bandwidth utilization and conserves valuable communication resources.Furthermore, fog computing enhances autonomy and decision-making capabilities in space missions.By deploying intelligent fog nodes on satellites and space probes, real-time data analysis and decisionmaking can occur locally.This enables autonomous operations, adaptive mission planning, and onboard data interpretation, reducing the dependency on ground-based control and enabling more agile and efficient space missions.In addition to these technical benefits, fog computing in space science also improves mission resilience and robustness.By decentralizing computing resources, space missions become less reliant on a single point of failure, such as a ground-based data center.In the event of a network disruption or system failure, fog nodes can continue to perform critical operations, ensuring the continuity of the mission.Overall, fog computing in space science holds great potential for optimizing data processing, reducing latency, enhancing autonomy, and improving mission resilience.It empowers space missions with greater computational capabilities and enables real-time decision-making in the challenging and dynamic environment of space exploration.

Edge Computing
Edge computing relies on the computational capabilities of edge servers or devices, emphasizing the IOT devices on the device side rather than solely relying on cloud services.According to a specific study, edge computing involves processing resources or networks that reside between cloud data centers and data sources.While intelligent IOT sensors and devices can act as data sources, edge computing encompasses a broader scope.

Conclusion
The Internet of Things (IOT) has generated significant interest among businesses and researchers, transforming our lives and becoming a crucial aspect of the modern world.It has the potential to connect anything in our surroundings.However, IOT devices often have limited processing and storage capabilities, leading to issues with network failures and increased latency in traditional integrated Cloud Computing (CC).To address these challenges, fog computing has emerged as an extension of CC, bringing computation closer to IOT devices.This enables data computation to be performed at fog nodes, reducing latency and improving responsiveness, especially for critical applications.The integration of IOT with fog computing offers numerous benefits for various IOT applications.This paper presents an overview of different computing paradigms, the features of fog computing, a detailed architecture of fog computing including its various layers, and an in-depth analysis of the relationship between fog and IOT.Additionally, the discussion explores various fog device algorithms and research challenges in fog computing.In summary, the objective of this research work is to highlight future studies and address the open challenges related to the integration of fog computing with IOT, providing a comprehensive review of the current contributions in fog computing and IOT research in today's world.

4: Algorithm: Fog Computing Data Processing Input: Incoming data stream List of available fog nodes with their processing capacities Output:
In this table, you can track the For each fog node, process the assigned partitions locally using specific algorithms and operations.Calculate the processing time for each partition based on the complexity of the processing task.Decision Making:Apply decision-making algorithms on the processed data to generate local decisions.Store the decisions in a decision table.Data Fusion:If multiple fog nodes processed different partitions of the same data, merge the processed results.Calculate aggregated values or perform statistical analysis on the fused data.Result Dissemination:Send the processed data results to the appropriate destinations based on the application requirements.Update the decision table with the dissemination details.Dynamic Adaptation: Periodically monitor the fog nodes' processing capacities and network conditions.Adjust the workload distribution based on the changing conditions.4:1 Update the workload and utilization information in the fog node table.