13
JOURNAL OF L A T E X CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 1 FogNetSim++: A Toolkit for Modeling and Simulation of Distributed Fog Environment Tariq Qayyum 1 ,Asad Waqar Malik 1 , Muazzam A. Khan 1 , Osman Khalid 2 , and Samee U. Khan 3 1 National University of Sciences and Technology, Islamabad 2 COMSATS University Islamabad 3 North Dakota State University, Fargo, ND, USA Abstract—Fog computing is a technology that brings com- puting and storage resources near to the end user. Being in its infancy, fog computing lacks standardization in terms of architectures and simulation platforms. There are a number of fog simulators available today, among which a few are open- source, whereas rest are commercially available. The existing fog simulators mainly focus on a number of devices that can be simu- lated. Generally, the existing simulators are more inclined toward sensors’ configurations, where sensors generate raw data and fog nodes are used to intelligently process the data before sending to back-end cloud or other nodes. Therefore, these simulators lack network properties and assume reliable and error-free delivery on every service request. Moreover, no simulator allows researchers to incorporate their own fog nodes management algorithms, such as scheduling. In existing work, device handover is also not supported. In this paper, we propose a new fog simulator called FogNetSim++ that provides users with detailed configuration options to simulate a large fog network. It enables researchers to incorporate customized mobility models, fog node scheduling algorithms, and manage handover mechanisms. In our evaluation setup, a traffic management system is evaluated to demonstrate the scalability and effectiveness of proposed simulator in terms of CPU, and memory usage. We have also benchmarked the network parameters such as execution delay, packet error rate, handovers, and latency. Index Terms—Cloud, Fog, Edge network, IoT, Mobility Mod- els, OMNeT++ I. I NTRODUCTION O VER the years, there is a tremendous paradigm shift in Information and Communication Technology from isolated and limited computing environments to pervasive computing. The advancement in telecommunication and manu- facturing industry resulted in development of powerful smart- devices that can ubiquitously join available network at any time. Recent years have seen the evolution of 5G as a future technology. The inclusion of 5G technology not only supports the heterogeneous wireless network connectivity but also provides a wide spectrum to different applications that can take benefit from 5G to improve their performance in terms of e.g., latency, response time, and energy consumption. With advancement in technology, the devices can become a part of a grid and generate significant amount of data that is typically sent to cloud for processing. According to Gartner 1 Corresponding Author: Asad Waqar Malik, e-mail: [email protected] Manuscript received Dec 15, 2017; revised –. 1 https://www.gartner.com/newsroom/id/3598917 (2017) report, around 8.4 billion devices will be connected to the Internet by the end of 2017. The raw data generated through various sensors require intelligent processing to reduce the bandwidth usage and improve the latency. Therefore, the need to bring resources close to the end user is rising. Fog is one of the emerging edge computing paradigms. The term fog was first introduced by Cisco [1]. As compared to cloud data centers, fog provides a virtualized computing environment deployed closer to the end user [2]. The fog resides between cloud and end-user devices. The cloud and fog provide similar services to end users but the fog is deployed to facilitate specific geographic region. Fog cannot exist standalone rather it augments the cloud computing. It is designed to support delay-sensitive applications, Whereas cloud being far away from the user can exhibit higher latency. The fog provides services to IoT applications from the edge network as well as from the devices such as routers, access points, Road Side Units (RSUs) and other user devices. With the deployment of fog nodes, the reliability, fault tolerance, and scalability of the devices can easily be managed. Thus, it also reduces the bandwidth usage between fog node and backend cloud data centers. The fog is an emerging paradigm but there are several challenges it faces, such as heterogeneous device management, fog nodes architecture, security, device mobility, and privacy. Moreover, interoperability among heterogeneous devices is also a challenging task. Data coming from different devices need to be analyzed and forwarded to other devices for timely decision making. The typical fog paradigm con- sists of limited fog nodes that provide virtualized computing services. Therefore, to efficiently manage resources requires sophisticated scheduling algorithms. Fig 1 depicts a general scenario where the efficiency is achieved by implementing the fog layer in between the local network and cloud. Similarly, like a cloud, proper management of resources usage and billing is the mandatory requirement of fog paradigm. Fog provides a flexible environment to end devices, but is difficult to manage due to its decentralized paradigm. The fog nodes can be deployed at any place between the device and cloud infrastructure. As fog is designed to support latency-sensitive application, Smart Gateways (SG) are the best location to offer fog computing [3]. Fog computing is based on expensive devices and network equipment. It is important to perform pre-deployment testing of fog platform using simulation tools. However, no such standard simulation tool/framework is available at the moment

JOURNAL OF LA FogNetSim++: A Toolkit for Modeling and

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 1

FogNetSim++: A Toolkit for Modeling andSimulation of Distributed Fog Environment

Tariq Qayyum1,Asad Waqar Malik1, Muazzam A. Khan1, Osman Khalid2, and Samee U. Khan31National University of Sciences and Technology, Islamabad

2COMSATS University Islamabad3North Dakota State University, Fargo, ND, USA

Abstract—Fog computing is a technology that brings com-puting and storage resources near to the end user. Being inits infancy, fog computing lacks standardization in terms ofarchitectures and simulation platforms. There are a number offog simulators available today, among which a few are open-source, whereas rest are commercially available. The existing fogsimulators mainly focus on a number of devices that can be simu-lated. Generally, the existing simulators are more inclined towardsensors’ configurations, where sensors generate raw data and fognodes are used to intelligently process the data before sending toback-end cloud or other nodes. Therefore, these simulators lacknetwork properties and assume reliable and error-free delivery onevery service request. Moreover, no simulator allows researchersto incorporate their own fog nodes management algorithms, suchas scheduling. In existing work, device handover is also notsupported. In this paper, we propose a new fog simulator calledFogNetSim++ that provides users with detailed configurationoptions to simulate a large fog network. It enables researchersto incorporate customized mobility models, fog node schedulingalgorithms, and manage handover mechanisms. In our evaluationsetup, a traffic management system is evaluated to demonstratethe scalability and effectiveness of proposed simulator in termsof CPU, and memory usage. We have also benchmarked thenetwork parameters such as execution delay, packet error rate,handovers, and latency.

Index Terms—Cloud, Fog, Edge network, IoT, Mobility Mod-els, OMNeT++

I. INTRODUCTION

OVER the years, there is a tremendous paradigm shiftin Information and Communication Technology from

isolated and limited computing environments to pervasivecomputing. The advancement in telecommunication and manu-facturing industry resulted in development of powerful smart-devices that can ubiquitously join available network at anytime. Recent years have seen the evolution of 5G as afuture technology. The inclusion of 5G technology not onlysupports the heterogeneous wireless network connectivity butalso provides a wide spectrum to different applications thatcan take benefit from 5G to improve their performance interms of e.g., latency, response time, and energy consumption.With advancement in technology, the devices can become apart of a grid and generate significant amount of data that istypically sent to cloud for processing. According to Gartner1

Corresponding Author: Asad Waqar Malik, e-mail:[email protected]

Manuscript received Dec 15, 2017; revised –.1https://www.gartner.com/newsroom/id/3598917

(2017) report, around 8.4 billion devices will be connectedto the Internet by the end of 2017. The raw data generatedthrough various sensors require intelligent processing to reducethe bandwidth usage and improve the latency. Therefore, theneed to bring resources close to the end user is rising. Fogis one of the emerging edge computing paradigms. The termfog was first introduced by Cisco [1]. As compared to clouddata centers, fog provides a virtualized computing environmentdeployed closer to the end user [2]. The fog resides betweencloud and end-user devices. The cloud and fog provide similarservices to end users but the fog is deployed to facilitatespecific geographic region. Fog cannot exist standalone ratherit augments the cloud computing. It is designed to supportdelay-sensitive applications, Whereas cloud being far awayfrom the user can exhibit higher latency. The fog providesservices to IoT applications from the edge network as wellas from the devices such as routers, access points, Road SideUnits (RSUs) and other user devices. With the deploymentof fog nodes, the reliability, fault tolerance, and scalabilityof the devices can easily be managed. Thus, it also reducesthe bandwidth usage between fog node and backend clouddata centers. The fog is an emerging paradigm but thereare several challenges it faces, such as heterogeneous devicemanagement, fog nodes architecture, security, device mobility,and privacy. Moreover, interoperability among heterogeneousdevices is also a challenging task. Data coming from differentdevices need to be analyzed and forwarded to other devicesfor timely decision making. The typical fog paradigm con-sists of limited fog nodes that provide virtualized computingservices. Therefore, to efficiently manage resources requiressophisticated scheduling algorithms. Fig 1 depicts a generalscenario where the efficiency is achieved by implementing thefog layer in between the local network and cloud. Similarly,like a cloud, proper management of resources usage andbilling is the mandatory requirement of fog paradigm. Fogprovides a flexible environment to end devices, but is difficultto manage due to its decentralized paradigm. The fog nodescan be deployed at any place between the device and cloudinfrastructure. As fog is designed to support latency-sensitiveapplication, Smart Gateways (SG) are the best location to offerfog computing [3].Fog computing is based on expensive devices and networkequipment. It is important to perform pre-deployment testingof fog platform using simulation tools. However, no suchstandard simulation tool/framework is available at the moment

JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 2

for the fog computing which makes an open research issue aswell.Moreover, the existing fog simulators lack basic features asexplained here. The existing simulators are mainly focusedon homogeneous devices. The devices send the data to thecentralized node where the data is processed before sendingto the cloud. There exist Java-based simulators which do notconsider the network properties and thus, only simulate theidealistic environment with no packet drop/error rate, networkcongestion, and channel collision. The simulators only providelimited or simple mobility models and lacking features likehandover. The simulators are not open source or proprietaryand do not support modification. Thus, researchers cannotincorporate their own resource management algorithms fortesting and modification. Moreover, energy consumption andcost computation models are also not supported in existingsimulators.

Fig. 1. Computing Architecture Pyramid

Contribution – In this paper, we have proposed a fogsimulator termed as FogNetSim++. In our proposed FogNet-Sim++, a user can simulate heterogeneous devices with vary-ing features. It also supports the handover feature to track thesource or requested device. Thus, after computation, resultscan be delivered through different fog nodes deployed at thedistinct geographical region. The FogNetSim++ architectureis flexibly designed so that researchers can incorporate theirown algorithms by extending the base classes. Previously nosuch simulators exist that facilitate in such a manner; thus,FogNetSim++ enables users to model, simulate and evaluatethe different realistic fog scenarios. It also provides a facilityto create a network environment that allows the static anddynamic nodes in the network and use various fog protocolsfor communication, such as Message Queue Telemetry Trans-port (MQTT), Constrained Application Protocol (CoAP), andAdvanced Message Queuing Protocol (AMQP). The FogNet-Sim++ includes a range of mobility models, such as Station-aryMobility, StaticGridMobility, CircleMobility, LinearMobil-ity, TractorMobility, RectangleMobility, and TractorMobility.Moreover, the user can extend these models to fulfill theirrequirements. Moreover, energy module is also incorporatedfor mobile devices. All the fog nodes are managed through acentral broker, thus various resouce scheduling algorithms canalso be incorported in the proposed simulator.

The rest of the paper is organized as follows: Section 2briefly describes the related work. In Section 3, FogNetSim++system model and design is explained. The experimental setupand simulation details are presented in Section 4. Finally, weconclude this paper in Section 5 and discuss future researchdirections pertaining to the FogNetSim++ simulator.

II. LITERATURE REVIEW

This section covers details about some of the commonlyused simulators, with comparison to the proposed FogNet-Sim++. Han et al. [4] proposed DPWSim, designed for IoTapplications. It supports the service-oriented and event-drivenmodel. Sotiriadis et al. [5] proposed SimIoT which is designedas an extension of SimIC simulation framework. It providesseveral communication mechanisms for IoT sensors and clouddata centers. Similarly, a simulation tool EdgeCloudSim isproposed to reduce the barriers in the conventional cloudsimulators for simulating the edge computing scenarios. It isdesigned as an extension to CloudSim [6].

Khan et al. [7] proposed a coordination technique to handlelarge number of IoT devices. The framework is implementedon CloudSim and supports home automation applications.Zeng et al. proposed IoTSim that enables the big data pro-cessing in IoT environment. The authors have adopted aMapReduce model and presented a case study to show theeffectiveness of proposed simulator. Pflanzner et al. [8] pre-sented a mobile based IoT simulator called MobIoTSim. Themain objective is to provide a platform to researchers to learnIoT device handling without buying extra sensors and devices.Through MobIoTSim, users can explore the detailed workingof IoT systems and help in building initial understanding of acomplete IoT connected system.

F. Claudio et al. [9] proposed a CrowdSenSim, whichis designed to simulate crowd source applications such assmart cities. To evaluate the proposed simulator, authors havesimulated a street lighting scenario. However, the simulatorcan be used for other applications that require data gatheringfrom various diverse sources. The CrowdSenSim is freelyavailable for researchers and users.

SimpleIoTSimualtor [10] is commonly used tool to simulateIoT environment with sensors and devices. It also supportsnumber of IoT specific protocols such as MQTT, CoA, etc.However, SimpleIoTSimulator requires 64-bit RedHat Linuxenvironment for successful installation and execution of all thepackages. Similarly, IBM offered PaaS enabled IoT simulatortermed as IBM Bluemix [11]. It provides a web based interfacefor quick deployment of cloud applications that can gatherdata from various sensors and devices. It provides supportfor hardware devices of ARM, Intel, and Texas Instrument.The data is sent to cloud data center through MQTT protocol.A platform-as-a-service enabled simulator - Parse [12] islaunched by Facebook. It supports IoT devices. It provideseasy application development environment and also supportsvarious mobile devices. The Google Cloud framework includesGoogle’s IoT solution that provides various Google services[13]. The proposed framework is highly scalable, and allowslarge number of devices, gathers data and provides a visual-ization platform. In particular, data from devices are received

JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 3

at Load Balancer and from here it is disseminated to the nextlayer i.e., AppEngine.

Harshit et al. [14] proposed an IoT and fog simulator callediFogSim. It is designed as an extension of CloudSim usingJava technology. The authors presented the impact of resourcemanagement techniques in terms of latency, congestion, andcost. However, there are few drawbacks: (a) it is based on Java,therefore, core network parameters are not supported, (b) it isnot compatible with different versions of java, moreover, thedocumentation is not extensive to support development. In ourproposed simulator, a complete network toolbox is availableto simulate delay, latency, congestion, packet drop, thus, itgives the flexibility to simulate diverse networks with variablecharacteristics.

A Cisco solution based IoT simulation testbed is proposed– called FIT IoT Lab [15]. It also supports open-sourcesolutions. It allows the use of wireless nodes deployed acrossFrance. The sensors and gateways are accessed through theremote interface. However, the simulator does not conductsimulation in a controlled environment, therefore, the simu-lation cannot be repeated.

WSNet is simulator designed to simulate wireless net-works [16]. It is a discrete event simulation. It can be usedto simulate IoT network. It already includes modules suchas mobility, energy, radio interfaces and routing protocols.Moreover, it also supports simulation of disasters such asearthquake, and fire.

Stefania Conti et al. [24] proposed a scheme that help fogcomputing nodes with battery to store energy that can be usedto execute compute intensive tasks. The power storage canhelp fog node during peak load time even with low powergeneration. The authors proposed reinforcement based learningtechnique to minimize the job loss.

Haruna et al. [25] discussed the resource allocation and usermobility. The authors proposed the algorithm to optimize theresource allocation and handle the handover for mobile usersin fog environment.

Xianling Meng et al. [26] studied the delay-constraint modelfor computation offloading on Cloud or fog computing servers.The main goal is to minimize the energy consumption in termsof computation and communication keeping in considerationthe delay constraint of every task. The proposed hybrid ap-proach has reduced the overall energy consumption.

In fog computing, usually the resources are limited com-pared to cloud; therefore, typical cloud resource allocationalgorithms cannot fullfil the rapid changing needs of the user.In [27] Lina Ni et al. proposed a resource allocation algorithmfor fog environment using priced timed petri nets. Priced timedPetri net is the variant of Petri nets that define the systembased on price and time. It is used to characterize the dynamicbehavior of a system and also help in effectively analyzing theperformance in terms of time and cost. The proposed schemeconsiders price and completion time of a task. Moreover, thealgorithm that predicts the time required for a particular taskis also proposed in this work.

Fog provides a middle-ware for the applications of Internetof Things (IoT) where sensors/devices generate significantamount of data [28]. Similarly, the energy management of

edge devices is also very crucial. Jie Xu et al. [29] proposed adynamic energy management framework that learn on-the-flyand dynamically manage the workload offloading mechanism.

Ananthanarayanan et al. [30] proposed a geographical dis-tributed framework for large-scale video analytics. To supportreal-time video analytics, gateway nodes are used to fulfillthe computing requirement. Ju Ren et al. [31] discussed ascalable framework for edge computing. The framework isdesigned to support smart home applications, the collected datafrom various sensors are sent to decision making nodes, thecommunication can be reduced with the installation of nearbycomputing nodes [32].

A video transmission model is proposed in [33] by Xi-aodong Xu et al. where MEC server is used to controlthe video caching mechanism. Many well-known contentproviders, such as Youtube, NetFlix, etc., are caching contentsat the edge, thus reducing the latency. Chen et al. in [34]proposed a device-to-device crowd sourced framework for mo-bile edge computing using 5G technology. In 5G technology,a device can communicate with other devices. Therefore, alarge number of devices can require computing at the edgelocation. Sonmez et al. [6] proposed a framework that definesthe strategies for better resource sharing and task execution incollaborative and energy-efficient manner.

In [35], Bo Tang et al. proposed a distributed fog architec-ture for the integration of different infrastructures, services,and components for smart cities. The authors claimed thatwith the deployment of fog node, the response time has beenreduced significantly. Li Ting et al. [36] proposed a coopera-tive framework to enhance the data collection quality in fiberchannel networks. The delay constraints are fulfilled throughthe concept of offloading at dynamic fog nodes. XianlingMeng et al. [37] proposed a hybrid offloading framework thatcan offload data and computation at fog nodes and cloud datacenters. The main objective is to reduce the overall energyconsumption for computation and communication.

Mithun Mukherjee et al. [38] discussed the security issuesin IoT environment. Similarly, Pengfei Hu et al. [39] discussedthe security and privacy of face detection applications whilecomputations are performed at the fog layer. The commonlyused protocols for the fog paradigm are publish/subscriptionbased. A content-based publish subscribe scheme is proposedto handle privacy issues [40]. Similarly, the fog architectureis also useful for vehicular applications that require quickcomputation for real-time decision making. A fog architecturefor vehicular computing is proposed in [2] by Flavio Bonomiet al.

Most of the simulators discussed above are not flexiblydesigned to facilitate researchers to incorporate their own algo-rithms. Moreover, the existing simulators are mainly focusedon devices they can support; however, the network protocolsand communication stack are not fully considered. To test andanalyze the algorithms, there is a need for flexible, extensive,and rapidly deployable fog simulator. The detailed comparisonis shown in Table I. In next section, the details of the proposedsimulator are discussed to address the above-mentioned issues.

JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 4

TABLE ISIMULATOR COMPARISON

Simulators Prog.Language Platform Network

ConfigurationOpenSource

MobileNodes

CustomizeMobilityModels

SchedulingAlgorithms

DeviceHandover

EnergyModule

MobIoTSim [8] Java Linux No Yes Yes No No No NoSimpleIoTSimulator [10] Java Unix No No Yes No No No NoIBM BlueMax [11] Java/Python Cloud No No Yes No No No NoGoogle IoT Sim [13] NA Cloud No No Yes No No No NoiFogSim/MyiFogSim [14] Java All No Yes Yes No Yes No NoCooja [17] C Linux No Yes Limited No No No NoFogTorch [18] Java All No Yes No No No No NoRECAP simulator [19] N/A – Limited N/A No No No N/A N/AEmuFog [20] Python All Yes Yes No No No No NoEdgeCloudSim [21] Java All No Yes Yes No Yes No NoEdge-Fog cloud [22] Python All No Yes Limited No No No NoMobile Fog [23] N/A – No No Yes No No No NoFogNetSim++ C++ All Yes Yes Yes Yes Yes Yes Yes

III. FOGNETSIM++: TOOLKIT FOR MODELING ANDSIMULATION

A. System Model

The proposed system can support P mobile devices (d),M fog nodes and a broker node (B). The mobile devicescan communicate with the broker node through the basestation (BS). The mobile devices can be of different types,either they are sensing devices which only generate data forfurther processing at the fog node or they can offload taskfor computation. Therefore, the mobile device can executean application which requests for computing capacity at thefog node. Here, we have implemented a traffic model as anM/M/1 queue on mobile device and M/M/c queue on fognodes. Every mobile device can generate a service requestto the fog node through its BS. If the cumulative requestrate is less than the accepted rate of fog node, then all therequests will be accepted to process on fog node. Otherwise,the request is further subleased to the neighboring fog nodes.This entire process is managed by the broker node. The brokernode continuously monitors the fog nodes, their queue length,and sizes of every request. Based on these parameters, it cansublease the tasks to other fog nodes. Moreover, here we haveassumed that offloading task to the back-end cloud data centercan further add the delay, however, the option is still availableat the broker node which can be utilized in extreme caseswhere the request rate increases exponentially. Moreover, therequests generated from mobile devices (di, i ∈ P ) followsa Poisson process model, where (µi) is the average requestarrival rate.

Every request generated from device (di) is computationallyintensive, totally independent and can be scheduled on any fognode or cloud data center. Further, there are k homogeneousfog nodes that can be used to execute the received task.In every fog node location, there are q nodes available toprovide services. The execution rate is represented as θf . Themaximum workload of the fog node is represented as φf . Thereason to define the max workload is to evade unnecessaryqueuing delay. The execution request from a di is first receivedat the B. Thus, according to the Poisson process, we can write

the total arrival rate is as follows:

µtotal =

P∑i=0

µi. (1)

Further, the request that every fog node can accept is statedas:

ϕ =

{1 φf > µtotalφf

µtotalφf < µtotal

}. (2)

Therefore, using (1) and (2), we can compute the executionrate at fog nodes as:

ϑ = µtotal × ϕ =

{µtotal φf > µtotalφf φf < µtotal

}. (3)

Using Erlang’s formula [41] and the queuing theory analy-sis, we can compute the average waiting time of each requestat fog node is as follows.

Twait =κ, µtotal

κθf

κθf − µtotal+

1

θf. (4)

The broker node is managing all the fog nodes and if thefog node cannot process any new request, the broker forwardsthe overloaded request to neighboring fog nodes which areunderutilized. Moreover, in extreme case, the task can betransferred to the cloud data center (we are not consideringthis case here). Therefore, if no fog node is available whichcan accept the new task, the broker can hold the task in its ownqueue for time (t). After the expiry of time, it can forward thetask to available fog node. Otherwise, after the expiry of timet, the broker can drop the task and request for re-transmission.

Energy Model – FogNetSim++ also provides the energymodel. The energy of a given task can be computed using(5). Where Et represents the energy consumption for task t.It is the combination of device energy and energy consumed atfog node. At device end, the energy is consumed in uploadingthe task t of size S(t) on data channel of bandwidth B with itstransmission power Ptrans. Whereas, at fog node, the powerconsumed in processing task t of size S(t) at fog node (FN )with computing capacity γfn. Pidle represents the idle power.

JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 5

TABLE IIPRICING MODELS SUPPORTED IN FOGNETSIM++

No. PricingModel

Features/Description Price

1. Pay-as-you-go Networking, StorageCompute $.0004/Mb

2. Subscription Monthly Task size 10GbMonthly Task size 100Gb

$50/User$450/User

3. Pay-for-resources StorageCompute

$0.0048/GB$.0002/Mb

4. Hybrid ModelA dynamic model changesaccording to the queue sizeof broker

$.0004-$.0008

The state diagram of the current energy model is presented inthe Fig. 2. The (6) represents the total energy for Q tasks.

Efnt =S(t)

B· Ptrans +

S(t)

γfn· Pidle. (5)

E =

Q∑t=0

Efnt . (6)

Fig. 2. State diagram for energy model

Pricing Model – FogNetSim++ also provides different pric-ing models. The central broker monitors the resource usage.The pricing model available in FogNetSim++ is listed inTable II. For the pricing model, the broker is responsible formanaging the user SLA (service level agreement).

The proposed FogNetSim++ is an extensive simulator de-signed to support task execution inside the fog. Usually, theresources available at fog level are less compared to the clouddata center. Therefore, efficient utilization of fog resourcesis highly desirable. Moreover, the proposed framework isdesigned with a centralized task manager i.e. broker node. Thebroker is responsible for managing the entire fog resources.Initially, the device contacts broker with its computational

requirements. On successful allocation of fog node, the devicedirectly sends the task to the assigned node. Thus, this reducesthe overhead at the broker node. Moreover, the proposed workalso support sensing devices, which can only generate data,and other devices can acquire that data through subscription.The rest of the technical details are discussed in the nextsubsection.

Fig. 3. FogNetSim++ Design

Fig. 4. FogNetSim++ - A Graphical User Interface

B. Implementation

The fognetsim++ is developed as an extension of OM-NeT++. The OMNet++ is commonly used open source toolthat provides an extensive library to simulate network charac-teristics. It provides a number of built-in modules that act likerealistic network devices. Fig. 3 shows the design of proposedFogNetSim++. In FogNetSim++, all the available modulesof OMNeT++ can be easily integrated. The researchers caneasily modify the modules of FogNetSim++ to simulatetheir scenarios. The main objective of the development ofFogNetSim++ is that the existing frameworks are designedto support different sensors [10] [11]. However, they haveignored the network characteristics such as error rate anddata rate that can play a critical role in simulating latency-sensitive applications. Similarly, the existing work does notsupport mobility or provide simple mobility models [42].The graphical interface of FogNetSim++ is shown in Fig. 4.Our proposed FogNetSim++ present the complete simulationenvironment that includes sensors, fog nodes, a broker nodeand geographically distributed data centers. The broker isresponsible for managing the fog nodes, it receives the service

JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 6

Fig. 5. FogNetSim++ Working Model

request and assigns fog nodes keeping in view the utilizationof every fog node. It is a novel framework that supports bothmobile and static nodes, devices, and gateways. The modulardesign of FogNetSim++ is shown in Fig 3. The FogNetSim++comprises of two main modules i.e., end devices and broker.

The core modules of FogNetSim++ are broker, fog node,and the end devices. The broker is the centralized resourcemanager that keeps track of all the fog nodes. The fog nodeprovides a computation service. The end device is the actualnode/sensor that can move during communication and generaterequests for computing nodes. The broker node receives arequest from devices to perform the requested computation.The broker node maintains a queue from where the requestsare served on first come first serve basis. Thus, the brokeris responsible for task scheduling, execution, and handover.The handover module is used in two cases, i). when thenode is moving from one region to another and its requestedtask is being executed. In that case, broker dynamicallytransfers the unallocated task to its neighbor fog node; ii). therequested task is transferred to the neighboring node where fognode is available or lightly loaded. The latter is used whendirectly connected fog node is heavily loaded, and cannotfulfill the request due to large pending tasks, as shown inFig 5. The broker nodes are also connected to a backbonenetwork which further connects it with the cloud data center.The computed results/data can be sent to the data center forstoring and to perform analysis at a later stage. Usually, thereare limited fog nodes that provide computation. Every fog

node provides services to a large number of devices. In atypical case, it is used to gather data from sensors, and theonly meaningful information is sent to the data center. Inproposed FogNetSim++, researchers can incorporate their ownrequest scheduling algorithms at the broker node to support theexecution of tasks at the fog node. Moreover, the sophisticatedhandover algorithm can also be incorporated very easily. Thiscan introduce a new research direction in fog simulators. Inall the previous simulators, no such scheduling algorithms areavailable that allow researcher to utilize fog nodes efficiently.The network module in FogNetSim++ provides completenetwork physical/wireless link properties such as packet drop,retransmission, bit error rate, and link bandwidth. The FogNet-Sim++ provides flexibility in network configurations. Theuser can define network parameters according to their designrequirements. Thus, the more realistic network can be simu-lated. The FogNetSim++ includes a number of communicationprotocols, that can be used to simulate diverse scenarios. Atpresent, the available protocols are TCP, UDP, FTP, HTTP,MQTT, CoAP, and AMPQ. The HTTP, TCP, and UDP canalso be used for communication with the data center. TheFogNetSim++ supports heterogeneous devices and fog nodeswith a variable number of applications that can execute overeach node concurrently. Moreover, the applications can usedifferent communication protocols. Further, it also supportsIPv4 and IPv6; however, both cannot be used simultaneously.Moreover, the broker can be used to dispatch the data to

the requested devices; therefore, publish, subscribe mechanism

JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 7

Algorithm 1 Algorithm – Broker Node (B)1: List fogNodes[] ← FDM

2: List devices[] ← dP3: Queue taskQueue[] ← nill4: Timer timer ← 05:6: while ( true ) do7: if MessageRecInWaiting then8: Msg ←Message.Received9: if Msg.Type == Result then

10: Forward Msg to di11: else if Msg.Type == FN.Φi then12: Update FNi.Φi ← Φi13: else if Msg.Type == di.position then14: Update All di.Position for Handoff15: else if Msg.Type == Servicereq then16: taskQueue←Msg17: end if18: end if19:20: if taskQueue ! = Empty then21: Msgreq ← taskQueuepop22: if FNi.workload < FNi.Φi then23: Forward Msgreq to FNi24: else25: boolflag ← true26: for i=0 .. M do27: if FNi.workload > FNi.Φi then28: Msgreq ← taskQueuepop29: Forward Msgreq to i30: flag ← true31: end if32: end for33: if flag then34: Starttimer ← ∆T

35: end if36: end if37: end if38:39: if timerexpire then40: for i=0 .. M do41: if FNi.workload > FNi.Φi then42: Msgreq ← taskQueuepop43: Forward Msgreq to i44: end if45: end for46: end if47: end while

Algorithm 2 Algorithm – Fog Node (FN)1: Timer timer ← 02: Queue taskQueue[] ← nill3: while ( true ) do4: if MessageRecInWaiting then5: Msg ←Message.Received6: taskQueue←Msg7: end if8: if taskQueue! = Empty then9: Msgreq ← taskQueuepop

10: Outcome← ExecuteMsgreq11: Send(Outcome,B)12: end if13: if timer expired then14: Send(φi, B)15: timer ← reset16: end if17: end while

is implemented at the broker node. Any device can registerwith the broker either as a subscriber, publisher or both. Thus,the broker tracks the device location and share updates to allthe subscriber devices. This mechanism is added to supportthe role of various sensors in IoT. For this purpose, MQTTis a publish/subscribe based lightweight messaging protocol2,which is implemented in FogNetSim++ for communicationamong devices and broker nodes.

1) Broker Module: As discussed above, the broker node isresponsible to provide resources on request. In FogNetSim++,we have categorized the nodes into three types i.e., static,mobility-based, and Wireless Access Based (WAB). The staticnodes are the fog computing servers, placed at the gatewayto provide computing on request. The mobility-based are theactual mobile nodes that can request computation from fognodes. The WAB are the access points that can be used to servethe connected nodes. The internal modules of the broker nodeare shown in Fig 6. The WAB is designed on the inspiration ofCisco Edge3 series routers which provide the facility of com-puting along with the routing. The other features of the brokernode are to register/manage publishers, subscribers, schedulefog nodes for requested devices, resource management, opti-mal utilization of resources among the number of requesteddevices, manage handovers, provide communication link withdata centers, and reliable data delivery. The execution of brokerand fog node is listed in Algorithm 1 and Algorithm 2. Thesimulation parameters of broker node are listed in Table III.

2) End Node Devices: Another core module of FogNet-Sim++ is mobile devices that can play an important role infog computing. Here, we categorize devices as – sensor nodesand user nodes. A sensor nodes act as data generator, andsend the generated data to broker or other devices after regularinterval of time. Whereas, a user node can generate or receivedata. A user node can also act as a sensor. Moreover, thesenodes are further arranged into two types: (a) wired and (b)

2http://mqtt.org/tag/standard3www.cisco.com

JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 8

TABLE IIISIMULATION PARAMETERS – BROKER

Parameter DescriptionnumMQTTApps The parameter indicates that the number of MQTT applications at each broker, it can be any integer number between 1– n

hasMQTT a one bit field to indicate that the protocol being used is MQTT

numTcpApps The parameter indicates that the number of TCP applications concurrently executing on broker node – default(0)

numUdpApps The parameter indicates that the number of UDP applications concurrently executing on broker node – default(0)

numSctpApps The parameter indicates that the number of Sctp applications concurrently executing on broker node – default(0)

numPingApps The parameter indicates that the number of Ping applications concurrently executing on broker node – default(0)

Fig. 6. Internal modular view of Broker Node

wireless nodes. Nodes can be static or mobile, both versionsare supported in FogNetSim++. Devices can register to publishdata. The data is pushed to a broker node. In the proposedsimulator, all the devices are IP enabled, thus can acquire IPaddresses through DHCP. The devices support MQTT protocolalong with other application protocols such as HTTP, TCP,FTP, SMTP, SNMP, and UDP. Moreover, the selection ofa protocol for communication is done at design time. Dueto the flexible architecture of FogNetSim++, researchers caneasily incorporate other protocols through well-defined classes.The end devices are mainly used to generate or consumedata. A device uses MQTT messages for communication witha broker node. The FogNetSim++ supports heterogeneousdevices; every device can have a different feature such as datarate, functionality and etc.

Mobility Models – Mobility is another very importantfeature of end devices. In FogNetSim++ wireless and wireddevices are supported. The mobility can play an importantrole, it can create new challenges for researchers in the formof optimum use of resources and resources handover. Normallymobility models are classified into two categories i.e., entityand group model. In the entity model, the movement of eachnode is independent of other nodes. The most commonlyused entity models are random waypoints, Gauss Markov,and City section. In the group model, the movement of onenode is dependent on the movement of other nodes. The mostcommonly used group models are Column Mobility, NomadicCommunity, and Reference Point Group. The FogNetSim++supports only entity models. The already available models are

a random waypoint, Mass mobility, Gauss Markov, Chaingmobility, CircleMobility, LinearMobility and vehicle mobility.

IV. TESTING AND PERFORMANCE EVALUATION

FogNetSim++ offers a comprehensive platform to simulatediverse fog applications. It also helps to understand the basicconcept of fog computing. The FogNetSim++ provides a richnetwork configuration managed through a network module.It allows the simulation of a realistic network environmentthat opens new challenges for researchers such as resourcesutilization, data error rate, and handoffs. All the modules areconfigured through a configuration file with extension ini. Auser can set values of different parameters, such as, numberof brokers, fog nodes, end devices, data rate, channel noise,and mobility models for every individual or group of nodes.Case Study – To give the basic understanding of the frame-

Fig. 7. Case study - simulated topology

work and to evaluate the performance of the simulator, acommunication network scenario is simulated based on smarttraffic management system. The smart traffic managementis an ideal case for fog nodes, where a number of staticsensors are deployed to gather traffic information. More-over, pedestrians can also share the surrounding conditionsthrough their smart devices. The pedestrians are mobile, canfreely move in any direction. These sensors generate data atdiscrete points. The data is processed at the fog node forquick response, to identify any rules violation, such as overspeeding, or any unusual situation. Moreover, there are lawenforcement agencies which have subscribed to these sensorsdepending upon their geographical location. The fog nodesare used to identify the violations based on received data anddisseminate the results to the subscribers. Apart from this,

JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 9

the law enforcement agencies can also generate a request forcomputing resources to perform their search or predictions.Here, we have analyzed the network based on the abovementioned scenario using a FogNetSim++. The simulatedtopology is shown in Fig. 7. The sensor generates data afterregular intervals of time. The broker node receives the dataand forward to the fog node for processing and results aredisseminated to the subscribed devices. Moreover, the devicescan send the compute capacity request to the broker node. Thebroker assigns resources based on the scheduling policy andafter execution, sends back the result to the requested device.During the task execution, the broker also tracks the requestedor subscribed devices for hand-off operations. The scalabilityof proposed FogNetSim++ is measured in terms of memoryand CPU usage. As the IoT comprises of a large number ofdevices, therefore, it is important to benchmark the proposedFogNetSim++ in terms of memory and CPU usage. Moreover,the other network parameters that are benchmarked here arethe delay, latency, and error rate. The delay is also measuredwith respect to the execution task. The task is categorized aslarge (1500 MIPS), medium (900 MIPS), small (200 MIPS),and random (a random number between 200 and 1500 MIPS).Usually, different functionality requires a different amount ofcomputing capacity. For example, in a traffic managementsystem, identifying objects from a snapshot, or predict themovement of group can take a different amount of executiontime. The system specifications are mentioned in Table IV.The parameters used in a simulation are listed in Table V.

TABLE IVMACHINE SPECIFICATION

Parameters ValueCPU 4

Core(s) per socket 2

Thread(s) per core 4

CPU MHz 2390

Memory 8 Gb

The proposed FogNetSim++ is evaluated by varying thenumber of devices. The Fig. 8 shows that the CPU usage withrespect to the total number of modules shows the increasingtrend; however, for around 1320 nodes, the CPU usage isbelow 25%. The number of nodes mentioned in the figureincludes both devices, fog nodes, and the broker node.

Similarly, with the increase in a number of nodes, the mem-ory consumption also shows an increasing trend. However, for1320 nodes around only 15% of memory is used (see Fig. 9).Thus, this clearly shows that the proposed simulator can easilysupport the execution of thousands of nodes on a typicalcomputing machine. This is primarily due to the reason thateach node maintains a very less node-specific data. In the sim-ulator design, the common data is shared among all the nodes.The FogNetSim++ is designed on the top of OMNeT++, thatprovides a rich graphical user interface. Therefore, increasingthe number of nodes usually requires a significant amountof time to populate the GUI. So, the delay in constructionof GUI interface is also an important parameter to observe.

TABLE VSIMULATION PARAMETERS

Sr. Parameters Value1 Broker(s) can support upto 400

2 Wireless sensors 10-400

3 Wireless Mobility MassMobility

4 AccessPoint Broker(s) 10-400

5 Wireless Access Point(s) 10-400

6 Device(s) 60-880

7 Cloud Data-center(s) 1-4

8 Devices 1-100 Mobility Circular Mobility

9 Devices 101-300 Mobility Vehicle Mobility

10 Devices 301-600 Mobility Mass Mobility

11 Devices 601-880 Mobility Linear Mobility

12 Fog Nodes 1-1200 mqttApps 1 at each

13 Brokers Topic Name(s) Sensing data

14 Broker-Broker Link 10 Gbps

Fig. 8. FogNetSim++ CPU usage with respect to number of nodes

Fig. 10 shows the delay in constructing the graphical userinterface (GUI). At 1320 nodes the maximum delay is around600 seconds. This is due to the rich GUI that allows users toinspect every module and parameters through GUI. However,the proposed simulator can also run in command line mode toavoid such delays.

The Fig. 11 shows the average task computation time forsmall, medium, large and random sized tasks. The dottedline represents the average time at every simulation interval.Fig. 12 shows the percentage of hand-offs performed duringthe evaluation. However, it can be seen that with an increasedtask length, there are greater chances for a hand-off operation.Moreover, device location and mobility model also played animportant role in hand-offs. Thus, the broker node maintainsthe location of the requested node, so that after the taskcompletion, results can be dispatched accordingly.

The end-to-end delay increases with the increase in thenumber of user nodes as shown in Fig 13. Here we define end-to-end delay as the time taken by a request from the device

JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 10

Fig. 9. FogNetSim++ memory usage with respect to the number of nodes

Fig. 10. Delay in constructing enriched GUI

to the broker node. In a typical scenario of large number ofdevices generating requests at regular intervals, it results inmore delay as depicted in the figure.

In the experimental setup, the results are gathered basedon different task computation requirements. The tasks arecategorized as small, medium, large and mix. Fig. 14 showsthe average task completion delay in each of the task category.The figure clearly shows that the large task computationrequirement takes a significant amount of time in completion.Therefore, small execution tasks can enhance the system per-formance and reduce the waiting time at fog nodes. However,Fig. 15 shows the average error rate reported during execu-tion. The devices communicate using the wireless channel.However, the rate varies with device placement, congestion ofthe network, and the mobility model used for a node.

The average latency at discrete points is shown in Fig. 16.Here, the x-axis represents the simulation time and y-axisshows the latency. Fig. 17 shows the residual energy of threemobile users. The residual energy is defined as the remainingenergy at a mobile node after communication with broker/Fog node. The FogNetSim++ provides an extensive way tomeasure the energy of every mobile node that participated inthe simulation. The node no longer becomes the part of thenetwork when its residual energy reaches zero.

Fig. 18 shows the energy consumption with respect totransmission power. In FogNetSim++, the mobile nodes candynamically change their transmission power to communicatewith broker/fog node. On the other hand, changing the trans-mission power can directly affect the life of battery operateddevices. With large transmission power, the device can last forthe shorter period of time. .

V. CONCLUSIONS AND FUTURE DIRECTIONS

The inception of fog and edge computing provides newopportunities for delay-sensitive applications. The provision ofcomputing at the network edge, closer to the end user, reducesthe traditional network communication delays compared to thecloud-based execution model. In this paper, we have proposeda fog network simulator. In particular, FogNetSim++ providesa framework for researchers to investigate their own resourcemanagement techniques, perform resource handover, adoptnew algorithms with the complete network stack. All theexisting simulators do not completely provide the networkcharacteristics, mobility features, and resource managementmodules. FogNetSim++ provides the diverse network featuresand supports a large number of mobility models. Thus, ourobjective is to facilitate researchers for the rapid developmentand testing of new resource management algorithms. In thispaper, we have benchmarked the FogNetSim++ in terms ofnetwork usage and its behavior with respect to increase intraffic. The performance evaluations illustrate the effectivenessof the proposed framework. In future, we would like to extendthe FogNetSim++ to include the VM migration among fognodes. Moreover, interoperability among fog federations isanother interesting area that need futher exploration.

ACKNOWLEDGMENTS

The work of Samee U. Khan is based upon work sup-ported by (while serving at) the National Science Foundation.Any opinion, findings, and conclusions or recommendationsexpressed in this material are those of the authors and donot necessarily reflect the views of the National ScienceFoundation.

REFERENCES

[1] W. Shi and S. Dustdar, “The promise of edge computing,” Computer,vol. 49, no. 5, pp. 78–81, 2016.

[2] F. Bonomi, R. Milito, J. Zhu, and S. Addepalli, “Fog computing and itsrole in the internet of things,” in Proceedings of the first edition of theMCC workshop on Mobile cloud computing. ACM, 2012, pp. 13–16.

[3] P. Bellavista, L. Foschini, and D. Scotece, “Converging mobile edgecomputing, fog computing, and iot quality requirements,” in FutureInternet of Things and Cloud (FiCloud), 2017 IEEE 5th InternationalConference on. IEEE, 2017, pp. 313–320.

[4] S. N. Han, G. M. Lee, N. Crespi, N. Van Luong, K. Heo, M. Brut, andP. Gatellier, “Dpwsim: A simulation toolkit for iot applications usingdevices profile for web services,” in Internet of Things (WF-IoT), 2014IEEE World Forum on. IEEE, 2014, pp. 544–547.

[5] S. Sotiriadis, N. Bessis, E. Asimakopoulou, and N. Mustafee, “Towardssimulating the internet of things,” in Advanced Information Networkingand Applications Workshops (WAINA), 2014 28th International Confer-ence on. IEEE, 2014, pp. 444–448.

[6] C. Sonmez, A. Ozgovde, and C. Ersoy, “Edgecloudsim: An environmentfor performance evaluation of edge computing systems,” in Fog and Mo-bile Edge Computing (FMEC), 2017 Second International Conferenceon. IEEE, 2017, pp. 39–44.

JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 11

(a) Small-sized tasks (b) Medium-sized tasks

(c) Large-sized tasks (d) Random-sized tasks

Fig. 11. Average execution time in different task size categories

Fig. 12. Handoff performed w.r.t task size

[7] A. M. Khan, L. Navarro, L. Sharifi, and L. Veiga, “Clouds of smallthings: Provisioning infrastructure-as-a-service from within communitynetworks,” in Wireless and Mobile Computing, Networking and Commu-nications (WiMob), 2013 IEEE 9th International Conference on. IEEE,2013, pp. 16–21.

[8] T. Pflanzner, A. Kertesz, B. Spinnewyn, and S. Latre, “Mobiotsim:towards a mobile iot device simulator,” in 2016 IEEE 4th InternationalConference on Future Internet of Things and Cloud Workshops (Fi-CloudW). IEEE, 2016, pp. 21–27.

[9] C. Fiandrino, A. Capponi, G. Cacciatore, D. Kliazovich, U. Sorger,P. Bouvry, B. Kantarci, F. Granelli, and S. Giordano, “Crowdsensim:a simulation platform for mobile crowdsensing in realistic urban envi-ronments,” IEEE Access, vol. 5, pp. 3490–3503, 2017.

Fig. 13. Average delay w.r.t task size

[10] “Simplesoft simpleiotsimulator,” http://www.smplsft.com/SimpleIoTSimulator.html,accessed: 2018-08-10.

[11] “Ibm bluemix platform,” https://console.ng.bluemix.net, accessed: 2018-08-10.

[12] “Parse,” https://parse.com/products/iot, accessed: 2018-08-10.[13] “Google cloud platform,” https://cloud.google.com/solutions/iot/, ac-

cessed: 2018-08-10.[14] H. Gupta, A. Vahid Dastjerdi, S. K. Ghosh, and R. Buyya, “ifogsim: A

toolkit for modeling and simulation of resource management techniquesin the internet of things, edge and fog computing environments,”Software: Practice and Experience, vol. 47, no. 9, pp. 1275–1296, 2017.

[15] C. Adjih, E. Baccelli, E. Fleury, G. Harter, N. Mitton, T. Noel,R. Pissard-Gibollet, F. Saint-Marcel, G. Schreiner, J. Vandaele et al.,

JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 12

Fig. 14. Total Delay based on the compute capacity requirement

Fig. 15. Average wireless error rate reported during the execution

“Fit iot-lab: A large scale open experimental iot testbed,” in Internet ofThings (WF-IoT), 2015 IEEE 2nd World Forum on. IEEE, 2015, pp.459–464.

[16] K. Dolui and S. K. Datta, “Comparison of edge computing implementa-tions: Fog computing, cloudlet and mobile edge computing,” in GlobalInternet of Things Summit (GIoTS), 2017. IEEE, 2017, pp. 1–6.

[17] “Contiki cooja,” http://www.contiki-os.org/start.html, accessed: 2018-08-10.

[18] A. Brogi and S. Forti, “Qos-aware deployment of iot applicationsthrough the fog,” IEEE Internet of Things Journal, vol. 4, no. 5, pp.1185–1192, Oct 2017.

[19] J. Byrne, S. Svorobej, A. Gourinovitch, D. M. Elango, P. Liston, P. J.Byrne, and T. Lynn, “Recap simulator: Simulation of cloud/edge/fogcomputing scenarios,” in 2017 Winter Simulation Conference (WSC),Dec 2017, pp. 4568–4569.

[20] R. Mayer, L. Graser, H. Gupta, E. Saurez, and U. Ramachandran, “Emu-fog: Extensible and scalable emulation of large-scale fog computinginfrastructures,” in 2017 IEEE Fog World Congress (FWC), Oct 2017,pp. 1–6.

[21] C. Sonmez, A. Ozgovde, and C. Ersoy, “Edgecloudsim: An environmentfor performance evaluation of edge computing systems,” in 2017 SecondInternational Conference on Fog and Mobile Edge Computing (FMEC),May 2017, pp. 39–44.

[22] N. Mohan and J. Kangasharju, “Edge-fog cloud: A distributed cloud forinternet of things computations,” in 2016 Cloudification of the Internetof Things (CIoT), Nov 2016, pp. 1–6.

[23] K. Hong, D. J. Lillethun, U. Ramachandran, B. Ottenwalder, andB. Koldehofe, “Mobile fog: a programming model for large-scaleapplications on the internet of things,” in MCC@SIGCOMM, 2013.

[24] S. Conti, G. Faraci, R. Nicolosi, S. A. Rizzo, and G. Schembra, “Batterymanagement in a green fog-computing node: a reinforcement-learningapproach,” IEEE Access, vol. 5, pp. 21 126–21 138, 2017.

[25] H. A. M. Name, F. O. Oladipo, and E. Ariwa, “User mobility andresource scheduling and management in fog computing to support iot

Fig. 16. Average latency

Fig. 17. Residual Energy Vector over simulation time

devices,” in Innovative Computing Technology (INTECH), 2017 SeventhInternational Conference on. IEEE, 2017, pp. 191–196.

[26] X. Meng, W. Wang, and Z. Zhang, “Delay-constrained hybrid compu-tation offloading with cloud and fog computing,” IEEE Access, vol. 5,pp. 21 355–21 367, 2017.

[27] L. Ni, J. Zhang, C. Jiang, C. Yan, and K. Yu, “Resource allocationstrategy in fog computing based on priced timed petri nets,” IEEEInternet of Things Journal, vol. 4, no. 5, pp. 1216–1228, 2017.

[28] A. Carrega, M. Repetto, P. Gouvas, and A. Zafeiropoulos, “A middlewarefor mobile edge computing,” IEEE Cloud Computing, vol. 4, no. 4, pp.26–37, 2017.

[29] J. Xu, L. Chen, and S. Ren, “Online learning for offloading and autoscal-ing in energy harvesting mobile edge computing,” IEEE Transactions onCognitive Communications and Networking, vol. 3, no. 3, pp. 361–373,2017.

[30] G. Ananthanarayanan, P. Bahl, P. Bodık, K. Chintalapudi, M. Philipose,L. Ravindranath, and S. Sinha, “Real-time video analytics: The killerapp for edge computing,” computer, vol. 50, no. 10, pp. 58–67, 2017.

[31] J. Ren, H. Guo, C. Xu, and Y. Zhang, “Serving at the edge: A scalableiot architecture based on transparent computing,” IEEE Network, vol. 31,no. 5, pp. 96–105, 2017.

[32] X. Gong, L. Guo, G. Shen, and G. Tian, “Virtual network embeddingfor collaborative edge computing in optical-wireless networks,” Journalof Lightwave Technology, vol. 35, no. 18, pp. 3980–3990, 2017.

[33] X. Xu, J. Liu, and X. Tao, “Mobile edge computing enhanced adaptivebitrate video delivery with joint cache and radio resource allocation,”IEEE Access, vol. 5, pp. 16 406–16 415, 2017.

[34] X. Chen, L. Pu, L. Gao, W. Wu, and D. Wu, “Exploiting massived2d collaboration for energy-efficient mobile edge computing,” IEEEWireless Communications, vol. 24, no. 4, pp. 64–71, 2017.

[35] B. Tang, Z. Chen, G. Hefferman, S. Pei, T. Wei, H. He, and Q. Yang,“Incorporating intelligence in fog computing for big data analysis insmart cities,” IEEE Transactions on Industrial informatics, vol. 13, no. 5,pp. 2140–2150, 2017.

JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 13

Fig. 18. Average Energy Consumption vs Transmission power

[36] T. Li, Y. Liu, L. Gao, and A. Liu, “A cooperative-based model for smart-sensing tasks in fog computing,” IEEE access, vol. 5, pp. 21 296–21 311,2017.

[37] X. Meng, W. Wang, and Z. Zhang, “Delay-constrained hybrid compu-tation offloading with cloud and fog computing,” IEEE Access, vol. 5,pp. 21 355–21 367, 2017.

[38] M. Mukherjee, R. Matam, L. Shu, L. Maglaras, M. A. Ferrag, N. Choud-hury, and V. Kumar, “Security and privacy in fog computing: Chal-lenges,” IEEE Access, vol. 5, pp. 19 293–19 304, 2017.

[39] P. Hu, H. Ning, T. Qiu, H. Song, Y. Wang, and X. Yao, “Securityand privacy preservation scheme of face identification and resolutionframework using fog computing in internet of things,” IEEE Internet ofThings Journal, vol. 4, no. 5, pp. 1143–1155, 2017.

[40] Q. Wang, D. Chen, N. Zhang, Z. Ding, and Z. Qin, “Pcp: A privacy-preserving content-based publish–subscribe scheme with differentialprivacy in fog computing,” IEEE Access, vol. 5, pp. 17 962–17 974,2017.

[41] B. Ngo and H. Lee, “Analysis of a pre-emptive priority m/m/c modelwith two types of customers and restriction,” Electronics Letters, vol. 26,no. 15, pp. 1190–1192, July 1990.

[42] M. Satyanarayanan, V. Bahl, R. Caceres, and N. Davies, “The case forvm-based cloudlets in mobile computing,” IEEE pervasive Computing,2009.

Tariq Qayyum He received Bachelor of Science inComputer Science (BSCS) degree from The IslamiaUniversity of Bahawalpur, Pakistan. He is perus-ing Master of science in Information Technology(MSIT) from National University of Sciences andTechnology, Islamabad, Pakistan. His research inter-ests include cloud computing, fog computing, IoT,and distributed systems.

Asad Waqar Malik received his PhD degree incomputer software engineering from the NUST, Pak-istan. He is an assistant professor at the NUSTSchool of Electrical Engineering and Computer Sci-ence, Pakistan. His research interests include paralleland distributed simulation, cloud computing, andlarge-scale networks.

Dr. Muazzam A Khan Khattak (Senior MemberIEEE) is working as Tenured Associate Professor/Associate Dean at the Department of Computing,SEECS, National University of Sciences & Tech-nology Islamabad, Pakistan. He received his Masterwith major in Mobile Ad-hoc networks from IIUIand PhD degree in computer sciences as sandwichprogram from IIUI and UMKC, USA in 2011. Hecompleted his 1st Post doc at University of Ulm,Germany in 2013 and 2nd Post doc from Universityof Missouri, KC, USA in 2016. He worked at the

Networking and Multimedia Lab, University of Missouri Kansas City, USAas a Research fellow. He joined Awk University Mardan as an AssistantProfessor/Chair CS department in 2011. Later, Dr Khattak joined NationalUniversity of Sciences & Technology Islamabad as an Assistant Professorin 2013. His research interests include wireless networks sensor, Body areanetworks, image processing, Image compression, image encryption and datanetwork security.

Dr. Osman Khalid has completed his Masters inComputer Engineering from Center for AdvancedStudies in Engineering, Islamabad and PhD in Elec-trical and Computer Engineering from North DakotaState University, USA. Currently, he is AssistantProfessor in the Department of Computer Sciences.His areas of interests include Fog Computing, Disas-ter Response Systems, Recommender Systems, andWireless Routing Protocols.

Samee U. Khan received a PhD in 2007 from theUniversity of Texas, Arlington, TX, USA. Currently,he is the Lead Program Director (Cluster Lead)for the Computer Systems Research at the NationalScience Foundation. He also is a faculty at theNorth Dakota State University, Fargo, ND, USA. Hisresearch interests include optimization, robustness,and security of computer systems. His work hasappeared in over 400 publications. He is on theeditorial boards of leading journals, such as ACMComputing Surveys, IEEE Access, IEEE Commu-

nications Surveys and Tutorials, IET Wireless Sensor Systems, IET Cyber-Physical Systems, and IEEE IT Pro. He is an ACM Distinguished Speaker,an IEEE Distinguished Lecturer, a Fellow of the Institution of Engineeringand Technology (IET, formerly IEE), and a Fellow of the British ComputerSociety (BCS).