iFogSim: An Open Source Simulator for Edge Computing, Fog Computing and IoT

1
528

iFogSim enables the modelling and simulation of fog computing to evaluate resource management and scheduling policies across edge and cloud resources under different scenarios.

Typically, within any organisation, numerous devices and gadgets are connected via advanced wireless technologies for different applications like communication, surveillance, security, messaging, social media, defence, etc. These deployments are traditionally associated with different paradigms including the Internet of Things (IoT), fog computing, edge computing and cloud computing. All these deployments, which need effective and high performance network environments and aware communications, have opened up areas of research.

IoT refers to the smart objects and gadgets that are connected using wireless technologies for real-time communication and transmission of signals. Different research reports predict that there will be more than 30 billion connected devices by 2020. In addition, the IoT market is expected to grow to over US$ 8 trillion by that year.

Cloud computing refers to the delivery of computing services using Internet based delivery channels. Remote data centres that provide services via the Platform as a Service (PaaS), Infrastructure as a Service (IaaS), Software as a Service (SaaS) and other related service delivery models are maintained in the cloud. Such services depend a lot on Internet connectivity, and performance is related to the bandwidth and channels available. Cloud computing is entirely dependent on Internet speed and connections, which may not be very good at every location.

Fog computing

Fog computing is gaining prominence in network based smart environments. It has been launched by Cisco with the aim of bringing cloud computing nearer to the control and management region of the end users. Fog computing enables users to access services and objects without depending on the Internet. It is closer to the users accessing the services, which makes the access speed very fast compared to cloud computing based delivery. Fog computing is also associated with the terms ‘fogging’ and fog networking.

In fog computing, a decentralised computing environment is established. In this approach, the services, objects, storage, applications and data analytics are deployed between the local systems (nodes or edges) and remote data centre. In this way, the actual resources being used are nearer to the user and there is no need to access everything via the Internet.

Figure 1: Layers of the cloud – the fog, mist and edge computing
Figure 2: Downloading iFogSim

Fog = Cloud + Internet of Things (IoT)

Fog computing is the intermediate layer between the remote cloud and the end user, and addresses the issues of network bandwidth, latency, delay and jitter — all of which can be avoided. It improves the overall performance of the network environment.

In simple terms, the cloud is at the top—in the sky. The end user is at the bottom (on earth). Now, with fog computing, the computing infrastructure is near the end user (on earth). And since it is near the end system where the actual services are required, one does not need to access everything through the Internet.

The concepts of edge computing and mist computing are closely related to each other and are often used synonymously. Mist computing can be used as an intermediate layer between the cloud and the fog or between the cloud and the edge.

In the case of edge computing, devices with programmable automation controllers (PAC) are used, while mist computing uses lightweight computing objects with microchips and microcontrollers. The deployment of edge computing or mist computing is done at the location of the end user. Fog computing is the extension of cloud services to the edge of a network. Fog computing works for the delivery of cloud services in a simple and fast way, while edge computing can work without the fog or cloud. Mist computing is not a mandatory layer of fog computing and can work separately.

In a fog, we generally cannot see beyond 100 metres, but we do have some visibility within that range. In fog computing, the same concept applies. There is a range within which we have access to resources.

With fog computing, performance on the following parameters is much better:

  • Latency
  • Capacity
  • Bandwidth
  • Responsiveness
  • Security
  • Speed
  • Robustness
  • Fault tolerance
  • Data integration
  • Energy

Prominent libraries and tools for simulation of advanced networks

Table 1 lists the tools and libraries used for simulation of advanced networks. These include IoT, fog computing and edge computing.

Table 1

iFogSim

This is a high-performance open source toolkit for fog computing, edge computing and IoT, which is used to model and simulate the networks of edge computing, the Internet of Things and fog computing. iFogSim integrates the resource management techniques that can be further customised as per the research area.

iFogSim works in association with CloudSim, a widely used library for the simulation of cloud based environments and for resource management. The CloudSim layer handles the events between the components of fog computing using iFogSim.

The following are the classes of iFogSim that are required to simulate the fog network:

  • Fog device
  • Sensor
  • Actuator
  • Tuple
  • Application
  • Monitoring edge
  • Resource management service

Installing iFogSim

The iFogSim library can be downloaded from the URL https://github.com/Cloudslab/iFogSim. This library is written in Java, and therefore the Java Development Kit (JDK) will be required to customise and work with the toolkit.

After downloading the compression toolkit in the Zip format, it is extracted and a folder iFogSim-master is created. The iFogSim library can be executed on any Java based integrated development environment (IDE) like Eclipse, Netbeans, JCreator, JDeveloper, jGRASP, BlueJ, IntelliJ IDEA or Jbuilder.

In order to integrate iFogSim on an Eclipse ID, we need to create a new project in the IDE (as shown in Figures 3 and 4).

Figure 3: Creating a new project in the Eclipse IDE
Figure 4: Integrating iFogSim with a project in the Eclipse IDE

Simulating networks using iFogSim

Once the library is set up, the directory structure of iFogSim can be viewed in the Eclipse IDE in Project Name -> src.

There are numerous packages with Java code for different implementations of fog computing, IoT and edge computing.

To work with iFogSim in the graphical user interface (GUI) mode, there is a file called FogGUI.java in org.fog.gui.example. This file can be directly executed in the IDE, and there are different cloud and fog components that can be imported in the simulation working area as shown in Figure 5.

In Fog Topology Creator, there is a Graph menu, where there is the option to import the topology (Figure 6).

On execution, the output can be viewed in the console of the Eclipse IDE.

In iFogSim, there are different scenarios for multiple applications that can be simulated; these include software defined networking (SDN) and its integration with cloud and fog computing.

In the base installation of iFogSim, there are a number of case studies that have been implemented and programmed. For example, there is a case study of intelligent surveillance in org.fog.test.perfeval. On executing it, various parameters like energy, cost, camera performance, etc, can be evaluated.

Starting DCNS...

Placement of operator object_detector on device d-0 successful.

Placement of operator object_tracker on device d-0 successful.

Creating user_interface on device cloud

Creating object_detector on device d-0

Creating object_tracker on device d-0

Creating motion_detector on device m-0-0

Creating motion_detector on device m-0-1

Creating motion_detector on device m-0-2

Creating motion_detector on device m-0-3

0.0 Submitted application dcns

=========================================

============== RESULTS ==================

=========================================

EXECUTION TIME : 2583

=========================================

APPLICATION LOOP DELAYS

=========================================

[motion_detector, object_detector, object_tracker] ---> 5.3571428571438195

[object_tracker, PTZ_CONTROL] ---> 3.110000000000363

=========================================

TUPLE CPU EXECUTION DELAY

=========================================

MOTION_VIDEO_STREAM ---> 2.957142857143481

DETECTED_OBJECT ---> 0.1111607142865978

OBJECT_LOCATION ---> 1.5285714285710128

CAMERA ---> 2.100000000000364

=========================================

cloud : Energy Consumed = 1.3338424452551037E7

proxy-server : Energy Consumed = 834332.9999999987

d-0 : Energy Consumed = 1048835.431000002

m-0-0 : Energy Consumed = 846301.761000042

m-0-1 : Energy Consumed = 846301.761000042

m-0-2 : Energy Consumed = 846301.761000042

m-0-3 : Energy Consumed = 846301.761000042

Cost of execution in cloud = 26120.742857167836

Total network usage = 11101.12

These are fully customisable libraries that can be improved further using new algorithms. These new algorithms can be programmed in the existing libraries of iFogSim, so that the performance of the proposed or new algorithm can be analysed on fog based networks using iFogSim.

Figure 5: Opening FogGui.Java in Eclipse
Figure 6: Importing the topology in the GUI of iFogSim

Scope for research and development

There are enormous challenges and areas of research in fog based networks including the following:

  • Security, privacy and integrity
  • Trust models and authentication
  • Data aggregation and access control
  • Improvements in the handover of networks
  • Mobile fog computing
  • Energy optimisation and resource management
  • IoT microservices
  • Quality of Experience (QoE)
  • Smart grid architectures
  • Offloading in fog networking
  • Migration modelling
  • Integration with machine learning and deep learning
  • Virtualisation enabled fog
  • Geospatial data analysis

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here