Descrete Event Simulation - Queues and Erasure Coding

Code

Abstract

Simulations are scalable and cheap and represent a trade-off between scalability and precision.

We represents events through a queue, sorted by the time at which they happen.

The system state is updated at each event: in particular, what changes is the time of the simulation, which keeps increasing until the upper limit time is reached.

The implementation of the event queue exploits an efficient data structure: a priority queue (binary heap).


We simulate events to analyze key parameters changes in the context of:

  • Load Balancing: handle multiple queues of jobs that arrive and leave in a probabilistic and memoryless fashion.
  • Erasure Coding: minimize the cost of storing data while keeping them safe.