项目作者: acsicuib

项目描述 :
Yet Another Fog Simulator (YAFS)
高级语言: Python
项目地址: git://github.com/acsicuib/YAFS.git
创建时间: 2018-02-27T09:23:01Z
项目社区:https://github.com/acsicuib/YAFS

开源协议:MIT License

下载


YAFS logo

YAFS (Yet Another Fog Simulator) is a simulator tool based on Python of architectures such as: Fog Computing ecosystems for several analysis regarding with the placement of resources, cost deployment, network design, … IoT environments are the most evident fact of this type of architecture. YAFS is published at IEEE.

The highlights points of YAFS are:

  • Dynamic topology: entities and network links can be created or removed along the simulation.
  • Dynamic creation of messages sources: sensors can generate messages from different point access along the simulation.
  • And for hence, the placement allocation algorithm and the orchestration algorithm, that are extended by the user, can run along the simulation.
  • The topology of the network is based on Complex Network theory. Thus, the algorithms can obtain more valuable indicators from topological features.
  • The results are stored in a raw format in a nosql database. The simpler the format, the easier it is to perform any type of statistics.

YAFS is released under the MIT License. However, we would like to know in which project or publication have you used or mentioned YAFS.

Please consider use this cite when you use YAFS:

  1. Isaac Lera, Carlos Guerrero and Carlos Juiz. YAFS: A simulator for IoT scenarios in fog computing. IEEE Access. Vol. 7(1), pages 91745-91758,
  2. 10.1109/ACCESS.2019.2927895, Jul 10 2019.

Bibtex:

  1. @ARTICLE{8758823,
  2. author={I. {Lera} and C. {Guerrero} and C. {Juiz}},
  3. journal={IEEE Access},
  4. title={YAFS: A Simulator for IoT Scenarios in Fog Computing},
  5. year={2019},
  6. volume={7},
  7. number={},
  8. pages={91745-91758},
  9. keywords={Relays;Large scale integration;Wireless communication;OFDM;Interference cancellation;Channel estimation;Real-time systems;Complex networks;fog computing;Internet of Things;simulator},
  10. doi={10.1109/ACCESS.2019.2927895},
  11. ISSN={2169-3536},
  12. month={},
  13. }

Resources

YAFS tutorial (https://yafs.readthedocs.io/en/latest/introduction/index.html)
and user guide (https://www.slideshare.net/wisaaco/yet-another-fog-simulator-yafs-user-guide) are a good starting
point for you. You can also try out some of the Examples (https://yafs.readthedocs.io/en/latest/examples/index.html) shipped with
YAFS but in any case you have to understand the main concepts of Cloud Computing and other related architectures to design and modelling your own model.

Installation

YAFS3 (the branch) supports Python 3.6+ (last compability check on Python 3.9.7)

  1. Clone the project in your local folder:
  1. git clone --branch YAFS3 https://github.com/acsicuib/YAFS
  1. Install dependencies.
  1. cd YAFS/
  2. pip install -r requirements.txt

Getting started

To run tutorial or example projects from a terminal, run the following code (please update the paths according with your system). Alternativaly, you can use a python editor such as: Pycharm, Visual Studio, etc.

  1. export PYTHONPATH=$PYTHONPATH:~/YAFS/src/
  2. cd YAFS/tutorial_scenarios/01_basicExample
  3. python main.py

The tutorial scenarios are in the folder:

  1. tutorial_scenarios
  2. ├── 01_basicExample
  3. ├── 02_serviceMovement
  4. ├── 03_topologyChanges
  5. └── 04_userMovement

More complex examples or published projects are in the folder examples:
Note: they are working with python 3.10.8

  1. examples
  2. ├── ConquestService # tested. Published at [6]
  3. ├── DynamicAllocation # tested. Published at [1]
  4. ├── DynamicFailuresOnNodes # tested. Published at [1]
  5. ├── DynamicWorkload # tested. Published at [1]
  6. ├── FogCentrality # works on YAFS2 (aka. master branch). Published at [2]
  7. ├── FogTorchPI-Integration # works on YAFS2. An integration with: https://github.com/di-unipi-socc/FogTorchPI
  8. ├── MCDA # works on YAFS2. Published at [5]
  9. ├── MapReduceModel # works on YAFS2. Published at [3]
  10. ├── PartitionILPPlacement # works on YAFS2. Published at [4]
  11. ├── RuleBasedDistributedModel # works on YAFS2. Project to analyze the feasibility of a more complex proposal: [7,8]
  12. ├── TestJsons # works on YAFS2. A basic project to check JSON formats. NM.
  13. ├── Tutorial # works on YAFS2. iFogSim examples but in YAFS [1]
  14. ├── Tutorial_JSONModelling # works on YAFS2. Examples in yafs' readthedocs.
  15. ├── VRGameFog-IFogSim-WL # works on YAFS2. EGG_GAME by IFogSim implementation [1]
  16. └── mobileTutorial # works on YAFS2. An unpublished extension to incorporate general functions on dynamic connections.

The YAFS tutorial is a good starting
point for you. You can also try out some of the Examples shipped with
YAFS but in any case you have to understand the main concepts of Cloud Computing and other related architectures to design and modelling your own model.

Graph animations

As you can implement events (custom strategies), you can generate plots of your network in each event. Thus, you can store png files and at the end of your simulation, you generate a video with the combination all of them using ffmpeg command.

You can find some examples in the following src/examples: DynamicWorkloads, ConquestService, and mobileTutorial. From DynamicWorkload folder and ConquestService, we have generate the following animations:

  1. ffmpeg -r 1 -i net_%03d.png -c:v libx264 -vf fps=1 -pix_fmt yuv420p out.mp4
  2. ffmpeg -i out.mp4 -pix_fmt rgb24 out.gif

Documentation and Help

The documentation contains a tutorial, the architecture design explaining key
concepts, a number of examples and the API reference.

For more help, contact with the authors or You must dig through the source code

Changelog

  • jun / 27 / 2022 Fixing bugs in old examples and tested the project in python 3.9.7 version. Improved examples and add code that analyse some basic results.
  • sep. / 12 / 2019 Fixing bugs - All projects work with the attributes defined in the graph var (topology class) using NX library to manage the attributes.
  • may / 23 / 2019 New improvements are included. Highlight that workloads/users and mobile endpoints can be represented through gpx traces. Geopositional libraries are required
  • june / 25 / 2018 Bug Fixed - The DES.src metric of the CSV results is fixed. Identifies the DES-process who sends the message
  • june / 20 / 2018 Messages from sources have an unique identifier that is copied in all the transmissions. We can trace each application invocation.

Acknowledgment

  • Authors acknowledge financial support through grant project ORDCOT with number TIN2017-88547-P (AEI/FEDER, UE)
  • Thanks to the small community of contributors who have been improving the code and providing new suggestions over the years.

REFERENCES

YAFS is used in the following projects:

  • [1] Isaac Lera, Carlos Guerrero, Carlos Juiz. YAFS: A simulator for IoT scenarios in fog computing. IEEE Access. Vol. 7(1), pages 91745-91758, 10.1109/ACCESS.2019.2927895, Jul 10 2019.
  • [2] Isaac Lera, Carlos Guerrero, Carlos Juiz. Comparing centrality indices for network usage optimization of data placement policies in fog devices. FMEC 2018: 115-122
  • [3] Carlos Guerrero, Isaac Lera, Carlos Juiz. Migration-Aware Genetic Optimization for MapReduce Scheduling and Replica Placement in Hadoop. Journal of Grid Computing 2018. 10.1007/s10723-018-9432-8
  • [4] Isaac Lera, Carlos Guerrero, Carlos Juiz. Availability-aware Service Placement Policy in Fog Computing Based on Graph Partitions. IEEE Internet of Things Journal 2019. 10.1109/JIOT.2018.2889511
  • [5] Isaac Lera, Carlos Guerrero, Carlos Juiz. Analysing the Applicability of a Multi-Criteria Decision Method in Fog Computing
    Placement Problem. FMEC 2019
  • [6] Isaac Lera, Carlos Guerrero, and Carlos Juiz. Algoritmo descentralizado para la asignación de servicios en arquitecturas de Fog Computing basado en un proceso expansivo de migración de instancias. Jornadas Sarteco, 2019.
  • [7] Forti, S, Lera, I, Guerrero, C, Brogi, A. Osmotic management of distributed complex systems: A declarative decentralised approach. J Softw Evol Proc. 2021;e2405. doi:10.1002/smr.2405
  • [8] Brogi, A., Forti, S., Guerrero, C. et al. Declarative Application Management in the Fog. J Grid Computing 19, 45 (2021). https://doi.org/10.1007/s10723-021-09582-y

Please, send us your reference to publish it! and of course, feel free to add your references or works using YAFS!

Consumo_E_1647585269175.pdf
HopCount_E_1647585269224.pdf
QSR-Random_1647585270933.pdf
Boxplot_XS_1647585271075.pdf
centralityvsresources_1647585271080.pdf
deadlinevsdistance_1647585271083.pdf
deadlinevsinstances_1647585271087.pdf
distancevsrequest_1647585271091.pdf
nodeidvsrequest_1647585271094.pdf
nodeidvsservid_1647585271098.pdf
YAFS_userguide_v1_1647585268064.pdf
Lobster_1647585268819.pdf
BoxPlot_ResponseAppUser_0_1647585268827.pdf
Consumo_A_1647585268869.pdf
HopCount_A_1647585268889.pdf
BoxPlot_ResponseAppUser_Sim_0_1647585268902.pdf
Consumo_B_1647585268905.pdf
HopCount_9_1647585268909.pdf
HopCount_B_1647585268913.pdf
Consumo_C_1647585268976.pdf
HopCount_C_1647585268988.pdf
BoxPlot_ResponseAppUser_Sim_0_1647585269042.pdf
Consumo_D_1647585269076.pdf
HopCount_D_1647585269122.pdf
Lobster_1647585268819.pdf
BoxPlot_ResponseAppUser_0_1647585268827.pdf
Consumo_A_1647585268869.pdf
HopCount_A_1647585268889.pdf
BoxPlot_ResponseAppUser_Sim_0_1647585268902.pdf
Consumo_B_1647585268905.pdf
HopCount_9_1647585268909.pdf
HopCount_B_1647585268913.pdf
Consumo_C_1647585268976.pdf
HopCount_C_1647585268988.pdf
BoxPlot_ResponseAppUser_Sim_0_1647585269042.pdf
Consumo_D_1647585269076.pdf
HopCount_D_1647585269122.pdf
Consumo_E_1647585269175.pdf
HopCount_E_1647585269224.pdf
QSR-Random_1647585270933.pdf
Boxplot_XS_1647585271075.pdf
centralityvsresources_1647585271080.pdf
deadlinevsdistance_1647585271083.pdf
deadlinevsinstances_1647585271087.pdf
distancevsrequest_1647585271091.pdf
nodeidvsrequest_1647585271094.pdf
nodeidvsservid_1647585271098.pdf