Modelio Extension for Camel Modeling. Camel Designer Module is conceived to help in designing Cloud Application Modelling and Execution Language (CAMEL) ( camel-dsl.org )
optimisation requirement CHUV_maxUtility{
variable SAWMetricModel.CHUV_Utility
}
provider requirement PublicRequirement{
cloud type public
}
//location requirement EuRequirement [Locations.IE]
//location requirement EuRequirement [Locations.Europe]
}
metric type model SAWMetricModel{
//DEADLINES: reference workflow duration and (time to) deadline adapted to current time
measurable attribute Ref_workflow_duration sensors [SAWMetricModel.Ref_workflow_duration_Sensor]
measurable attribute Deadline sensors [SAWMetricModel.Deadline_Sensor]
measurable attribute BufferTime
//RUNNING TASK
//measurable attribute RUNtaskEstFinishTime sensors [SAWMetricModel.RUNtaskEstFinishTime_Sensor]
measurable attribute avgRUNtaskEstFinishTime sensors [SAWMetricModel.avgRUNtaskEstFinishTime_Sensor]
measurable attribute testPENDtaskEstDuration
measurable attribute newCardinality
//PENDING TASK
//measurable attribute PENDtaskEstDuration sensors [SAWMetricModel.PENDtaskEstDuration_Sensor]
measurable attribute PENDtaskNumber sensors [SAWMetricModel.PENDtaskNumber_Sensor]
measurable attribute sumPENDtaskEstDuration sensors [SAWMetricModel.sumPENDtaskEstDuration_Sensor]
measurable attribute avgPENDtaskEstDuration sensors [SAWMetricModel.avgPENDtaskEstDuration_Sensor]
measurable attribute DeltaTime_actual
measurable attribute newcores
//NODES
measurable attribute cores [MetaDataModel.MELODICMetadataSchema.ApplicationPlacementModel.IaaS.Processing.CPU]
measurable attribute numberOfSimulations sensors [SAWMetricModel.NumberOfSimulations_Sensor]
measurable attribute cardinality [MetaDataModel.MELODICMetadataSchema.UtilityNotions.UtilityRelatedProperties.Cardinality]
measurable attribute sumOfNumberOfSimulations
measurable attribute price [MetaDataModel.MELODICMetadataSchema.UtilityNotions.UtilityRelatedProperties.Cost]
sensor Ref_workflow_duration_Sensor {
config ''
}
sensor Deadline_Sensor {
config ''
}
sensor avgRUNtaskEstFinishTime_Sensor {
config ''
}
sensor sumPENDtaskEstDuration_Sensor {
config ''
}
sensor avgPENDtaskEstDuration_Sensor {
config ''
}
sensor PENDtaskNumber_Sensor {
config ''
}
sensor NumberOfSimulations_Sensor {
config ''
}
template Ref_workflow_durationTemplate{
attribute Ref_workflow_duration
unit UnitTemplateCamelModel.UnitTemplateModel.Seconds
value type TypeTemplateCamelModel.TypeTemplateModel.ZeroToPositiveInfinityInteger
}
template DeadlineTemplate{
attribute Deadline
unit UnitTemplateCamelModel.UnitTemplateModel.Seconds
value type TypeTemplateCamelModel.TypeTemplateModel.ZeroToPositiveInfinityInteger
}
template avgRUNtaskEstFinishTimeTemplate{
attribute avgRUNtaskEstFinishTime
unit UnitTemplateCamelModel.UnitTemplateModel.Seconds
value type TypeTemplateCamelModel.TypeTemplateModel.ZeroToPositiveInfinityInteger
}
template avgPENDtaskEstDurationTemplate{
attribute avgPENDtaskEstDuration
unit UnitTemplateCamelModel.UnitTemplateModel.Seconds
value type TypeTemplateCamelModel.TypeTemplateModel.ZeroToPositiveInfinityInteger
}
template sumPENDtaskEstDurationTemplate{
attribute sumPENDtaskEstDuration
unit UnitTemplateCamelModel.UnitTemplateModel.Seconds
value type TypeTemplateCamelModel.TypeTemplateModel.ZeroToPositiveInfinityInteger
}
template PENDtaskNumberTemplate{
attribute PENDtaskNumber
unit UnitTemplateCamelModel.UnitTemplateModel.Simulations
value type TypeTemplateCamelModel.TypeTemplateModel.ZeroToPositiveInfinityInteger
}
template NumberOfSimulationsTemplate{
attribute numberOfSimulations
unit UnitTemplateCamelModel.UnitTemplateModel.Simulations
value type TypeTemplateCamelModel.TypeTemplateModel.ZeroToPositiveInfinityInteger
}
raw metric Ref_workflow_durationRawMetric{
template Ref_workflow_durationTemplate
}
raw metric DeadlineRawMetric{
template DeadlineTemplate
}
raw metric avgRUNtaskEstFinishTimeRawMetric{
template avgRUNtaskEstFinishTimeTemplate
}
raw metric avgPENDtaskEstDurationRawMetric{
template avgPENDtaskEstDurationTemplate
}
raw metric sumPENDtaskEstDurationRawMetric{
template sumPENDtaskEstDurationTemplate
}
raw metric PENDtaskNumberRawMetric{
template PENDtaskNumberTemplate
}
raw metric NumberOfSimulationsRawMetric{
template NumberOfSimulationsTemplate
}
schedule SAWTimeSchedule {
interval 120
time unit UnitTemplateCamelModel.UnitTemplateModel.Seconds
}
window SAWWindow {
//type fixed
type fixed
size type time-only
time size 120
time unit UnitTemplateCamelModel.UnitTemplateModel.Seconds
}
object context SchedulerMetricContext{
component SchedulerAndWorkersDeployment.Component_Scheduler
}
object context WorkerMetricContext{
component SchedulerAndWorkersDeployment.Component_WorkerSmall
}
raw metric context Ref_workflow_durationContext{
metric Ref_workflow_durationRawMetric
sensor SAWMetricModel.Ref_workflow_duration_Sensor
schedule SAWTimeSchedule
object context WorkerMetricContext
}
raw metric context DeadlineContext{
metric DeadlineRawMetric
sensor SAWMetricModel.Deadline_Sensor
schedule SAWTimeSchedule
object context WorkerMetricContext
}
raw metric context avgRUNtaskEstFinishTimeContext{
metric avgRUNtaskEstFinishTimeRawMetric
sensor SAWMetricModel.avgRUNtaskEstFinishTime_Sensor
schedule SAWTimeSchedule
object context WorkerMetricContext
}
raw metric context sumPENDtaskEstDurationContext{
metric sumPENDtaskEstDurationRawMetric
sensor SAWMetricModel.sumPENDtaskEstDuration_Sensor
schedule SAWTimeSchedule
object context WorkerMetricContext
}
raw metric context avgPENDtaskEstDurationContext{
metric avgPENDtaskEstDurationRawMetric
sensor SAWMetricModel.avgPENDtaskEstDuration_Sensor
schedule SAWTimeSchedule
object context WorkerMetricContext
}
raw metric context PENDtaskNumberContext{
metric PENDtaskNumberRawMetric
sensor SAWMetricModel.PENDtaskNumber_Sensor
schedule SAWTimeSchedule
object context WorkerMetricContext
}
raw metric context NumberOfSimulationsContext{
metric NumberOfSimulationsRawMetric
sensor SAWMetricModel.NumberOfSimulations_Sensor
schedule SAWTimeSchedule
object context WorkerMetricContext
}
//CORES
template CoresTemplate{
attribute cores
unit UnitTemplateCamelModel.UnitTemplateModel.Cores
value type TypeTemplateCamelModel.TypeTemplateModel.ZeroToPositiveInfinityInteger
}
variable WorkerCores{
template CoresTemplate
component SchedulerAndWorkersDeployment.Component_WorkerSmall
}
variable ActWorkerCores{
template CoresTemplate
component SchedulerAndWorkersDeployment.Component_WorkerSmall
current-config
}
// CARDINALITY
template CardinalityTemplate{
attribute cardinality
unit UnitTemplateCamelModel.UnitTemplateModel.Instances
value type TypeTemplateCamelModel.TypeTemplateModel.ZeroToPositiveInfinityInteger
}
template MinimumCoresTemplate{
attribute newcores
unit UnitTemplateCamelModel.UnitTemplateModel.Cores
value type TypeTemplateCamelModel.TypeTemplateModel.ZeroToPositiveInfinityInteger
}
`camel model ApplicationCHUVBrainTwoCompUtily12_d { application ApplicationCHUVBrainTwoCompUtily12_d { version '0.4'
//camel model ApplicationCHUVBrainTwoCompMetricTest3 { // application ApplicationCHUVBrainTwoCompMetricTest3 { // version '0.4' }
// slo ReconfigurationRule2 constraint SAWConstraintModel.ReconfigureIfCoresNeeded // slo ReconfigurationRule constraint SAWConstraintModel.Reconfigallconstrains
// CARDINALITY
template CardinalityTemplate{ attribute cardinality unit UnitTemplateCamelModel.UnitTemplateModel.Instances value type TypeTemplateCamelModel.TypeTemplateModel.ZeroToPositiveInfinityInteger }
// template CoresAddedTemplate{ // attribute coresadded // unit UnitTemplateCamelModel.UnitTemplateModel.Instances // value type TypeTemplateCamelModel.TypeTemplateModel.ZeroToPositiveInfinityInteger // } //
// variable CoresAddedMetric{ // template CoresAddedTemplate //
// //formula:('PENDtaskNumberRawMetric-(WorkerCoresWorkerSmallCardinality-ActWorkerCoresWorkerSmallActualCardinality)') // formula:('PENDtaskNumberRawMetric-WorkerSmallCardinality+WorkerSmallActualCardinality') // }
// // Minimum cores to add // composite metric MinimumCoresNeeded{ // template MinimumCoresTemplate // //formula: ('ceil(PENDtaskNumberRawMetric/ceil((BufferTimeMetric+0.001)/avgPENDtaskEstDurationRawMetric))+ActWorkerCoresWorkerSmallActualCardinality') // formula: ('if(floor(BufferTimeMetric/avgPENDtaskEstDurationRawMetric)=0;PENDtaskNumberRawMetric+ActWorkerCoresWorkerSmallActualCardinality,ceil(PENDtaskNumberRawMetric/floor(BufferTimeMetric/avgPENDtaskEstDurationRawMetric)))') // }
// composite metric context MinimumCoresNeededContext{ // metric MinimumCoresNeeded // grouping global // window SAWWindow // schedule SAWTimeSchedule // composing contexts [PENDtaskNumberContext,BufferTimeContext,avgPENDtaskEstDurationContext] // }
// composite metric NotEnoughCores { // template MinimumCoresTemplate // formula: ('MinimumCoresNeeded-WorkerSmallActualCardinality*ActWorkerCores') // } //
// composite metric context NotEnoughCoresContext{ // metric NotEnoughCores // grouping global // window SAWWindow // schedule SAWTimeSchedule // composing contexts [MinimumCoresNeededContext] // } //
// DELTA_TIME_RECONF
// variable CoresAdded{ // template MinimumCoresTemplate // formula: ('PENDtaskNumberRawMetric-(WorkerSmallCardinalityWorkerCores-WorkerSmallActualCardinalityActWorkerCores)') // } //
// variable DeltaTime_reconf{ // template MinimumCoresTemplate // //formula: ('(sumPENDtaskEstDurationMetric - avgPENDtaskEstDurationMetricWorkerSmallCardinalityWorkerCores)ceil((PENDtaskNumberRawMetric-CoresAdded)/(WorkerSmallCardinalityWorkerCores))') // //formula: ('((sumPENDtaskEstDurationRawMetric - avgPENDtaskEstDurationRawMetricWorkerSmallCardinalityActWorkerCores)/(1+PENDtaskNumberRawMetric))') // //formula: ('(WorkerSmallActualCardinality-WorkerSmallCardinality)') // //formula: ('avgPENDtaskEstDurationMetricceil((PENDtaskNumberRawMetric-CoresAdded)/(WorkerSmallCardinalityWorkerCores))')
// }
// variable New_cores_constraint{ // template MinimumCoresTemplate // formula: ('WorkerSmallCardinality*WorkerCores-MinimumCoresNeeded') // }
// utility function variable CHUV_Utility{ template MetricTemplateCamelModel.MetricTemplateModel.UtilityTemplate //formula: ('1/((1+WorkerSmallCardinality)SmallWorkerPrice)') formula: ('1/((1+exp(-BufferTimeMetric + avgPENDtaskEstDurationRawMetricceil((PENDtaskNumberRawMetric-WorkerCoresWorkerSmallCardinality)/(WorkerCoresWorkerSmallCardinality)))))') }
// metric constraint ReconfigureIfCoresNeeded : [SAWMetricModel.NotEnoughCoresContext] > 0.0 metric constraint ReconfigureIfAvgRunTaskDurLong : [SAWMetricModel.avgRUNtaskEstFinishTimeContext] > 10.0 logical constraint Reconfigallconstrains : and (ReconfigureIfPendingTasks,ReconfigureIfAvgRunTaskDurLong) // logical constraint Reconfigallconstrains : and (ReconfigureIfPendingTasks, ReconfigureIfCoresNeeded,ReconfigureIfAvgRunTaskDurLong) //metric constraint ReconfigureIfAvgPendingTaskDurLong : [SAWMetricModel.avgPENDtaskEstDurationContext] > 360.0
// variable constraint DeltaTime_reconf : SAWMetricModel.New_cores_constraint > 0.0 }
}`