IoT-Fog Architectures in Smart City Applications:A Survey

2021-12-03 01:25ShahidSultanHajamShabirAhmadSofi
China Communications 2021年11期

Shahid Sultan Hajam,Shabir Ahmad Sofi

Department of Information Technology,National Institute of Technology,Hazaratbal Srinagar 190006,Jammu and Kashmir,India

Abstract:Smart cities improve the quality of life of people by utilizing the benefits of Information and communication technology(ICT)and the Internet of things(IoT).The applications of the smart city often rely on the cloud for services. No doubt cloud provides an ample amount of resources as a service but still it has limitations in terms of unreliable latency,mobility,and location awareness due to their multi-hop distance from the IoT devices.Fog computing avoids these limitations by providing services nearer to the edges.In this work we investigate the already proposed IoT-Fog based application specific smart city architectures and review them based on scalability,heterogeneity,mobility,energy conservation,latency,and security.Additionally,we discuss the applications and highlight the challenges that fog computing faces.We also present a case study of a smart city scenario with multiple applications of IoT.

Keywords:fog computing;edge computing;mobile edge computing;resource allocation,offloading;software defined networks;smart city;smart grid

I.INTRODUCTION

The rapid increase in the ubiquitous connected IoT devices results in the production of huge amount of data which is predicted by various companies[1–3].It is estimated that around 50 billion gadgets would be associated to the web by 2020[3].This rapid growth will result in the generation of data at a rapid rate,in large volume and of multiple varieties.Cloud services are used to process this data but low latency,energy efficiency,bandwidth conservation,mobility of IoT devices,privacy and availability requirements of IoT applications poses a big challenge to the cloud[4].The multihop distance of the cloud from the IoT devices results in the increased latency,huge bandwidth and energy consumption.

Fog computing was introduced by Cisco as an extension of the cloud to the edge of the network[5][6].The Fog nodes consist of the routers,gateways,access-points,switches that can handle the data by providing the computation,networking and storage as a service nearer to the edge of the network.As compared to the cloud,network latency is reduced considerably.Not all data need to be sent to the cloud,as the data can be pre-processed on the Fog layer,thereby reducing the bandwidth requirement,latency and energy consumption.Since Fog supports the distributed approach,the mobility of the devices can be easily managed.Privacy concern is also addressed by performing the computation of the data at the Fog nodes within the network.Although the Fog has got many advantages over than cloud still Fog cannot maintain quality of service independently mainly due to its limited resources.

1.1 Related Surveys and Our Contribution

In IoT,the things are connected either directly or through the medium of the internet,[7–9].IoT makes it possible for us to monitor the physical world remotely and hence saves our time and money.Managing the data becomes difficult due to the rapid expansion in its growth[1–3],which leads to difficulties in processing,storing and securing the data.Cloud provides a solution to the problem by providing storage,infrastructure,platform as the service[10].In sim-pler terms cloud computing provides network access to the users to a “shared pool of the resources”which includes the storage,infrastructure,platform[11–13].Cloud provides the services whenever needed with the cost as per the usage[14].The cloud is hosted and maintained by the cloud service providers such as Microsoft Azure,Amazon web services,Google Cloud,IBM cloud[15,16].The pay per use,the abundance of resources and when required services provided by the cloud servers make them a strong candidate for offloading for computation of IoT data.

The cloud servers are located far away from the end devices which results in various limitations like latency,bandwidth,security and privacy and context awareness.A latency of even milliseconds matters in real-time applications like e-health,IIoT and so on.A latency of 250 μs to 10 ms and 50ms is required for autonomously working factories and smart vehicles[17].There occurs communication latency if the tasks are offloaded to the cloud by the IoT devices.As predicted by various research organizations[1–3],the data generated by the IoT devices will bloom near in the future.The data of one gigabyte per second will be generated by self-driving vehicles,it is expected that around 1000 petabytes of data is generated by U.S smart grid annually[18].Processing all data at the cloud will require huge bandwidth for sending and receiving to and from the cloud.The energy of the nodes is of prime importance when we are perceiving and actuating on the environment.Offloading the data to the cloud will consume energy in large quantity for processing at and cooling the servers[19].To use the services of the cloud,we need to get connected to the cloud first that is the internet is the necessity for the cloud.Sometimes due to technical issues or due to the unavailability of the internet service,cloud services are not available which leads to the unavailability of the services.Securing IoT systems involves both securing the devices themselves and securing the data both in transit as well as at the rest.Cloud servers though rich in resources require the internet for data transmission which brings the concern of security and privacy[20].

Fog is the layer between the end devices i.e IoT and the cloud data centers.Due to its ubiquitous nature and virtualization,it provides services nearer to the IoT network[21–23].The deployment of the Fog at the edge nodes results in awareness about the IoT devices(location),more support for mobility and latency minimization.The Fog nodes can directly process the data by themselves or will filter the data before sending to the cloud for processing[24,25].The Fog devices are heterogeneous in nature which in turn makes it difficult to design architecture and formulate resource allocation and task scheduling policies[26].Fog devices can be used at the time of internet outages because the Fog devices are located within the local network and don’t need an internet connection.With the introduction of Fog,data is secured by implementing security policies directly on the Fog servers without the intervention of the third party and hence the privacy is preserved.

Fog and edge have many similarities in their approach for providing services to the IoT devices but the edge is taken as a technology that performs at the edge of the network on behalf of both cloud and IoT[27,28].The idea is to perform the computation as much as closer to the end devices as possible,usually,one hop distant but can be multi-hop also.Edge is a layer between the cloud and the IoT and can perform preprocessing,filtering and aggregation of data.Edge computing can work both independently as well as with the cloud[29,30].Fog and edge have been used synonymously[30],but there is a clear difference between them.According to Cisco,edge computing is the concept whereas Fog computing is the standard that defines how the“edge computing should work”[31].Fog computing mainly focuses on the infrastructure side whereas edge computing tends more towards the things side[27].The main difference lies in where the computation of the data is done.In the case of edge computing,computation is performed at the network edges whereas in Fog,the computation can be extended to the core network as well that is“Fog works with the cloud”[32,30].

In addition to the Fog and the edge computing,Multi-access edge computing(MEC),formerly mobile edge computing is also used replaceable to provide cloud services within radio access network(RAN)in close proximity to the mobile subscribers[33].The main aim is to provide the cloud services at the edge of the mobile network so that the latency is reduced and to provide the location awareness[34,35].The MEC servers(owned by mobile operators[34])can be deployed at the base stations or at the radio network controllers and hence can be used to support mobility and acts as the key technology for the 5G.Eu-ropean Telecommunication Standard Institute(ETSI)is standardizing the MEC so that it can be integrated with the mobile networks and the reference architecture has been proposed but still in its infancy[36].MEC can be used for various applications of IoT including augmented reality,intelligent video acceleration,connected cars,face recognition etc[37,38].

The authors in[39]have discussed fog and related concepts thoroughly.They also presented the taxonomy and discusses the research topics and challenges in fog computing in detail.Mukherjee et al[40]have discussed the fog computing architectures.They have also discussed resource management and service allocation issues in detail.Naha et al[41]have survey the already proposed fog based architectures.They have also studied the various research challenges in fog which include resource allocation,scheduling,fault tolerance etc.Hu et al[42]have reviewed the hierarchical architecture of fog computing and compared it with that of cloud and edge.They have also discussed the key technologies and also presented the numerous use cases.In another survey[32]the authors have presented the taxonomy of fog computing.Mouradian et al[43]have surveyed the architectures and the algorithms of the fog.They have presented a comprehensive survey of fog computing and also discuss the challenges and future directions.

Unlike these,we have surveyed the fog computing architectures based on smart city applications.The contribution of this survey can be summarized as follows:

·Review of the numerous fog based application specific smart city architectures.

·Presents the various applications where fog computing can be helpful.

·identified and discussed the challenges in fog.

·Presented the use case of smart city.

1.2 Organization

The structure of the paper is shown in figure 1.This paper focus on IoT-Fog architectures proposed by many researchers with the main focus on delay minimization and resource management.The paper is organized is follows:section II discusses the various applications of fog computing,section III discusses IoTFog architectures and more specifically the application specific architectures,section IV includes challenges the Fog computing faces,section V gives use case and conclusion is given in section VI.

II.APPLICATIONS

Fog computing is a technology that is used in various delay sensitive applications.It can be also used for energy conservation,bandwidth conservation,managing mobility and so on.The various applications are listed below.

1.Health care:Health care demands the utmost importance.It also demands the accuracy and the reliability of the results in real-time because life is always at the stake[44].The health of the elderly patients can be improved by remotely monitoring from the homes or at the hospitals by deploying the healthcare based sensors along with the Fog nodes[45].Health related data of the patients is of utmost importance and very sensitive.The Fog can realize this goal by storing the data locally and hence does not need internet for the management of data.In[46,47]a Fog based framework was proposed for the detection and prevention of diseases spread by mosquitoes.The authors in[48]had used ensemble deep learning to automatically detect heart diseases and provide the healthFog as a service.In another work authors,[49]have used ECG for detecting heart diseases by deploying Fog nodes at the smart gateway level.The authors in[50]have presented various use cases(assisting emergency vehicles, disaster management)based on the Fog for smart health care.

2.Smart Transport System:The urban population of the world is expected to drastically increase by 68% by 2050[51]which will lead to the increasing demand for transportation services.The increase in traffic will result in various problems like traffic congestion,fuel wastage etc.By incorporating the recent advanced technologies like IoT,machine learning,data analytics etc[52]in the transportation system,the problems can be avoided to a large extent.The increasing parking spaces are not coping with the increasing growth of the vehicles[53,54].By employing the smart parking system,the drivers can be intimated in advance before entering the parking area and hence avoids inconvenience.Congestion can be avoided at intersections by installing smart Fog-based traffic light systems[55].Vehicular Fog computing[56],can be used in alerting other vehicles for taking other routes in case of traffic congestion that is smart traffic management,safety driving applications etc[57].

Figure 1.Paper organization.

3.Smart Grid:Smart grids provide automated,secure and cost effective electricity services by integrating the communication,sensing,monitoring and controlling technologies in the traditional grid[58,59].Smart meters provide information about the electricity consumption of the household which be used in making certain important decisions like unauthorized use,detection of the faults etc[60].Smart grid along with Fog computing helps in regulating the electricity in the homes through smart meters and by providing the homeowner with the information in real-time so that the appropriate decisions are taken[61].For regulating the electricity autonomously,artificial intelligence algorithms are employed in the smart grids[62].Fog computing can be used for the analysis of the smart grid data and hence lessens the load of the cloud servers[63].5G networking services can also be used along with Fog computing to further minimize the delay and to take real-time decisions[64].

4.Augmented Reality:The Augmented Reality applications produce massive quantities of data and therefore need enormous bandwidth for transmission.The video streams need to be processed within the least delay so that the user experience is not damaged.Fog computing can manage the augmented reality applications by providing cloud like services locally.

The recent products or the projects of the augmented reality applications presently in the market includes HoloLens,Google Glass and Sonny Smart Eyeglass[65].Karasinski et al[66]have used Microsoft HoloLense glasses along with the IoT network for the training of the astronauts and have proposed the prototype for the same.The prototype can be used with Fog computing to further enhance the quality of service.

5.Smart Agriculture:Smart agriculture is smartly doing agriculture by employing various information and communication technologies to increase production.By using the latest technologies like the IoT,Fog computing,cloud,sensor networks,artificial intelligence etc the cost,labor and the time required can be reduced to a large extent.Fog computing can be used in rural areas where there is no internet access and for smart farming applications that need enormous bandwidth and real-time computing[67].

6.Big Data Analytics:The data is generated in large volume,with large velocity and with multiple va-rieties by the IoT devices as predicted by various companies[1–3].The traditional cloud computing approach alone cannot fulfill the IoT requirements.Before sending data to the cloud,data is preprocessed at the Fog nodes and hence may avoid unnecessary consumption of bandwidth,energy and latency.

III.IOT-FOG ARCHITECTURES

In IoT-Fog architectures data is processed locally and hence the burden of the cloud is relieved to a larger extent.“Architecture is a framework which defines the whole system,its physical components,functions and configurations of components,the protocols and procedures of operation and the formats of the data used”[68].The architecture determines the efficiency of the system and how the system will behave under different conditions.Various architectures have been proposed for the various applications of the IoT.Open Fog reference architecture was proposed by the Open-Fog Consortium for Fog computing[69].It has been approved by the IEEE Standards Association as the official standard for Fog computing and named it IEEE 1934 in 2018[70].It is a technical framework that enables the data intensive applications of the IoT.The OpenFog reference architecture provides eight basic core principles on which the architecture is dependent,that includes security,scalability,openness,autonomy,programmability,RAS(reliability,availability and serviceability),agility and hierarchy principles or pillars[69].It helps the innovators to create the necessary components(hardware and software)for Fog computing.Besides,it also discusses the five different perspectives of the architecture that includes performance,security,manageability,data analytics and control and IT business and cross Fog architecture.Further,it also provides the software,system and node views of the Fog deployment scenario.

In general,the architectures of Fog computing mainly comprise of the end devices layer,middle Fog layer and the top cloud layer as shown in the figure 2:

End device layer:This layer mainly comprises the sensors and the actuators which sense and collects the information from the environment.It comprises of all those devices which are having sensing and communicating capability,for example,smartphones,tablets,sensors,smart meters and so on.Sometimes the computation of the data can be done in the end devices depending on the application but the end devices usually lag in battery,processing power,storage etc.So the data is usually offloaded to higher layers for the necessary computation.The main purpose of this layer is to sense and capture data.

Fog layer:The fog layer lies between the end devices and the cloud servers.It provides cloud like services nearer to the end devices and hence avoids transmission delays,unnecessary consumption of the bandwidth,battery consumption.The Fog layer is mainly used for the applications of the IoT that needs realtime analytics.The Fog nodes can be both static as well as mobile depending upon the application.The Fog layer internally comprises of multiple Fog devices which are connected either through wired or wireless medium depending upon the application.At the back end Fog layer is connected with the cloud layer for long term storage and for more complex and powerful processing purposes.The mode of communication between IoT and the Fog devices is wireless in nature and the Fog can communicate with the Cloud using both wired and wireless means of communication[71–73].

Cloud layer:The cloud servers in the cloud layer provide storage,platform,software,infrastructure as a service to the various IoT applications like smart city,smart home,smart vehicle and so on.This layer is at a far distance from the IoT devices and provides huge storage and powerful computation.Internally cloud layer consists of multiple servers which can be aggregately used to perform complex computations.The IoT device can offload the data to the cloud servers or the Fog servers depending upon the applications.The Fog also uses the services of the cloud for storage for longer duration and computation.

Fog computing is a highly virtualized and distributed paradigm,to support it various architectures have already been proposed, a two layered architecture comprising of Fog layer and Fog access point layer is proposed.The Fog access points have got higher computational capabilities than the Fog nodes[74].A hierarchical architecture is proposed which consists of IoT devices,Fog nodes and the cloud servers[3].Fog node’s internal layered architecture is proposed,which explains connectivity with the IoT devices,preprocessing,storage,security and how to get connected with the cloud.To fully utilize the benefits of both the cloud and the Fog,integrated architecture is proposed[75].Fog node manages the IoT devices and acts as a middleware to the cloud.The IoT nodes communicate with the Fog nodes through a wireless medium and the communication within the Fog nodes is wireless in nature.In another work,[76]the communication is explained between IoT,Fog and cloud by proposing the framework for big data and cybersecurity applications.The authors in[77]have considered distributed architecture for both Fog layer and the cloud.At the Fog layer software defined networks(SDN)is used to control the network using blockchain technology.Blockchain based distributed architecture is also proposed for the cloud layer.Architecture comprising of four subsystems is proposed,in which the front end acts as the interface to the users[19].The input is fed to the Fog devices through the local area network and through the WAN communications data is further transferred to the cloud subsystem.The authors in[78]depicts a four layer architecture for Fog computing which explains data processing and communication among the nodes.In another work,[79]the data collected from the end devices are firstly classified into categories and then send to Fog nodes for processing.Fog nodes are classified into different clusters and the Fog nodes can further offload the data to the cloud for further processing.Table 1 lists the proposed architectures.

Figure 2.Layered architecture of Fog computing.

Table 1.Architectures.

3.1 Application specific Architectures(Smart City)

Utilizing the benefits of Fog in smart cities will help in minimizing the delay and make the real-time applications work more efficiently.The main aim of the smart city is to make the life of the people easier by utilizing the benefits of information and communication technologies(ICT).This is achieved by automating the various aspects of the city like healthcare,transportation,home,electricity etc.Delay,energy efficiency,scalability,interoperability,heterogeneity,mobility and security needs to be considered while designing the architecture.The authors in[80]have proposed the multilevel Fog based architecture for smart cities.The goal is to connect the IoT devices with each other.It is comprised of two levels,the lower internet of everything level which comprises diverse devices and the Fog level which comprises many nodes,each node is holding multiple servers.Devices can communicate with each other directly or with the help of Fog nodes if unreachable.The main focus of the authors is to minimize the power consumption and decrease the latency.Communication among the heterogeneous IoT and fog nodes is made possible by both wired and wireless mediums.Mobility is supported for the IoT layer whereas not for the fog layer.Security perspective is avoided as they have not mentioned any security algorithm.

The authors in[81]have proposed layered architecture for smart cities.The architecture consists of four layers,the fourth and the lowest layer comprises of the sensory nodes which collect information from the environment.The third layer comprises the edge devices which collect information from the sensory nodes and forward it to the higher level nodes.It mainly performs two operations,first,it provides the processed results to the upper layers and second it reports the threats of the incoming data to the monitoring infrastructure.Layer two comprises of the Fog nodes.This layer along with layer three analyses the data and control the hazardous events by controlling the infrastructure.The last layer is the cloud layer which takes central control of the whole infrastructure.Complex computations of detection and prediction and large scale computations can be performed at the cloud layer.The authors have discussed the prototype of the pipeline monitoring system.Interoperability,heterogeneity and mobility are not taken into consideration while designing the system.The authors also have not considered memory access time while computing the response time.

Rainbow architecture is used by the authors for the smart city applications[82].The main aim of the rainbow architecture is to bring the computation closer to the end devices.A rainbow is a three layered architecture.The bottom layer comprises sensors and actuators.The middle layer comprises virtual objects which represent the physical layer devices.Virtual objects make the physical devices accessible to the agents by eliminating the problem of heterogeneity.The middle layer provides the services to the tasks which need real-time access to the physical devices.The virtual objects are contained by the gateway containers.Scalability is also taken care of by reconfiguring the system and adding or deleting the virtual objects.The top layer is the cloud layer which is for complex computations or historical data storage.The authors have used the architecture for the three applications of smart cities including noise pollution mapping,urban drainage networks and smart streets.The authors have not considered the security perspective.

To get the full insight of the different components of the smart city,a multi-layered architecture comprising of infrastructure,data processing and storage,service,interface and security layer is proposed[83].The authors have proposed theoretical architecture with no discussion of mobility,heterogeneity,scalability and energy conservation.

A three layered architecture for the smart home based on the Fog computing is proposed[84].It is the three layered architecture comprising of fog,cloud and the client layer.To ensure the privacy,private Fog nodes can be directly added to the system by the service users.Ensuring the security results in the problem of more delays for authentication of the nodes.To manage the scalability issue,new fog nodes can be dynamically added to the system.The heterogeneity,mobility and energy conservation is not taken into consideration.

We have categorized the smart city architectures based on their applications.The architectures are thoroughly discussed with their limitations.Fog based papers are chosen and evaluated based on the parameters including latency,energy consumption,mobility,scalability,heterogeneity and security.The general smart city architecture is shown in fig 3.It comprises of fog nodes,cloud servers and the various smart city applications including healthcare,smart grid,smart transportation etc.The data generated by the smart city applications are either processed at the fog nodes or at the cloud servers depending upon the requirement.Real-time or delay sensitive data can be processed at the fog nodes whereas the cloud can be used to perform complex computations and storing the data for a long time.The smart city applications usually communicate with the fog nodes through wireless means of communication which may include WiFi,WiMAX,radio tower and bluetooth.To handle the load and provide mobility support,the fog nodes can in turn communicate with each other through wireless means.For handling the increased load fog nodes can offload data to other fog nodes or can perform parallel processing.Mobility is achieved by migrating the data to that fog node to which the IoT device is connected with.Through the medium of the internet,fog nodes communicate with the cloud servers.The huge capability of the cloud servers is used to perform huge and complex calculations and also provides support for scalability.

3.1.1 Healthcare

Health care demands high availability,reliability,low latency and high response time. Life is always at stake,delay of even microseconds matters.During medical emergencies like heart attack,strokes,asthma attack etc,real-time monitoring application of the IoT can save lives by sending the necessary medical data to the healthcare professional.The main aim is to detect the patient’s health and medical emergencies as fast as possible so as to take effective countermeasures.Cloud based systems add more delays[85]and lack in availability and reliability which poses a serious concern to real-time remote monitoring.On another hand,Fog avoids these problems by providing the computations at the edge of the network.

To support the requirements of Healthcare various architectures have been proposed.Hierarchical architecture for IoT systems relying on the Fog and the cloud is proposed[86].Data analytics is performed at a centralized cloud and the distributed Fog nodes.For implementing the machine learning algorithms training is performed at the cloud nodes and the obtained hypothesis is implemented at the Fog nodes and is periodically updated.The authors have presented the case study on Arrhythmia detection in ECG monitoring.Architecture is discussed thoroughly using the case study.Three layers are present in the architecture in which the sensor layer collects the data from the patients.Monitor,a computing component that acts as a bridge between the sensor and the upper layers or units.The data is fed to the machine learning algorithms at the analyze component at the cloud layer which in turn generated the hypothesis.The Hypothesis is transferred to the plan component at the Fog layer so as take the decisions locally.Security,mobility,energy efficiency and scalability are not taken into consideration while designing the architecture.

Figure 3.Smart city architecture.

Sensing devices are usually battery powered,the energy needs to be conserved both at the sensing level as well as at the computation level.The authors in[87]have proposed the Fog based architecture for healthcare considering energy efficiency.The architecture over the Gigabit passive optical networks consists of four layers.The first layer is of IoT devices whose function is to collect and send the data from the patients to the network.Access layer collects data from the IoT layer using Long-Term Evolution for Machines base stations.Base stations are connected to Optical Network Terminal(ONT)which in turn is connected with the Optical Line Terminal(OLT).Fog computing resources are placed at the ONT AND OLT which in turn will reduce the energy consumption as it is closer to the IoT devices.The Metro layer collects and forwards data between the Fog servers in the access layer.The fourth layer is the Cloud layer which is used to store permanently the analyzed data.To support the resilience a primary and backup server is used to serve the applications.The authors have not consid-ered mobility,heterogeneity,scalability and security in their architecture.

Remote monitoring of the patients mostly elderly patients and the patients who live alone has become an important aspect of healthcare.The patients need to be monitored for irregularities in their behavior and other vitals and diseases.For this purpose authors in[88]have proposed a distributed architecture consisting of three layers.Data from the patients is collected through the wireless sensor networks and is send to the cloud for computation via the gateway(Fog node).The gateway act as a backup when the cloud services are not available and hence offers the data as service to the doctors and the patients respectively.The authors have experimented with a use case of bedridden patients at home.The performance is evaluated in terms of latency and CPU utilization.Security,mobility,scalability,heterogeneity and energy conservation are not discussed.

To autonomously detect heart diseases,a Fog based architecture called HealthFog is proposed[48].The hardware components include Body Sensor Network,Gateway and FogBus Modules.The gateway collects data from the sensors and forwards the data to the Fog-Bus module wherein nodes use deep learning models to process the data.Data is offloaded to the Cloud data centers during overloading of the Fog servers or when the latency is not the requirement.The software components include the data filtering and processing,resource manager,deep learning module and ensembling module.For the experimentation purpose dataset of heart patients are used and performance is evaluated considering prediction accuracy,latency,jitter,execution time,bandwidth usage and power consumption.Heterogeneity,mobility and scalability are not discussed in the proposed architecture.

Heart attack is also caused by an increase in blood sugar which may lead to a fall.It can be prevented by regulating the insulin level in real-time.For this purpose,a system based on the Fog is proposed[89].The architecture comprises the sensor layer,Fog layer and Cloud layer.The data can be sent from the sensor via several wireless protocols(Wi-Fi,Bluetooth Low Energy,nRF,IPV6 over Low-Power Wireless Personal Area Network)depending upon the application.Data is encrypted before sending to the Fog for processing.The Fog nodes or the smart gateway can be fixed or mobile.Data compression is also performed at the Fog nodes to save the bandwidth.Cloud provides the scalability,storage,security and processing of complex calculations.Push messages are used by both Fog and the Cloud servers to send the notifications in real-time.The authors have mainly focussed on power conservation.The drawback is authors have not considered the mobility of the nodes which directly impacts the power and delay.Another disease listed by the authors in[46]is Chikungunya(a virus).The authors have proposed the three layered architecture for detecting the said diseases.The data accumulation layer collects data from the users and sends it to the Fog nodes for processing.The fog nodes in turn sends alerts to the mobile phones of the users if diseases are detected.The medical records and the results are saved at the Cloud servers.The Cloud alerts the uninfected people regarding the virus.No security perspective is discussed,energy conservation of the nodes is also not taken into consideration.

Healthcare has got utmost importance throughout the world.Making healthcare autonomous with the help of IoT,Fog and cloud also add some concerns to it.The security,latency,energy conservation,mobility of the patients,scalability and interoperability are some of the problems that need to be addressed.The architecture which addresses all these problems aggregately needs to be developed so that the efficiency of IoT based healthcare is enhanced.

3.1.2 Smart Grid

Energy consumption is growing at a very rapid rate globally,the girds needs to be more smart in the distribution of electricity.A smart grid is an electric grid that uses communication,computational intelligence and information to make the electric system autonomous from the generation to the consumption of the electricity[90].Smart grids along with smart meters monitors and manages the electricity both at the grid level as well as the consumer household level in the real-time.Smart meters provides the information about the electricity consumption of the household which can be used in making certain important decisions like unauthorized use,detection of the faults etc[60].

The authors in[91]have proposed the multi-tier architecture for data analytics in smart meters.Cloud provides the long term storage and analysis,Fog pro-cess the real-time data.Results are evaluated for prediction of energy,quality of electricity provided and the unauthorized use of the electricity.The architecture lags in many aspects.Security aspect of the data is not discussed,heterogeneity of the devices is not discussed,energy consumption in data analytics is also not mentioned.The authors mainly focusses on the real-time data analytics of the smart meters.

Electricity is supplied to the homes by the various companies in the distributed manner[92].To regulate the energy consumption in homes a Fog based architecture is proposed[61].The architecture comprises of three layers.First layer comprises of home gateways which gathers the information regarding the energy utilized and provides the interface for the customers to interact with the smart grid.Fog nodes comprises the second layer whose work is to provide the necessary services with the minimum delay or latency.Fog nodes acts as the retail energy market servers and also preserves the security and privacy of the clients.Cloud nodes or servers comprises the third layer which are used for storage and processing of data that needs huge processing power.The main aim of the architecture is to provide the customer with the information so that he could take necessary intelligent decision whether to buy power from the power grid or from the neighbourhood at the peak times.

In another work[62]a three layered hierarchical architecture for management of the energy is proposed.Artificial intelligence is incorporated into the Fog nodes by neural networks so that the electricity consumption behaviour of the customers is automatically analysed and provides the collected information to the service providers.Based on the information provided,decision regarding the energy management is taken at the cloud servers using artificial intelligence algorithms.The authors have not considered mobility,heterogeneity,scalability and security into consideration while designing the architecture.

In another work[93],the authors have presented three layered architecture for smart grid.The main aim of the paper is to offer the services of location awareness, intelligent control and delay sensitive monitoring.Fog layer is sub divided into Fog node and Fog node coordinator sub-layer.Fog node coordinator hold the responsibility of coordinating all other Fog nodes and hence provides the support for mobility.Cloud is used for analysis of historical data.How to handle the increase in demand,heterogeneity of the devices in terms of hardware and interface and security of data is lagging in the architecture.

The data of the smart grids and smart meters installed at the household side is sensitive in nature,it needs to be secured both during the transit as well as at the rest that is at the servers.The architectures lacks the mobility perspective that is the nodes which are mobile e.g electric cars,electric trains.More work needs to be done with respect to the management of electricity during the floods,storms,snow etc.

3.1.3 Smart Transportation

The available parking spaces are not coping with the increasing use of the vehicles for travel which leads to various inconveniences like unnecessary consumption of money and time[53,54].In today’s world of information and technology,this problem is solved to a larger extent by employing a smart parking system.Drivers can be informed before entering the parking area and hence can avoid inconvenience.Fog computing is used to improve the quality of service in the case of smart parking and enhancing the efficiency of the system[94,53].Data(photos of parking spaces)is processed at the Fog nodes and information regarding the parking spaces availability is displayed on the LED boards.Different parking spaces can interact with each other and can share information about the parking slots.Fog computing can be further used in the case of the internet of vehicles to support real-time applications and to reduce the bandwidth consumption in near future[57].It will help in avoiding traffic congestion,safe driving and entertainment.Controlling the traffic at the road intersections by traffic signals plays an important role in avoiding the traffic mess to a large extent.To control the traffic in real-time,data needs to be processed closer to the devices.For this purpose Fog computing based architecture is proposed[55].Detailed three layered architecture is proposed where the cloud controls regional traffic and the Fog provides real-time traffic and the cyber physical layer collects the data and forwards it to the upper layers.

By having an efficient transportation system,the life of the people will become easier.By making transportation smart with smart parking,smart vehicles and smart traffic light systems life,money and time of the people can be saved.The architectures generally lack security features which can lead to catastrophic losses including the loss of lives.Energy conservation of the nodes,both IoT and Fog nodes needs to be taken into consideration so that the life of the system is enhanced.Latency can be further minimized in real-time applications like traffic light etc.

3.1.4 Energy Conservation

To power the cloud servers a huge amount of energy is required which indirectly adds the burden to the customers[19].Likewise,energy is also dissipated at the Fog servers and at IoT devices.The battery of the IoT devices as such is of limited capacity so the battery needs to be utilized optimally to increase the lifetime of the system.Energy is also consumed in offloading data to the cloud[95],Fog computing although minimizes the energy consumption by providing the cloud services locally but still Fog computing consumes energy which needs to be minimized so that the system efficiency increases[96].Energy is spent in locating and communicating with the IoT nodes.A Fog based distributed architecture is proposed for the discovery of the nodes with the minimum consumption of the battery[97].The battery is saved by not continuously keeping the devices on for communication.Fog nodes are used to alert the devices to switch on and begin the communication process.

3.1.5 Banking Sector

Fog computing can also be used for banking sectors[98].Recommendations for the loans,policies etc can be made intelligently using the Fog based architecture.It helps in improving the quality of the service provided to the customers and also helps the bank officials.They have not discussed how the system will behave with the increase in the load.The architecture lags in certain parameters including security,mobility and heterogeneity.

3.1.6 Real-time Application specific Architectures

real-time applications of the IoT demand the least possible latency which will depend on many factors including the architecture of the system.A container based hierarchical architecture is proposed[99].Multiple layers in the Fog node and the cloud is considered for accessing the service,controlling the infrastructure and creating the containers.The network and the service access control is used to authenticate the end users and manage the services provided to them by the Fog nodes.To manage the requests at the Fog nodes,the priority queue is used and the two service models are proposed based on the delay for the real-time data.The data is generated in huge volume by IoT devices that need to be processed continuously(augmented reality)without waiting for the batch processing,that is data needs to be processed in streams so that the efficiency of the system is increased.For this purpose,architecture is proposed for data streaming at cloud and Fog[100].The main aim is to minimize the delay and enhance the throughput.The improved version of oneM2M(machine to machine)architecture based on the Fog is proposed to meet the constraints of latency and response time for the real-time applications of the IoT[101].The data is processed in a distributed manner among many Fog nodes whose delay is much lower than the transmission delay to the cloud.In another work,SDN and Fog based architecture for IoT is proposed[102].To further decrease the load to the cloud,data is shared between the Fog nodes horizontally using information centric networking[103].Rather than fully relying on the cloud for the services,the Fog nodes can locally provide the services and hence can reduce the latency to a large extent.

Table 2 summarizes the application oriented architectures based on different criteria.Although numerous application specific architectures for a smart city are proposed but they lack in some or another parameters.Architectures considering all the parameters aggregately need to be developed to make the system more realistic and efficient.

IV.CHALLENGES

Although fog computing performs better than the cloud in terms of service time,bandwidth utilization,security and privacy,support for mobility and scalability but it lacks in certain parameters.As the fog nodes are resource constrained as compared to the cloud,so to perform complex computations and handle the big data,it relies on the cloud.The various challenges fog computing faces are as follows:

1.Resource management as a challenge:Resource management is critical for the performance of the applications.To meet the expectations of the users and increase the performance offloading,resource allocation and load balancing like policies are used.As the resource management policies are NP-hard they still can be optimized and refined to get the optimal solution.The resources thus need to be allocated in an optimal manner which is an important research challenge in Fog computing.

Table 2.Application specific architectures in smart city.

(a)Resource allocation as a challenge:Resource allocation is resource management so as to increase the overall system efficiency.There must be fairness in the allocation of the resources that will depend upon the type of algorithm used.A better resource allocation policy will help in mitigating the energy usage,processing delay and improve the service quality and the user experience.The heterogeneity of the devices,changing network topology,diverse application requirement makes it difficult to formulate the multi parameter based resource allocation policy.The proposed policies(listed in table 3)have mainly considered delay and energy while designing the policy.A resource allocation policy considering multiple parameters like delay,energy,cost,bandwidth,throughput,reliability is yet to be modeled and deployed.

(b)Load balancing as a challenge:Load balancing is the efficient distribution of the tasks between the servers.When servers are overloaded,the load can be transferred to the free servers or the servers with less load so that resources are utilized efficiently.The main objective of load balancing is to share the load equally among the servers to improve responsiveness.Various static and dynamic load balancing policies are proposed as shown in table 4.Implementing dynamic algorithms is difficult but at the same time,they efficiently balance the load.By designing good load balancing policies energy consumption,carbon emission and delay can be reduced to a larger extent and also support for scalability and flexibility can be provided.

(c)Offloading as a challenge:offloading is the mechanism in which the processes or the modules of the system are relocated from the resource constrained devices to resource rich devices[104].Several offloading policies have been proposed which mainly considers delay and energy see table 5.Along with the delay and energy cost,bandwidth,reliability and throughput need to be considered as they effects each other.The dynamic nature of the Fog nodes,dynamic network topology,heterogeneity among the devices also makes the offloading a challenge.

2.Energy Consumption:Energy is consumed in large volume by the data centers for running and cooling the servers,IoT devices for sensing,actuating and communicating and the Fog servers[19].Energy consumption at cloud or Fog data centers will indirectly add the burden to their customers.The IoT devices as such are battery powered which is limited in capacity.To meet the increasing demand of the applications,the battery needs to be conserved optimally.Battery consumption is also directly influenced by the resource management policies like offloading the data to the cloud[95].Fog nodes also consume the energy in communicating and locating the IoT devices,Fog devices,and the Cloud servers.The policy needs to be framed which will consider the energy conservation at all three levels i.e IoT,Fog,Cloud considering the factors of resource management,security and privacy,heterogeneity,scalability,latency and mobility.

3.Heterogeneity:The Fog devices include high-end servers,routers,gateways,base stations etc adds the challenge of heterogeneity in the system in terms of hardware, software and the network technologies(“Wi-Fi,LTE,Bluetooth,3G/4G,Lo-RaWan,SigFox”[105])[42,106,107].Fog nodes can be both actual hardware nodes as well as virtual nodes.So the Fog devices need to be interoperable with each other to provide quality service.Containers are the methods used to hide the heterogeneity of the Fog nodes by abstracting the underlying hardware and the software technologies[99].Also network function virtualization(NFV)along with the SDN and the Network operating systems can be used for solving the heterogeneity issues in the IoT-Fog environment[108].Managing the semi or unstructured data due to the heterogeneity in hardware,software and communication technologies becomes an important issue to address.

4.Mobility:The end devices and the Fog nodes can join or leave to or from the Fog layer due to their dynamic nature.Predicting the network topology becomes a challenging task.How to offload the data when the location of the device changes frequently is a tedious task.Besides heterogeneity of the Fog nodes makes further resource management a challenge.efficiently allocating resources for mobile users is a challenge.User’s and device’s mobility patterns are the important aspects to provide proper service when offloading occurs.Dealing with a large set of mobile users with diverse applications and requirements is a highly dynamic scenario,which makes resource management a challenging task.The mobility of IoT devices adds an extra burden to maintain the quality of service and quality of experience to different IoT applications.It also leads to unnecessary energy waste and transmission delays.For battery powered IoT applications,to maintain the quality of service mobility aware network lifetime maximization policy is proposed[109].Considering the mobility and quality of service,the solution is proposed in two stages.Mixed integer linear programming technique is used to formulate an optimal mobility aware task scheduling algorithm at the offline stage considering the constraints of“before deadline mandatory parts should be completed,QoS is maintained and energy consumption should not exceed the available energy”.For saving energy,redundant execution of the tasks due to mobility is avoided.To retain the QoS constraint,they suggest a cost-effective high-performance QoS adaptive online scheme.When Gateway does not track a change in QoS at runtime,the task scheduling policy generated at the offline stage is adopted without any modification,otherwise,the heuristic approach is used to adjust rapidly to the fluctuating QoS requirement.The results show that the network life increases by 169.52%.To provide mobility support to the moving vehicles a vehicular cloud radio access network(vCRAN)is proposed based on software defined networks(SDN)and mobile edge computing(MEC)[110].SDN is used to route the traffic dynamically for high mobility vehicles.Cloud infrastructure is used for coordination and information sharing between the MEC servers.Virtual base stations(VBs)has the functionality of selecting the optimal remote road heads(RRHs)along the driving route of the vehicles.Inter-RRH and inter-MEC mobility service is proposed.In the former case,before the connected RRH is disconnected,MEC servers assign another RRH to support the moving vehicles.In the latter case,VBs are relocated to support mobility.The snapshot of the currently connected VBS is transferred to another MEC,creates the instance of the copied VBS.The previous VBS is suspended only when the newly created one starts supporting the vehicles.

5.Decision Making:In the IoT-Fog setting,it is a challenging task to determine where to process the data,either in the IoT nodes or at the Fog nodes or directly in the cloud.The decision regarding where to take that decision is also the biggest challenge because if the decision is taken at the IoT devices,they are resource constraints that would lead to inefficiencies in the system.If the decision is taken at the Fog nodes,it will result in latency and energy consumption issues.Machine learning algorithms can be used for determining where to process the data but at the same time applying machine learning algorithms adds an extra burden to the IoT and the Fog devices.To determine the location of the deployment of the machine learning algorithm is a tedious and challenging task.

6.Placement of Fog nodes:The performance of the system also depends on the placement of the nodes.The Fog nodes should be positioned at the appropriate locations so they can offer their service to the full level.Right placement may also help in managing the mobility of the nodes.

7.Security and Privacy:The heterogeneity among the IoT and the Fog devices makes it difficult to implement security and privacy policies.Authentication cannot be the sole criteria in determining the node’s credibility because sometimes the actual node may malfunction or maybe under malicious attack.Complex encryption and security policies make it difficult for the devices to share data and may result in the deterioration of the system’s performance in terms of battery consumption,computation power etc.The data in the transit(between IoT and the Fog nodes and among the Fog nodes)needs to be secured.Kumar et al[111]have used the emoticon technique to secure the data.Vishwanath et al[112]have used AES 128 bit encryption algorithm for securing the data.Moreover,the Fog nodes are owned by the different providers,the intruder can enter into the Fog network from the poorly secured Fog or edge nodes and can exploit the sensitive data of the various Fog based applications(smart healthcare,smart grid,smart transportation etc).Securing the distributed Fog nodes and preserving their privacy is still a challenging task.

V.CASE STUDY

The smart city consists of hundreds or thousands of sensors.The main purpose of the smart city is to make the life of the people easier by managing things smartly and in real-time using information and communication technologies(ICT).Sensors can be categorized into different sets depending upon the applications.The applications may include the smart home,smart healthcare,smart transportation,smart grids etc.Each application of a smart city may consist of thousands of sensors,hence a huge amount of data has been generated that needs to be managed.Data can be managed at both the Fog as well as at the Cloud layer.For resource management,we are considering the resource management architecture as presented in the fig 4.The IoT devices do not perform the computation of their own because of their limited capabilities in terms of computation and storage.Their only function is to sense the environment and send the data to the upper layer for further processing.Fog devices are located in the vicinity of the end devices at the network edges.Their main purpose is to collect the data from the sensor layer and do filtering and computation of the data.The Fog layer is subdivided into two sub-layers(a)Fog Node Layer(b)Fog Gateway layer.The Fog node layer comprises multiple Fog nodes.The Fog nodes in turn comprised of Fog devices that are connected either through wired or wireless means.Communication between the Fog nodes is made possible with the help of Fog Gateways.The main function of this layer is the collection of data from the sensor layer and the computation of the data.Fog gateways are the nodes that are responsible for the intercommunication between the Fog nodes as well between the Fog layer and the Cloud layer.The resource management among the Fog nodes is also controlled by the Fog gateways.They can also be used for identifying the trusted Fog nodes by employing the security policy and hence prevents the malicious nodes from entering the system.The gateways are distributed along the geographical area they can handle the concern of mobility by providing the Fog coverage to the mobile Fog nodes.The decision regarding where to process the data either atthe Fog nodes or at the cloud is also taken at the gateways.The Cloud layer is responsible for the storage of the data for a long time and also to perform complex computations.During peak hours when the Fog nodes are overloaded,gateways can use the services of the cloud.The Cloud layer is also responsible for verifying the authenticity of the Fog gateways.

Table 3.Resource allocation.

Table 4.Load balancing.

Each application transmits data to its particular Fog node.Before transmitting data,the sensors firstly subscribe to the Fog nodes.The Fog nodes after authenticating the sensors collect the data from the sensors.The Fog nodes in turn are authenticated by the Fog Gateways which in turn are authenticated by the Cloud.This authentication mechanism no doubt adds an extra burden of latency to the system but this latency can be reduced to a larger extent by following the periodic authentication but not continuous.Within the Fog node,data is processed based on the resource management policy governed by the Fog gateway.Fog gateways ensure the mobility of the nodes by having the interconnection among each other.When a device moves away from its Fog node coverage area,connection to its original Fog node can be made through another Fog node via Gateway.The system can be made scalable by using the unused resources of the Fog nodes together.Machine learning algorithms can be used at the gateway level to monitor the resources efficiently and make predictions to make the system autonomous.Applications of a smart city can use the services of the cloud for the long term storage and the historical analysis of the data.

Suppose there are‘n’set of applications and ‘m’set of Fog nodes.Each IoT node is connected to the Fog node based on the smallest distance between them.Total Service delay“SD”in the system will be calculated as:

Table 5.Offloading.

Transmission delay in sending data from the IoT nodes to the Fog nodes,Tif.

Service delay at the Fog layer,Ssdf.

Which comprises the waiting time,processing time and offloading overhead delay. Waiting time at the Fog nodes is the waiting time of the task in the queue which can be modeled using the queueing system.Offloading delay will depend upon the mode of communication among the devices of the Fog node and between the Fog node and the Gateway plus the time it will take for the Gateway to take the offloading decision.To make the system autonomous,the Machine learning algorithms can be employed at the Fog Gateway level.Resource management policies can be formed by considering the energy,latency,bandwidth,cost,memory into consideration.This multi-valued optimization problem can be solved to enhance the overall efficiency and availability of the system.

Transmission delay in sending the data from the Fog nodes to the Cloud,Tfc.

Service delay at the Cloud,Ssdc.

Communication delay between the Fog Gateways,Cd.

Therefore total service delay is computed using Eq.(1)

The total service delay should be as minimum as possible to serve the real-time applications of the smart city more efficiently.

We are considering two types of tasks.One which needs a response in real-time(delay sensitive)and the other that can tolerate the delay(delay tolerant).The tasks arrive at the Fog nodes according to Poisson process.M/M/1 queueing system with first in first out is considered.The real-time task has got higher priority and it can pre-empt the other tasks which in turn are fed back to the system.Total service delay for each Fog device can be calculated as given in the Eq.(2).

D1and D2,are the average service delay of the delay sensitive and the delay tolerant tasks.

μ is the service rate

λ1 and λ2 are the arrival rates of the two types of tasks respectively.

and

The Fog device with the minimum service delay can be used to process the incoming tasks.The performance of the Fog layer can be compared with that of the Cloud under the parameters of increased traffic,energy,cost and delay.

VI.CONCLUSION

IoT connects the physical world and provides services to the users in many applications.Different applications have different requirements.Some applications are delay sensitive,some are energy sensitive,some are cost sensitive etc.Tasks can be processed by IoT devices themselves but due to their small size and limited battery,the processing power is limited and we cannot apply complex policies(security,resource allocation and so on).So either cloud,Fog or edge are outsourced for the computation of the tasks.The decision regarding where to processes the data is of the primary importance in IoT as it will have a direct impact on resource allocation,offloading and security policies.The resources can be managed efficiently by employing various policies including resource allocation,load balancing,offloading etc.The resource management policies need to be further optimized to further enhance the quality of the service provided and also the user experience.Mobility of the devices directly affects the network topology,resource management,security etc.Heterogeneity adds the concern of interoperability among the devices.

Various architectures have been proposed to be used for computing in IoT-Fog environment but they are application specific and can-not be generalized.We have to involve different resource allocation,offloading,load balancing mechanisms in a resource constrained IoT environment.Proper implementation of the mobility policies at the Fog and the edge layer can help in efficient utilization of resources but we have to compromise on certain aspects such as delay.The paper presents different architectures on the attributes of scalability,heterogeneity,mobility,latency,energy conservation and security.Broadly we can classify the architectures in two categories delay sensitive and delay tolerant.Therefore it depends on the parameters and applications of the IoT-Fog,which type of architecture can be implemented or designed.