CloudSim Events - Heartbeat of CloudSim Simulation

Post date: Apr 12, 2014 7:32:53 AM

The simulation of cloudsim is dependent of the series of event that occur in some specific order. Without this order the simulation is not possible, these event are coded in different class methods and their associative calls. We have studied in our first video where we setup the relation and flow of entities initialization, this same has been extended in this page but here specific to the events and its flow. Following figure shows how each entity during simulation communicate with each other using some code words for events:

CloudSim Entity Events WorkFlow

These events has a specific structure which is defined in the "SimEvent.Java" class of "org.cloudbus.cloudsim.core" package. This structure hold following set of information:

  1. Event Type(etype) : specifies the type of event for simulation. This is of four types:
    • ENULL : Null event means nothing is to be done.
    • SEND : defines an event is sent from one entity to other for execution.
    • HOLD_DONE : Hold the simulation process.
    • CREATE : No specific details available till date, will be updated after detailed analysis.
  2. Event Start Time(time) : Defines the start time of the event during the simulation.
  3. Event time spent in waiting before execution(endWaitingTime) : Defines the time spent in waiting queue.
  4. Event Source entity(entSrc) : Define which entity is requesting the event for processing
  5. Event Destination Entity(entDst) : Defines which entity will actually execute/process the event as per 'tag' value.
  6. Event Tag(tag): This defines what type of behavior is to be simulated. These tags values has a predefined event values associated is them, which are defined in '' class.
  7. Event associated data to be processed(data) - this is optional and depend on what type of event tag is associated with event.

Every tag value will have its corresponding implementation in "processevent()" method of the destination entity class, to produce a certain type of behavior or in-turn request a new event. Please watch the following video to understand the role of events in cloudsim simulation flow. I have made added few set of java code lines in '' class and also added a new class named as '' in 'org.cloudbus.cloudsim.core' package. Link to both files are provided at bottom of this page, you can download them and add to your cloudsim setup to produce a similar type of behavior as this video produces. Also I have attached the custom log file which was generated in video demonstration.

Note: In case you are not able to view video on this page Click Here.

Following Video will demonstrate how to include the files in your own cloudsim project mentioned in the end of this page. Do watch this video to avoid any errors to occur in your cloudsim project.