• No results found

A comparison of two-level and multi-level modelling for cloud-based applications

N/A
N/A
Protected

Academic year: 2021

Share "A comparison of two-level and multi-level modelling for cloud-based applications"

Copied!
30
0
0

Loading.... (view fulltext now)

Full text

(1)

s

 

Technology for a better society

A comparison of two-level

and multi-level modelling

for cloud-based applications

Alessandro Rossini

Nikolay Nikolov

Juan de Lara

Esther Guerra

(2)

s

 

Technology for a better society

(3)

s

 

Technology for a better society

22 Feb 2014

1.8

million

users

register to Telegram

(4)
(5)

s

 

Technology for a better society

Self-adaptive cloud-based applications

Cloud-based applications that self-adapt to

changes in environment and requirements

(6)

s

 

Technology for a better society

Cloud-based applications

Virtualisa)on  

Servers  

Storage  

Network  

IaaS

 

Run-­‐)me  

OS  

PaaS

 

Applica)ons  

Data  

SaaS

 

(7)
(8)

s

 

Technology for a better society

Models@run-time

Reasoning  engine  

Models  

@run-­‐-me  

Target  

model  

Diff  

Adapta0on  

engine  

Current  

model  

Running  system  

(9)

s

 

Technology for a better society

Deployment model:

design-time

[loca)on:  NO]  

haProxy1  

sensApp1  

[instances    range:  1..4]  

tomcat1  

ubuntu1  

Types  

HAProxy  

SensApp  

Tomcat  

Ubuntu  

(10)

s

 

Technology for a better society

Deployment model:

run-time

[instances     range:  1..4,   instances=3]  

OpenStack  

[loca)on:  NO]  

OpenStack  

[loca)on:  NO]  

haProxy1  

sensApp1  

[instances    range:  1..4,   instances=2]  

tomcat1  

ubuntu1  

haProxy1  

sensApp1  

tomcat1  

ubuntu1  

OpenStack  

[loca)on:  NO]  

OpenStack  

[loca)on:  NO]  

haProxy1  

sensApp11  

tomcat11  

ubuntu11  

[CPU  load  =  99]  

sensApp12  

tomcat12  

ubuntu12  

[CPU  load  =  90]  

haProxy1  

sensApp11  

tomcat11  

ubuntu11  

[CPU  load  =  80]  

sensApp12  

tomcat12  

ubuntu12  

[CPU  load  =  70]  

sensApp13  

tomcat13  

ubuntu13  

[CPU  load  =  60]  

Before  adapta)on   AXer  adapta)on  

Before  adapta)on  

AXer  adapta)on  

Implicit  instances  

Explicit  instances  

If  CPU  load  of  a  VM  is  above  90%,  then  scale  out  

Types  

HAProxy  

SensApp  

Tomcat  

Ubuntu  

(11)

s

 

Technology for a better society

CloudML abstract syntax:

two levels

(12)

s

 

Technology for a better society

model  

metamodel  

CompType  

hostedCompType  

*  

type  

CompInst  

currentInst:  Int   minInst:  Int   maxInst:  Int  

hostedCompInst  

*  

VMType  

type  

VMInst  

cpuLoadAvg:  Double  

SensApp  

ontological  

typing  

sensApp1  

currentInst  =  2   minInst  =  1   maxInst  =  4  

st1  

currentInst  =  2  

tomcat1  

minInst  =  1   maxInst  =  4  

tu1  

ubuntu1  

currentInst  =  2   minInst  =  1   maxInst  =  4   cpuLoadAvg  =  94.5  

ST  

Tomcat  

TU  

Ubuntu  

linguis1c  

typing  

C1:  self.hostedCompType-­‐>forAll(t  |              CompInst.allInstances()-­‐>exists(i  |                  i.type  =  self  and  

               i.hostedCompInst-­‐>exists(ci  |                        ci.type  =  t)))   C2:  self.currentInst  >=  self.minInst   C3:  self.maxInst  <>  -­‐1  implies          self.currentInst  <=  self.maxInst   C4:  self.hostedCompInst-­‐>forAll(i  |              self.type.hostedCompType    -­‐>includes(i.type))  

Deployment model:

implicit instances

OpenStack*

[loca.on:*NO]* haProxy1* sensApp1*[instances range: 1..4,

instances=2]

tomcat1* ubuntu1*

(13)

s

 

Technology for a better society

model  

metamodel  

CompType  

hostedCompType  

*  

type  

CompInst  

hostedCompInst  

*  

VMType  

/cpuLoadAvg:  Double  =        let  loads:Set  =          VMInst.allInstances()-­‐>select(m  |              m.type=self)  -­‐>collect(cpuLoad)      in  loads-­‐>sum()  /  loads-­‐>size()  

type  

VMInst  

cpuLoad:  Int  

SensApp  

sensApp12  

st1  

tomcat12  

tu1  

ubuntu12  

cpuLoad  =  90  

ST  

Tomcat  

TU  

Ubuntu  

/cpuLoadAvg  =  94.5   C5:  self.hostedCompType-­‐>forAll(t  |              CompInst.allInstances()-­‐>exists(i  |                  i.type  =  self  and  

               i.hostedCompInst-­‐>exists(ci  |                        ci.type  =  t)))   C6:  self.hostedCompInst-­‐>forAll(i  |              self.type.hostedCompType    -­‐>includes(i.type))  

Deployment model:

explicit instances

OpenStack*

[loca.on:*NO]* haProxy1* sensApp11* tomcat11* ubuntu11* [CPU load = 99] sensApp12* tomcat12* ubuntu12* [CPU load = 90]

(14)

s

 

Technology for a better society

Deployment model:

implicit

and

explicit inst.

model

metamodel

CompType

hostedCompType * type

CompTemp

currentInst:3Int minInst:3Int maxInst:3Int hostedCompTemp *

VMType

type

VMTemp

/cpuLoadAvg:3Double3=3…

SensApp

ontologicaltyping

sensApp1

currentInst =32 minInst =31 maxInst =34 st1

tomcat1

currentInst =32 minInst =31 maxInst =34 tu1

ubuntu1

currentInst =32 minInst =31 maxInst =34 /cpuLoadAvg =394.5 ST

Tomcat

TU

Ubuntu

linguistic typing type

CompInst

hostedCompInst * type

VMInst

cpuLoad:3Int sensApp12 st12

tomcat12

tu12

ubuntu12

cpuLoad =390 C1 C2,% C3,"C4,% C5 C6 OpenStack* [loca.on:*NO]* haProxy1* sensApp1*[instances range: 1..4,

instances=2] tomcat1* ubuntu1* OpenStack* [loca.on:*NO]* haProxy1* sensApp11* tomcat11* ubuntu11* [CPU load = 99] sensApp12* tomcat12* ubuntu12* [CPU load = 90]

(15)

s

 

Technology for a better society

CloudML abstract syntax:

multiple levels

(16)

s

 

Technology for a better society

@3  

@2  

@1  

@0  

Language

definition

Component

types definition

Deployment

model:

implicit inst.

Deployment

model:

explicit inst.

Component  

/currentInst@2:  int  =  $  self.allInstances().size()  $  

*  

hostedComp  

VirtualMachine  

cpuLoad@3:  int  

/cpuLoadAvg@2:  double  =  

$  self.allInstances()-­‐>collect(cpuLoad  )-­‐>sum()/self.currentInst  $  

SensApp:  Component   *  

Tomcat:  Component  

*  

Ubuntu:  VirtualMachine  

sensApp1:  

SensApp  [1..4]  

/currentInst  =  2  

1..1  

tomcat1:  

Tomcat  [1..*]  

/currentInst  =  2  

1..4  

ubuntu1:  Ubuntu  [1..*]  

/cpuLoadAvg  =  94.5  

/currentInst  =  2  

sensApp11:  sensApp1  

tomcat11:  tomcat1  

ubuntu11:  ubuntu1  

cpuLoad  =  99  

sensApp12:  sensApp1  

tomcat12:  tomcat1  

ubuntu12:  ubuntu1  

(17)

s

 

Technology for a better society

(18)

s

 

Technology for a better society

Criteria

Size of language definition

Complexity of OCL constraints

Precision

Extensibility

Flexibility

(19)

s

 

Technology for a better society

Size of language definition

@3  

Language

definition:

Multi-level

Component  

/currentInst@2:  int  =  $  self.allInstances().size()  $  

*  

hostedComp  

VirtualMachine  

cpuLoad@3:  int  

/cpuLoadAvg@2:  double  =  

$  self.allInstances()-­‐>collect(cpuLoad  )-­‐>sum()/self.currentInst  $  

Language

definition:

Two-level

CompType( hostedCompType * type CompTemp( currentInst: Int minInst: Int maxInst: Int hostedCompTemp * VMType( type VMTemp( /cpuLoadAvg: Double = … type CompInst( hostedCompInst * type VMInst( cpuLoad: Int C1! C2,%C3,!C4,%C5% C6%

(20)

s

 

Technology for a better society

(21)

s

 

Technology for a better society

CloudML two-level tooling

(22)

s

 

Technology for a better society

CloudML multi-level tooling

22  

MetaDepth  

(23)

s

 

Technology for a better society

MetaDepth

• 

Potency-based multi-level modelling

• 

Textual modelling

• 

Integration with Epsilon languages (adapted to

multi-level):

– 

Epsilon Object Language

– 

Epsilon Transformation Language

– 

Epsilon Generation Language

• 

Analysis of conflicts between integrity constraints at

(24)

s

 

Technology for a better society

CloudML in MetaDepth

//  Level  3:  Language  definition  

Model  CloudML@3  {      Node  Component  {  

       hostedComp:  Component[*];  

       /currentInst@2:  int  =  $  self.allInstances().size()  $;      }  

 

   Node  VirtualMachine:  Component  {          cpuLoad@3:  int;  

       /cpuLoadAvg@2:  double  =  $  self.allInstances().collect  (  c  |  c.cpuLoad  ).sum()  /                    self.currentInst  $  ;  

   }   }  

//  Level  2:  Component  types  definition  

CloudML  ComponentTypes  {      Component  Tomcat  {          tomcatHosts:  SensApp[*]{hostedComp};      }      Component  SensApp  {}      VirtualMachine  Ubuntu  {          ubuntuHosts:  Tomcat[*]{hostedComp};      }   }  

(25)

s

 

Technology for a better society

CloudML in MetaDepth

//  Level  1:  Deployment  model  with  implicit  instances  

ComponentTypes  DeploymentModel  {      SensApp  sensApp1  [1..4]  {}      Tomcat  tomcat1  [1..*]  {  

       t1Hosts:  sensApp1[1]  {tomcatHosts};      }  

   Ubuntu  ubuntu1  [1..*]  {  

       u1Hosts:  tomcat1[1..4]  {ubuntuHosts};      }  

}  

 

//  Level  0:  Deployment  model  with  explicit  instances  

DeploymentModel  instances  {      sensApp1  sensApp11;  

   sensApp1  sensApp12;  

   tomcat1    tomcat11  {  t1Hosts  =  [sensApp11];  }      tomcat1    tomcat12  {  t1Hosts  =  [sensApp12];  }  

   ubuntu1    ubuntu11  {  cpuLoad  =  99;  u1Hosts  =  [tomcat11];  }      ubuntu1    ubuntu12  {  cpuLoad  =  90;  u1Hosts  =  [tomcat12];  }   }  

(26)

s

 

Technology for a better society

(27)

s

 

Technology for a better society

Conclusion

“A fundamental principle in engineering, including

software engineering, is to minimize the amount of

accidental complexity which is introduced into

engineering solutions due to mismatches between

a problem and the technology used to represent

the problem.”

C. Atkinson and T. Kühne

(28)

s

 

Technology for a better society

Future Work

Transformation two-level<->multi-level

Further development of tooling

(29)

s

 

Technology for a better society

Go  Lite  

P

AA AGE

(30)

s

 

Technology for a better society

Thank you!

More info:

cloudml.org

Get in touch:

@alerossini

alessandrorossini.org

References

Related documents

As it was mentioned in the previous section, the existing literature in the relevant field largely agreed that the external pressure, such as the EU accession conditionality, on

to assess the effect of Bloom’s mastery learning approach on 9 th grade students’ academic achievement in different level of cognitive domain i.e., knowledge,

Interviewer note: If the student is or was taking courses in an entirely different field that is or was unrelated to their previous education and that previous education was

Power reduction at the wind turbines was achieved through control signals designed to decrease the voltage, or increase the frequency of the offshore AC wind farm network..

This situation could be due to a damaged motor starter contact, burned-open overload relay, or a switch or circuit breaker on the main, feeder or motor branch circuit.. A

October 2002 GCC Conference hosted by King Faisal Specialist Hospital and Research Centre, Saudi Arabia, Past, Present and Future Approaches to Nursing Education and the Impact

households in the extreme deficit and high food security categories tend to be the primary beneficiaries of Ethiopia’s food aid programs.. Column (b) adjusts for the influence of

We find that both measures are strongly positively correlated with the sensitivity of investment to price, consistent with the hypothesis that stock prices with large content of