The Internet of things(IoT) provides a broad range of services for the end-users with the use of efficient endpoints for application delivery. IoT is still in a very early stage as the large scale infrastructure is yet to be developed. There has 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 efforts involved. This article will serve as a guide to understanding the iFogSim project structure API.
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, it is very important that we should be first 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 effectively simulate the use case.
Let’s get started…
The iFogSim project contains 7 folders and 1 text file. Following is the default view of the iFogsim project:
Here 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 these 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 is going to 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 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 results of the tested simulators 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 the quick analysis and 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 that is 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.
Whats else we have for you?
We have been working on a tutorial course titled “Essential iFogsim Tutorials” which right now contains over 2 hours of video content for the beginner level researchers, this course will be work in progress based on the feedback from its subscribers. We have committed ourselves to update its content until August 2021. I look forward to catch you on the course page.