# Simulating Fog and Edge Computing Scenarios: An Overview and Research Challenges
## 3 Fog and Edge Modelling and Simulation Tools
It is also worth noting that as the fog computing paradigm has many similarities to cloud computing, _CloudSim_ can also be used as a standalone application to implement many features of fog computing. _iFogSim_ is not without its limitations. While it enables the definition of the location of devices getting service from the fog servers, this information is static and not updated by any mobility model. In addition, while being based on _Cloudsim_ provides advantages, _iFogSim_ is limited to DES and its scalability is limited. Both _EdgeCloudSim_ and _IOTsim_, like _iFogSim_, are also based on _CloudSim_. _EdgeCloudSim_ is specifically design to evaluate the computational and networking needs of edge computing. Unlike_iFogSim_, _EdgeCloudSim_ supports mobility. In fact, it provides the mobility model, network link model, and edge server model to evaluate the various facets of edge computing. In addition to its simulation capabilities, _EdgeCloudSim_ is relatively user-friendly providing a mechanism to obtain the configuration of devices and applications from the XML files instead of defining them programmatically. _IOTSim_ was designed to simulate edge computing environments where large data volumes are sent to a big data processing system by the IoT application [65]. As such, it adds a storage and the big data processing layer in to _CloudSim_. In the storage layer, the network and storage delays are simulated for IoT applications. The big data processing layer simulates MapReduce to support the batch-oriented data processing paradigm. Both _EdgeCloudSim_ and _IOTSim_ inherit the same scalability and DES limitations as _iFogSim_. [PERSON] et al. [66] recently presented a prototype simulator, _FogTorchII_, that extends their previous work, _FogTorch_[67]. Primarily designed to support application deployment in the fog, _FogTorchII_ is an open source simulator developed in Java. It is capable of evaluating fog computing infrastructure deployments, it models software capabilities (operating system, programming languages, frameworks, etc. ), hardware capabilities (CPU cores, RAM and storage), and QoS attributes including latency and bandwidth. _FogTorchII_ uses Monte Carlo simulations to implement variations in communications links used as inputs. The final output consists of the aggregated results in terms of QoS-assurance and fog resource consumption through an indicator of the percentage of consumed RAM and storage. An acknowledged and major limitation of _FogTorchII_ is scalability, an issue that [PERSON] et al. [66] hope to address by exploiting heuristics to reduce the search space [66]. Simulations make several simplifications that may not always hold true, especially with an infrastructure as dynamic as fog and edge computing. As such, several emulation frameworks were developed to address this limitation. _EmuFog_ is an extensible emulation framework tailored for fog computing scenarios [68]. _EmuFog_ enables the design of fog computing infrastructures ab initio and the emulation of real large scale applications and workloads which allows developers to implement and evaluate their behaviour as well as the induced workload in the network topology. The implementation process in _EmuFog_ consists of four stages:  
1. A network topology is either generated or loaded from a file, supporting thus real-world topology datasets. 2. The network topology is converted in an undirected graph, where nodes represent network devices (e.g., routers) and links correspond to the connections between them. 3. The edge devices are determined and the fog nodes are placed according to a placement policy. Users are able to define the computational capabilities of fog nodes as well as the number of clients expected to be served by each node. 4. Fog nodes are emulated from the network emulated environment, while the applications in any individual fog node are running under Docker containers. Despite the usefulness of the _EmuFog_, the framework does not support mobility both for clients and fog nodes.