The Internet of Things (IoT) provides a broad range of services for the end-users using efficient endpoints for application delivery. IoT is still very early as the large-scale infrastructure is yet to be developed. There have been a lot of new research topics that are emerging based, especially in scheduling, power, and network load distribution.
Testing such use cases is difficult in the absence of a suitable infrastructure. Therefore iFogSim simulator possesses a huge potential to simulate the research-based use case and then, corresponding to the promising results, can be deployed to the existing system with minimum cost and effort involved.
This article will serve as a guide to understanding the iFogSim project structure API.
What is iFogsim?
iFogSim is a Java programming language-based API that inherits the established API of Cloudsim to manage its underlying discrete event-based simulation. It also utilizes the API of CloudsimSDN for relevant network-related workload handling.
Before we implement any use case in iFogsim, we must first be able to understand its project structure.
This article will enable you to choose the correct namespace for the implementation of our use case as well as any modifications to existing code to simulate the use case effectively.
Let’s get started…
The iFogSim project contains 7 folders and 1 text file. Following is the default view of the iFogsim project:
Here is the description provided in the sequence as they appear in iFogsim Project Structure,
JRE System Library
This folder contains the default libraries required for the execution of the iFogsim simulation.
Src
This folder contains the complete set of Java code files that are arranged in the form of namespaces. Among this, the first 11 packages are being included from the core cloudsim API. You can read in detail about this set of namespaces from the article “Beginners Guide to Cloudsim Project Structure.“
Then, the next 10 packages are being included from the CloudsimSDN API
Then brings in the actual packages for the iFogSim model API; there are 13 packages and a topologies package containing the layout for a router. This set of API namespaces will contain the actual implementation of the related fog computing-based models and policy implementations.
Referenced Libraries
The folder contains the set of additional JAR libraries that are required for the execution of the iFogsim simulation. This includes the Cloudsim source as well as the examples jar. Apaches common math library, JSON processing, etc.
Jars: The folder contains the actual JAR files of all the libraries mentioned in point no. 3.
Output folder
In case if you opt to record the put the simulations console output inside a file, then it will be stored in this folder.
Results folder
The tested simulator results are recorded as Excel/Openoffice/PDF/Text file and saved in this folder. One interesting thing that the programmer has done is that the charts corresponding to the results were also generated for quick analysis. This is great if you are doing the simulation to produce some results for the research paper.
Topologies
This contains the network layout for any given use case to be simulated using the iFogSim. The format used for saving the layout is JSON based and is utilized by the simulation engine to define the infrastructure for the test simulation.
README.md
This file contains the basic introduction regarding the iFogsim project along with the reference link to the Github project page as well as the research references.
What’s next?
We have been working on a tutorial course titled “Essential iFogsim Tutorials,” which currently contains over 2 hours of video content for beginner-level researchers; this course will be a work in progress based on the feedback from its subscribers. We have committed ourselves to updating its content until August 2023. I look forward to catching you on the course page.