If you are a student or a researcher working in Cloud computing domain, then you must have heard about CloudSim framework. It’s a framework for modeling and simulation of cloud computing infrastructures and services. CloudSim supports modeling and simulation of cloud computing data centers, virtualized hosts, allocation policies, network topologies and message passing applications. Moreover, the framework can be integrated with Eclipse and NetBeans, allowing you to code in Java. This tutorial will help you to understand CloudSim toolkit and how to integrate it with NetBeans IDE. If you want a GUI for creating datacenter, hosts, virtual machines, customize configurations, then you need to install CloudReports.
There are few entities you need to understand before using CloudSim.
- Datacenter: Set of hosts that runs virtual machines.
- Datacenter Broker : This broker is responsible for submitting VM provisioning requests to the datacenter and then submitting tasks to VMs.
- Host : The machine that runs and manages the virtual machine.
- VM: A software representation of a machine that can process tasks.
- Cloudlet – A task or an application that actually runs in VM.
How to Integrate CloudSim Framework with NetBeans IDE?
- Download NetBeans and Install it.
- Download CloudSim and unzip it.
- Once Netbeans IDE is installed, start creating a new Project via File > New Project. Choose “Java” under Categories and “Java Application” under Projects.
Name your project and click “Finish” button.
On the left sidebar, right click on the project and select “Properties” as shown below:
In the properties dialog, select “Libraries” and click on “Add Library” button at the right. In the “Add Library” dialog, select cloudsim jar file (will be located in jars folder) downloaded in step 2. Now you can drag and drop example programs (under examples/org/cloudbus/cloudsim) from the CloudSim directory into your application. That’s it, your CloudSim toolkit it ready to use.
Expand org.cloudbus.cloudsim.examples folder to find all example programs. Select your desired example and start running the simulation. The output will be displayed at the bottom pane as shown below:
Go through the example programs carefully and edit to your needs.