Conversation
- Created a VmCloner class to store the Vm and Cloudlets Cloner Functions. It also defines the maximum number of VM clones to be created using a VmCloner object. Now, the HostFaultInjection class accepts a VmCloner object, instead of setting Vm Cloner and Cloudlets Cloner individually. - Changed the faultArrivalTimesGenerator into the HostFaultInjection class documentation to indicate the faultArrivalTimesGenerator is considered to be in hours (not minutes anymore). - Included a FaultToleranceLevel inside the JSON SLA Contracts (see SlaContract class). Now, the number of VMs to create for each broker is based on this k-fault-tolerance level. The AWS EC2 Template to be used to create these k VMs is based on the max price the customer is willing to pay hourly for all VMs. This way, the price for each VM template cannot be higher than maxPrice/k. If this is the case, the cheaper VM will be selected and the k will be recomputed to avoiding violating the contract price. If even the cheaper VM is more expensive than the contract price, it will be created only one instance of it, violating the contract price, but avoiding the customer services to be stopped.
# Conflicts: # cloudsim-plus/src/main/java/org/cloudsimplus/faultinjection/HostFaultInjection.java
manoelcampos
left a comment
There was a problem hiding this comment.
Just small changes.
| @Override | ||
| protected List<Vm> createVms(DatacenterBroker broker) { | ||
| final int numVms = (int) getTemplatesMap().get(broker).getMaxNumberOfVmsForCustomer(); | ||
| numVms = getContract(broker).getMinFaultToleranceLevel(); |
There was a problem hiding this comment.
Remove this numVms attribute and declare it as a final local variable.
There was a problem hiding this comment.
It is as an attribute of the class, since from the value of the amount of vms that have been set the cloudlets will be defined.
| * | ||
| * @return | ||
| */ | ||
| public double getPercentageOfCostMeetingSla() { |
There was a problem hiding this comment.
Renamed the method to getPercentageOfBrokersMeetingCost
| * inside the failed VM. | ||
| * | ||
| * @author raysaoliveira | ||
| * @since CloudSim Plus 1.2.2 |
|
|
||
| /** | ||
| * Gets the {@link Function} to be used to clone Vm's {@link Cloudlet}s. | ||
| * It is a Function which, when called, creates a clone of cloudlets |
There was a problem hiding this comment.
Change "It is a Function which, when called," to "When the given Function is called,"
| * Gets the maximum number of Vm clones to create. | ||
| * For instance, if this value is equal to 2, | ||
| * it means if all VMs from a given broker are destroyed multiple times, | ||
| * a clone will be created only 2 times. For the 3rd time all VMs are destroyed again, |
There was a problem hiding this comment.
Change "For the 3rd time all VMs are destroyed again, no clone will be created." to "If all VMs are destroyed again for the 3rd time, no clone will be created."
| private int clonedVmsNumber; | ||
|
|
||
| /** | ||
| * Creates a {@link Vm} cloner which creates the maximum of 1 clone. |
# Conflicts: # cloudsim-plus/src/main/java/org/cloudsimplus/faultinjection/VmCloner.java
Updates #81
New VmCloner Class
Introduces a
VmClonerclass to store theVmandCloudletsClonerFunctions. It also defines the maximum number of Vm clones to be created using aVmClonerobject.Now, the
HostFaultInjectionclass accepts aVmClonerobject, instead of setting aVmCloner andCloudletsCloner individually.Fault Arrival Times
Changed the
faultArrivalTimesGeneratorattribute into theHostFaultInjectionclass documentation to indicate the attribute is considered to be in hours (not minutes anymore).K-Fault-Tolerance Level
Included a
FaultToleranceLevelinside the JSON SLA Contracts (seeSlaContractclass). Now, the number of Vms to create for each broker is based on thisk-fault-tolerance level. The AWS EC2 Template to be used to createkVMs required to ensure such a fault-tolerance level is based on the max price the customer is willing to pay hourly for all VMs.This way, the price for each VM template cannot be higher than
maxPrice/k. If this is the case, the cheaper Vm will be selected and thekvalue will be recomputed to avoid violating the contract price. If even the cheaper Vm is more expensive than the contract price, it will be created only one instance of it. Such a condition violates the contract price, but avoids the customer services to be stopped.Available Examples