Skip to content

Updates #81#105

Merged
manoelcampos merged 7 commits intocloudsimplus:masterfrom
RaysaOliveira:master
Jun 5, 2017
Merged

Updates #81#105
manoelcampos merged 7 commits intocloudsimplus:masterfrom
RaysaOliveira:master

Conversation

@RaysaOliveira
Copy link
Copy Markdown
Contributor

@RaysaOliveira RaysaOliveira commented Jun 5, 2017

Updates #81

New VmCloner Class

Introduces 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 a Vm Cloner and Cloudlets Cloner individually.

Fault Arrival Times

Changed the faultArrivalTimesGenerator attribute into the HostFaultInjection class documentation to indicate the attribute is considered to be in hours (not minutes anymore).

K-Fault-Tolerance Level

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 k VMs 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 the k value 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

- 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
Copy link
Copy Markdown
Collaborator

@manoelcampos manoelcampos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just small changes.

@Override
protected List<Vm> createVms(DatacenterBroker broker) {
final int numVms = (int) getTemplatesMap().get(broker).getMaxNumberOfVmsForCustomer();
numVms = getContract(broker).getMinFaultToleranceLevel();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this numVms attribute and declare it as a final local variable.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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() {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed the method to getPercentageOfBrokersMeetingCost

* inside the failed VM.
*
* @author raysaoliveira
* @since CloudSim Plus 1.2.2
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change "@SInCE CloudSim Plus 1.2.2" to "@SInCE CloudSim Plus 1.2.3"


/**
* 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
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change "Creates a {@link Vm} cloner which creates the maximum of 1 clone." to "Creates a {@link Vm} cloner which makes the maximum of 1 Vm clone."

manoelcampos and others added 4 commits June 5, 2017 18:01
# Conflicts:
#	cloudsim-plus/src/main/java/org/cloudsimplus/faultinjection/VmCloner.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants