Course Content CloudSim


CloudSim Simulation Flow - A practical explanation

posted Apr 19, 2014, 2:03 AM by Anupinder Singh   [ updated Oct 21, 2016, 7:03 AM ]

CloudSim Events - Heartbeat of CloudSim Simulation(Previous)                                                                                                                                                    Back To Course Main Page



CloudSim Simulation process itself is a very interesting representation of state of the art object oriented system implementation. The simulation process has been spread across the set of classes performing some specific type of job. Only way to understand this simulation scenario is to use the debug code functionality. Following video explain in detail about how we can use the debug feature of ECLIPSE IDE to understand the cloudsim simulation process. This video is little lengthy as compared to other videos.

CloudSim Simulation Flow - A practical explanation


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


CloudSim Events - Heartbeat of CloudSim Simulation

posted Apr 12, 2014, 12:32 AM by Anupinder Singh   [ updated Oct 21, 2016, 7:03 AM ]

CloudSim Project Flow Reverse Engineering(Previous)                                                                                                           CloudSim Simulation Flow - A practical explanation(Next)



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 'CloudSimTags.java' 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 'simentity.java' class and also added a new class named as 'Printfile.java' 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. 

CloudSim Events - Heartbeat of CloudSim Simulation


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.

How to include custom Files Mentioned in Previous Video


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

Following is the modified code files:

CloudSim Project Flow Reverse Engineering

posted Apr 4, 2014, 8:09 AM by Anupinder Singh   [ updated Oct 21, 2016, 7:03 AM ]

CloudSimExample Step by Step Working(Previous)                                                                                                  CloudSim Events - Heartbeat of CloudSim Simulation(Next)



"Reverse engineering is the process of discovering the technological principles of a device, object, or system through analysis of its structure, function, and operation.It often involves disassembling something and analyzing its components and workings in detail, just to re-create it. Reverse engineering is done for maintenance or to create a new device or program that does the same thing, without using or understanding the original, or simply to duplicate it" - Wikipedia

In following video a very interesting and easy to use reverse engineering tool named 'Architexa' is demonstrated. This tool is available as plug-in on eclipse market and is free to download. It only as for your email id for registration purpose to use this tool as individual. This tool first index your project and then on the basis of that index it can create three levels of diagrams:
  1. Layered Diagram.
  2. Class Diagram.
  3. Sequence Diagram.
Each of these diagrams provided different level of details related  to class relationship, hierarchy, and the sequence of method/function call.

CloudSim Project Flow Reverse Engineering


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

CloudSimExample Step by Step Working

posted Apr 4, 2014, 7:40 AM by Anupinder Singh   [ updated Oct 21, 2016, 7:02 AM ]

Introduction to CloudSim Package(Previous)                                                                                                                                                     CloudSim Project Flow Reverse Engineering(Next)



Any Example that is provided in 'org.cloudbus.cloudsim.example' package provided in example folder of CloudSim project follows some standard steps to implement the specified configuration to start a simulation. To understand the working of CloudSim simulation framework, knowledge about these steps are must. There are eleven steps that are followed in each example with some variation in them, specified as follows:

  1. Set Number of users for current simulation. This user count is directly proportional to number of brokers in current simulation.
  2. Initialize the simulation, provided with current time, number of users and trace flag.
  3. Create a Data center.
  4. Create a Data center broker.
  5. Create a Virtual Machine(s).
  6. Submit Virtual Machine to Data center broker.
  7. Create Cloudlet(s) by specifying there characteristics.
  8. Submit Cloudlets to Data center broker.
  9. Send call to Start Simulation.
  10. Once no more event to execute, send call to Stop Simulation.
  11. Finally print the final status of the Simulation.


CloudSimExample Step by Step Working


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

Introduction to CloudSim Package

posted Apr 4, 2014, 7:25 AM by Anupinder Singh   [ updated Oct 21, 2016, 7:02 AM ]

Simulation Environment Introduction(Previous)                                                                                                                                                       CloudSimExample Step by Step Working(Next)



The CloudSim Project is structured as java custom packages,where each package will contain the correlated classes in it. This project has in twelve packages as follows:
  1. org.cloudbus.cloudsim: This package contains classes that once instantiated will behave like some component in the system or support a specific component of the system for producing its relevant behavior during the simulation process. This package can be broadly categorized into two sections:
    • Simulating Components Classes: These are the set of classes that imitates a particular part of cloud setup. These are the classes that come under this category: Cloudlet, datacenter, datacenterbroker,host,storage,hardrivestorage, SANstorage,PE,datacloudTags & VM.
    • Policy Classes: These are the set of classes that imitate the policy behavior of a cloud component. Following are the classes that comes under this category: VMAllocationPolicy, CloudLetSchedulingPolicy, VMSchedulingPolicy,UtilizationModel and each of these class has there variants implemented in this package.
  2. org.cloudbus.cloudsim.core: This package contains the main classes of this project and are directly responsible for initiating(CloudInformationService.java, Cloudsim.java), starting(Cloudsim.java), maintaining(Cloudsim.java, SimEntity.java, SimEvent.java, FutureQueue.java and DeferedQueue.java) and end the simulation process(Cloudsim.java). This package contains a class 'cloudsimtags.java' this class contains all the event identifiers that are been implemented in datacenter and datacenterbroker class.  
  3. org.cloudbus.cloudsim.core.predicates:  This package classes are responsible for selecting matching events from deferredqueue class object during the simulation process for executing the event on specific entity.
  4. org.cloudbus.cloudsim.distributions: This package contain classes that have predefined network traffic distribution methods implemented in them. Classes defined here are: ContinuousDistribution,ExponentialDistribution etc
  5. org.cloudbus.cloudsim.lists: This package contain classes implementing predefined operations related to component list during simulation. Lists classes specified in this package are: CloudLetList, HostList, PeList, ResCloudLetList and VMList.
  6. org.cloudbus.cloudsim.network: This package hold the classes that produce behavior related to network packet routing.
  7. org.cloudbus.cloudsim.network.datacenter: This package contain classes to produce a simulation behavior for geographically distributed data centers of cloud service providers.
  8. org.cloudbus.cloudsim.power / org.cloudbus.cloudsim.power.lists/ org.cloudbus.cloudsim.power.models : In these packages the org.cloudbus.cloudsim package classes are extended to produce behavior for power aware components. These packages cab be used to implement green computing related work.
  9. org.cloudbus.cloudsim.provisioners: Classes in this package contains policies related to allocation of Bandwidth, Processing elements and RAM. Default policy implemented here is 'Best effort allocation policy'.
  10. org.cloudbus.cloudsim.util: Classes in this package provide the basic utility operations related to perform some math operations related to cloud computing services or some calculation of execution time during the simulation process.
In following video we have looked into these packages and discussed about few important classes and their role in simulation process:

Introduction to CloudSim Package


NOTE: In case your are not able to view video on this page Click Here.



Simulation Environment Introduction

posted Apr 4, 2014, 6:42 AM by Anupinder Singh   [ updated Oct 21, 2016, 7:02 AM ]

Download & Configure CloudSim(Previous)                                                                                                                                                                          Introduction to CloudSim Package(Next)



As CloudSim simulates real time entities of the cloud environment. It helps you to understand the behavior of any specific application configuration instances without even deploying it on the real cloud platform. In the following video demonstration we discussed about the general simulated entities, what exactly they work for and how they are interdependent on each other to provide the exact simulated behavior like the real clouds such as EC2, Azure, Google compute etc. The components that were discussed in this video are: CloudInformationService, Data Center, Broker, Host, Virtual Machine and  Cloudlets.

Simulation Environment Introduction

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

THIS VIDEO WILL BE BEST VIEWED IN 480p QUALITY SETTINGS. 


Download & Configure CloudSim

posted Apr 4, 2014, 6:08 AM by Anupinder Singh   [ updated Mar 4, 2017, 6:48 PM ]

Course Main Page
                                                                                                                                                                                                                      Simulation Environment Introduction(NEXT Tutorial) >>>>



Before you start working on CloudSim project you first need to configure it correctly. As this Cloudsim simualtion toolkit is developed using java language, you can use any IDE that supports java language development environment like netbeans, eclipes etc. This Cloudsim Tutorial will help you to setup it up using Eclipse IDE.

Here We have used Eclipse Java IDE to configure CloudSim simulation toolkit. Following video demonstrates how to configure CloudSim 3.0.3 on ECLIPSE Java IDE.

Download & Configure CloudSim on Eclipse



NOTE: In case your are not able to view video on this page Click Here.


To configure/setup Cloudsim Simulation Toolkit(version 3.0.3) in ECLIPSE Java IDE follow following steps :

Step 1: Open Eclipse Java IDE and open File > New > Java Project. It will open a Dialog box named 'New Java Project'

Create a new Java project


Step 2: In following dialog, enter 'Project Name' > uncheck 'Use Default Location' > browse the path of your cloudsim simulation toolkit unzipped folder and then Click NEXT.

Enter Name and browse the path of existing unzipped cloudsim simulation toolkit


Step 3:  To successfully configure CloudSim Simulation toolkit we have to download a file named 'commons-math3-3.6.1-bin.zip', this file can be downloaded from 'http://commons.apache.org/proper/commons-math/download_math.cgi' and extract 'commons-math3-3.6.1.jar'. 

Download commons-math3-3.6.1.zip


Step 4: In following dialog box go to 'Libraries' tab. Here to add 'commons-math3-3.6.1.jar' we have to click on 'Add External Jar' and then browse the path on which you have downloaded 'commons-math3-3.6.1.jar' file. Add it to the list by clicking on open

Add External Jar

Browse Commons-math3-3.6.1.Jar file



Step 5: Finally click on 'Finish' button. After which eclipse will automatically build your this CloudSim project.

Click on Finish button


 




All required resources can be downloaded below mentioned links: 

Cloudsim Project Link: http://code.google.com/p/cloudsim/downloads/list or https://github.com/Cloudslab/cloudsim/releases/tag/cloudsim-3.0.3



1-7 of 7