# Simulating Fog and Edge Computing Scenarios: An Overview and Research Challenges
## 3 Fog and Edge Modelling and Simulation Tools  
According to [PERSON] and [PERSON] [58], in order to enable real-time analytics in fog and edge computing at the software-level, we must be concerned about different resource management and scheduling techniques including resource distribution, load balancing, migration, and consolidation. At the physical layer, fog and edge systems have many additional requirements that need to be addressed, such as network connectivity and capacity. This scale and complexity of C2T systems makes the use of realistic prototypes unfeasible. Similarly, commercial service providers typically do not give the necessary infrastructure access or control to third parties to test aforementioned techniques [10] and constructing a test bed with a high degree of verisimilitude is both complex, costly, resource and time-intensive. To overcome these issues, simulation frameworks provide a relatively low cost means to understand and evaluate fog and edge systems and eliminate ineffective policies and strategies [59]. Simulation has been used extensively to simulate traditional network infrastructures, such as the mainstream Wireless Sensor Networks (WSNs). Some examples of these simulators are _NS-2_, _TOSSIM_, _EmStar_, _OMNeT++_, _J-Sim_, _ATEMU_, and _Avrora_. These simulators are universally used to develop and test network protocols, especially in the initial design stage. They were not designed with fog and edge computing environments in mind; as such, they are outside the scope of this paper. We redirect the reader to a detailed survey by [60] for further information on these simulators. While there are a wide range of simulators for cloud computing, there are relatively few that can be used to simulate fog and edge computing scenarios. Next, we briefly describe a selection of prominent simulators used for fog and edge modelling and compare them in qualitative terms. _FogNetSim++_[61] is a fog simulator tool that provides users with detailed configuration options to simulate a large fog network. It is designed on the top of _OMNeT++_[62] which is an open source tool that provides an extensive library to simulate network characteristics using discrete event simulation. _FogNetSim++_ enables researchers to incorporate customised mobility models and fog node scheduling algorithms as well as managing handover mechanisms. A traffic management system is evaluated to demonstrate the scalability and effectiveness of the _FogNetSim++_ simulator in terms of CPU and memory usage. The authors provide a benchmark of network parameters, such as execution delay, packet error rate, handovers, and latency. However, _FogNetSim++_ does not yet support VM migration among fog nodes. _iFogSim_[63] is a fog computing simulation toolkit that allows users to simulate fog computing infrastructures and execute simulated applications in order to measure performance in terms of latency, energy consumption and network usage. _iFogSim_ is based and implemented on _CloudSim_[50]. _iFogSim_ enables the modelling and simulation of fog computing environments for evaluating resource-management and scheduling policies. It measures performance metrics and simulates edge devices, cloud data-centres, sensors, network links, data streams, and stream-processing applications. In addition, _iFogSim_ integrates simulated services for power monitoring and resource management at two separate levels i.e., application placement and the application scheduling. Two application module placement strategies are packaged to support multiple deployment scenarios, namely, (a) cloud-only placement, where all applications modules run in data centres and (b) edge-ward placement, where application modules run on fog nodes close to edge devices [59]. Furthermore, extensions are available to support the design of data placement strategies according to specific objectives such as minimisation of service latency, network congestion, and energy consumption [64].