task flow and network from mobile device to edge orchestrator is modified

1- finding which device to offlod is decided in edge orchestrator
(EdgeOrchestrator), instead of deciding while generating task
(LoadGeneratorModel)
2- file logging option is now read from config file
3- minor modification on the network delay calculation
This commit is contained in:
Cagatay Sonmez
2017-02-26 14:07:47 +03:00
parent 81fed10dd0
commit 22b654d719
9 changed files with 128 additions and 57 deletions

View File

@@ -44,7 +44,23 @@ public class BasicEdgeOrchestrator extends EdgeOrchestrator {
}
@Override
public EdgeVM selectVm(Task task) {
public int getDeviceToOffload(Task task) {
int result = SimSettings.GENERIC_EDGE_DEVICE_ID;
if(!simScenario.equals("SINGLE_TIER")){
//decide to use cloud or cloudlet VM
int CloudVmPicker = SimUtils.getRandomNumber(0, 100);
if(CloudVmPicker <= SimSettings.getInstance().getTaskLookUpTable()[task.getTaskType().ordinal()][1])
result = SimSettings.CLOUD_DATACENTER_ID;
else
result = SimSettings.EDGE_ORCHESTRATOR_ID;
}
return result;
}
@Override
public EdgeVM getVmToOffload(Task task) {
if(simScenario.equals("TWO_TIER_WITH_EO"))
return selectVmOnLoadBalancer(task);
else

View File

@@ -30,8 +30,13 @@ public abstract class EdgeOrchestrator {
*/
public abstract void initialize();
/*
* decides where to offload
*/
public abstract int getDeviceToOffload(Task task);
/*
* returns proper VM from the related edge orchestrator point of view
*/
public abstract EdgeVM selectVm(Task task);
public abstract EdgeVM getVmToOffload(Task task);
}