Skip to content

RayCloudSim: A Simulator Written in Python for Cloud, Fog, or Edge Computing

Notifications You must be signed in to change notification settings

EdgeComputeSimSet/RayCloudSim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RayCloudSim: A Simulator Written in Python for Cloud, Fog, or Edge Computing

Star History Chart

I. Introduction

RayCloudSim is a simulator written in Python for analytical modeling in cloud, fog, or edge computing environments.

RayCloudSim is a lightweight simulator written in Python for analytical modeling and simulation of Cloud/Fog/Edge Computing infrastructures and services.

RayCloudSim has the following advantages:

  • Compact source code, which is easy to read, understand and customize according to individual needs.
  • It is a process-based discrete-event simulation framework and can be performed "as fast as possible", in wall clock time.
  • It is easy to integrate with machine learning frameworks such as PyTorch, TensorFlow, and other Python-based ML frameworks.

RayCloudSim can be used for the following research topics:

  • Performance and cost analysis of cloud computing and edge computing
  • Traffic analysis of complex networks
  • Research on resource management and scheduling strategies for large-scale distributed systems
  • Research on task allocation and scheduling algorithms
  • Research on deployment of specific devices, such as parameter servers in federated learning.
  • ...

II. Requirements & Installation

  • python >= 3.8

    previous version might be OK but without testing.

  • numpy

  • networkx

  • simpy

The following packages are optional for visualization.

  • matplotlib
  • plotly
  • kaleido

Commands for configuring the RayCloudSim using Anaconda:

conda create --name raycloudsim python=3.8
conda activate raycloudsim
conda install -c anaconda numpy
conda install -c conda-forge matplotlib
conda install -c anaconda networkx
conda install -c conda-forge simpy
conda install -c plotly plotly
conda install -c conda-forge python-kaleido

III. Set Sail

1. Hello World

# Create the Env
env = Env(scenario=Scenario())

# Begin Simulation
task = Task(task_id=0,
            max_cu=10,
            task_size_exe=20,
            task_size_trans=10,
            bit_rate=20,
            src_name='n0')

env.process(task=task, dst_name='n1')

env.run(until=10)

env.close()

Simulation log:

[0.00]: Task {0} generated in Node {n0}
[4.00]: Task {0} arrived Node {n1} with {4.00}s
[6.00]: Task {0} accomplished in Node {n1} with {2.00}s
[10.00]: Simulation completed!

2. Guides

  • The following figure presents the framework of RayCloudSim, which consists of two main components:Env and Task:
RayCloudSim 的框架架构

3. Tutorials

The following scripts can be used as progressive tutorials.

The following figure illustrates a visualization example:

可视化示例

IV. Development Plan

1. TODO

  • The basic version. (2023/05/10)
  • Module Zoo, such as WirelessNode, etc. (2023/10/24)
  • Add buffer in computing nodes for task queue. (2023/11/10)
  • Support using wireless nodes as relay communication nodes?
  • Modeling of energy consumption.
  • Package and publish to PyPI.

2. Contribute Code to RayCloudSim

We welcome any contributions to the codebase. The branch main is protected, and we recommend that you submit/push code to branch dev.

Citation

To cite this repository, you can use the following BibTeX entry:

@article{zhang2022osttd,
  title={OSTTD: Offloading of Splittable Tasks with Topological Dependence in Multi-Tier Computing Networks},
  author={Zhang, Rui and Chu, Xuesen and Ma, Ruhui and Zhang, Meng and Lin, Liwei and Gao, Honghao and Guan, Haibing},
  journal={IEEE Journal on Selected Areas in Communications},
  year={2022},
  publisher={IEEE}
}

Besides, RayCloudSim is inspired by LEAF and the following citation is also recommended.

@inproceedings{WiesnerThamsen_LEAF_2021,
  author={Wiesner, Philipp and Thamsen, Lauritz},
  booktitle={2021 IEEE 5th International Conference on Fog and Edge Computing (ICFEC)}, 
  title={{LEAF}: Simulating Large Energy-Aware Fog Computing Environments}, 
  year={2021},
  pages={29-36},
  doi={10.1109/ICFEC51620.2021.00012}
}

More

About

RayCloudSim: A Simulator Written in Python for Cloud, Fog, or Edge Computing

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%