## 2 Related Works  
### Fog Computing with IoT  
The centralized Cloud architecture is facing a number of challenges from IoT applications. For example, IoT cannot support applications that require low latency and real-time applications such as connected vehicles [1], smart traffic lights [5], etc. Fog computing can solve these challenges. Table 1 summarizes differences between Cloud and Fog computing. Fog computing can help address Internet of Things challenges according to [PERSON] and [PERSON] [6]  
Latency constraints: Fog Computing is often the best candidate when it comes to dealing with strict timing requirements of many IoT systems such as data analyzing, data managing and other latency-restrictive tasks close to end users. Network bandwidth constraints: Fog Computing allows data sent and received from the end users to the Cloud to be processed hierarchically so that the trade-off between application demands and available networking and computing resources is considered. This also optimizes data usage, reducing the amount needed to be sent to the Cloud. Resource-limited devices: Resource-intensive tasks can be performed by Fog instead of resource-limited devices when they cannot be sent to the Cloud, which reduces these devices's complexity, maintenance cost, and energy consumption. \begin{table}
\begin{tabular}{p{113.8 pt} p{113.8 pt} p{113.8 pt}} \hline \hline
**Parameter** & **Cloud Computing** & **Fog Computing** \\ \hline Latency & High & Low \\ \hline Response time of the system & Low & High \\ \hline Architecture & Centralized & Distributed \\ \hline Communication with devices & From a distance via Internet, Multiple hops & Directly from the edge via Various protocols and standards, One hop \\ \hline Data processing & Far from the source of information in long-term time & Close to the source of information in short-term time \\ \hline Computing capabilities & Higher (Cloud Computing does not provide any reduction in data while sending or transforming data) & Lower (Fog Computing reduces the amount of data sent to Cloud computing.) \\ \hline Server nodes & Few nodes with scalable storage and computing power & Very large nodes with limited storage and computing power \\ \hline Security & Less secure, Undefined & More secure, Can be defined \\ \hline Working environment & Warehouse-size building with air conditioning systems & Outdoor (e.g., Streets, gardens) or indoor (e.g., Restaurants) \\ \hline Location of server nodes & Within the Internet & At the edge of the local network \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparison between Cloud computing and Fog computing. * Uninterrupted services with sporadic connectivity to the cloud: A Fog system can function independently to maintain constant services despite having sporadic network connectivity to the Cloud. * IoT security challenges: A Fog system is capable of the following: (1) acting as proxies for resource-limited devices of which security credentials and software can be managed and updated; (2) performing numerous security protocols on behalf of the resource-limited devices, to make up for the lack of security functionality on these devices; (3) overseeing the security status of devices in close proximity; and (4) using gathered information and context to identify threats promptly. This section describes articles on the convergence between IoT and Fog computing. Fog computing is still a recent research topic, thus concrete solutions to support this computer paradigm are lacking. In this section, we examine existing works discussing the integration of Fog computing with IoT in different applications. There are survey papers related to various aspects of Fog computing. For example, [PERSON] et al. [7] has considered the essential features of Fog computing for healthcare systems. In addition, [PERSON] et al. [8] contributed a survey of Fog computing by discussing various application scenarios for Fog computing and various problems that could arise during the implementation of these systems.