Search code examples
javaclouddata-migrationcloudsim

How to migrate Cloudlets in CloudSim Plus?


I wanted to know if there was a feature in CloudSim Plus that allows the migration of Cloudlets. This means that a Cloudlet could be executing on a VM or is waiting to be executed on a VM and can be sent to another VM (which may be in another data center) to be executed instead. In the CloudSim Plus API, I only see VM allocation policies for migration and nothing about Cloudlet migration.


Solution

  • CloudSim Plus doesn't have any way to migrate Cloudlets. In real cloud computing environments we don't migrate Cloudlets but containers ir VMs instead. This VM/container can host Cloudlets that are currently executing and can be migrated to another datacenter to continue execution. In this way (with VMs/containers) it makes sense to migrate Cloudlets. VMs/Containers are needed to encapsulate the dependencies and configurations of an application. Cloudlet migration is a complex task that can't be done automatically. It is hard to determine the dependencies and configurations that must be migrated to allow an application (Cloudlet) to execute.

    According to the main developer of CloudSim and CloudSim Plus:

    However, CloudSim Plus doesn't support container abstration and it's not intended to support in the short or medium term. CloudSim 4 includes container support, but the way this feature was implemented (literally by copying and pasting entire packages of classes) made us to create CloudSim Plus as an independent fork.

    It's also important to understand when a Cloudlet is mapped to a Vm at runtime, it can't be changed because this would allow for Cloudlet migration to a different Vm which isn't allowed by CloudSim. As an alternative you could try defining your own policy to map incoming Cloudlets to Vms at run time/dynamically (chose Vms to execute a Cloudlet).

    You can do this by extending the DatacenterBrokerSimple class and by changing the defaultVmMapper() method. If your policy fails to map a Cloudlet to a Vm, it will call the defaultVmMapper in DatacenterBrokerSimple.

    The setVmMapper() method in DatacenterBrokerSimple lets you define a policy to map Cloudlets to a Vm at runtime (it sets the appropriate mapper method). This method can be used to change the policy at run time.

    To learn more about this refer to the 2 CloudSim Plus Google Group Forums: 1, 2.