Contents lists available at ScienceDirect
Computers
and
Electrical
Engineering
journal homepage: www.elsevier.com/locate/compeleceng
Pattern-based
orchestration
and
automatic
verification
of
composite
cloud
services
Flora
Amato
a,∗,
Francesco
Moscato
b aDIETI, University of Naples Federico II, ItalybDiSciPol, Second University of Naples, Italy
a
r
t
i
c
l
e
i
n
f
o
Article history: Received 29 August 2015 Revised 7 August 2016 Accepted 8 August 2016 Available online 24 August 2016 Keywords:
Cloud patterns Verification Semantics Orchestration
Service level agreeement Quality of service
a
b
s
t
r
a
c
t
Recentyearshaveseenanincreaseofcomplexityinparadigmsandlanguagesfor devel-opmentofCloudSystems.Theneedtobuildvalueaddedservicesandresourcespromoted pattern-basedcompositionand orchestrationasnewhot researchtopics.Anyway, unlike webservices,itisunclearwhat orchestrationmeansforCloudSystems.Inthisscenario, away toautomaticallybuildcompositeservicesfromtheir pattern-baseddescriptionis appealing.Inthisworkwedescribeamethodologyforautomaticcompositionand verifi-cationofCloudServiceswhichisdrivenbyformalorchestrationlanguage.
© 2016ElsevierLtd.Allrightsreserved.
1. Introduction
CloudArchitectureisnowadaysadefactostandardforprovidinganykindofserviceonInternet.Bigvendors,likeAmazon WebServices (AWS)1 orMicrosoftwithAzure2 aredefinitely themainactors inCloudArchitecturedefinition.In[1]NIST extends themeaning oforchestration to CloudArchitecture. Inaddition,a newtrend inCloud Servicesdesign and man-agement grew up in the last years: the definition of design patterns forCloud Computing. Anyway, the introduction of designpatternsinCloudComputingrequiresaconceptoforchestrationthat ismorecomplexthantheonedefinedin[1]: aswe will show inthiswork manydesign patterns[2]with differentpurposes canbe describedascomplex workflows. Workflowbased compositionopenstheproblemofunderstanding ifa compositeserviceiscompliantwithusers’ require-ments andQoS. Propertiesofcomposite servicesobviouslydepend oncomponents propertiesandcomposition.We think that compliancecannot beevaluated onlyby meansofsyntacticalortype checking.Actually, severalsemantics-based ap-proaches forsimple web servicescomposition exist (asurvey isin [3]).Some of themexploit BPEL4WS [4]orchestration languageandOWL-basedontologiesforservicesdescription.Inthiscontext,itisclearthatamethodologyabletocompose andverifyCloud Servicesby using CloudDesignPatterns is reallyappealing.This isthe reasonforwe propose a formal orchestrationlanguage abletodescribe allelements,eventsandcompositionissueswe needtodescribe complexservices. The language enablespattern-based composition ofCloud elementsat different layers. Inthis way,we reach two goals:
∗ Corresponding author.
E-mail addresses: fl[email protected](F. Amato), [email protected] (F. Moscato).
1https://aws.amazon.com 2https://azure.microsoft.com/
http://dx.doi.org/10.1016/j.compeleceng.2016.08.006 0045-7906/© 2016 Elsevier Ltd. All rights reserved.
Fig.1. System architecture.
first,ourmethodologyenablesClouddesignerandprogrammerstodescribeinteractions ofcomponentsdirectlybymeans ofpatterns;second, theproposedapproachallowsfortheanalysisofsemanticsandQualityofServices(QoS)ofcomposite servicesandresources.
Thepaperisorganizedasfollows.Section2containsthedescriptionofthemethodologyweproposeandthearchitecture ofa frameworkusedtoenactitssteps.Inordertodescribe patternsandcompositeservicesinSection3weintroducean orchestrationlanguage.Section4discussestheproblemofbindingrealservicesintocompositeservices.Section5proposes afullexampleandSection6containsananalysisofrelatedworks.Finally,Section7reportssomeconcludingremarks. 2. Methodologyandarchitecture
Inthemethodologywearegoing toillustrate,aformal workflowlanguage describescompositionandpatterns.Its for-malsemantics,together witha semantic-baseddefinitionofcloudresources andservices,enablesautomaticcomposition. Patternsgive informationabouthowservicesandresources interactatearlydesign anddevelopmentstages.Thisabstract informationsuggeststhewaytoanalyse,forexample,compositionsoundnessorqualityofservices.Letusconsidera sim-pleexamplewithtwobasiccontrol flowpatterns:thesequenceandthe1outofN.Fromanavailability pointofview,ifN servicesareorganizedinasequence,thefailureprobabilityofthecompositeserviceisthesumofthefailure probabilities ofcomponents,ontheother handinthe 1outofNcomposition, itistheirproduct. Ourworkflow language (Operational Flow Language:OFLinthe following) hassimpleconstructs that canbe used todefine complexCloud Patterns3 [2].OFL isexpressive enoughtodescribeseveralpatterns,aswell assimpleenoughtobedefinedbyaclearoperationalsemantics. ThefinalstepisthemanagementofCloudcompositeservicesaspatternsinstances.
Inordertobindrealservices incompositionskeleton, wehaveto knowtheirfunctionalities andtheirQoSproperties. Ourmethodology supports ontology-baseddescription ofservices by usingOWL-S [5]butit is not enough expressive to characterizegeneralcomposition[4].WethinkthatanInputs,Outputs,Preconditions,Effects(IOPE[6])characterizationof Cloudresources,aswellasasemanticdescriptionofwhatresourcesareandwhattheydo,areusefultochoosecomponents thatbestmatchsemanticsandrequirementsofcompositeservices.Forpropermatchingandontology[7]describesrolesof availableresourcesandservices.Finally,forwhatQoSanalysisandcompositionconcerns,theworkflowgraphsdescribedby OFLallowforthecreationofanalysismodelsbyusingModelTransformationtechniques[8].
Fig.1depictsthearchitecturethatenforcesthemethodologypreviouslyintroduced.
TheWF Builder,the IOPEInteroperability Matcher andthe QoSBuilder respectively managegoals of:(a)creating a workflowof compositeservicesfromtheir patter-based description;(b)matching componentservicesintheorchestrated service;(c)analysingQoSofresultingcompositeCloudServices.TheWF(Workflow)BuilderisbasedonaKnowledgeBase oflogicrules containing(a) theOperationalsemanticsofOFL(in therepository WFSemanticRules);(b)theoperational semanticsrulesoforchestrationpatterns(PatternsCompositionRules).TheyareinturndefinedbyOFL.ResultsfromWF BuilderareskeletonsusedtoimplementOrchestratedCloudServices.Properback-endunitscanreadskeletonsinorderto createstubsfordifferentVendorslanguagesandAPIs. InputsfortheServiceInteroperability MatchingareCloud Orches-trationskeletons(declaringhowservicesinteract)andthedescriptions ofcomponentservicesandresources.Descriptions useOWL-SandIOPEgroundingforcloud resources.Inaddition,thedescriptionofservicesfunctionalitiesdependson do-mainontologies(i.e.financialservices,E-Healthetc.).FurthermoreCloudOntology[7]describestherolesofelementsinthe CloudArchitecture.Thedescriptionoftheseontologiesisout ofthescope ofthiswork. Finally,QoSAnalyzer takesCloud OrchestrationandQoSdescriptionsinordertobuildanalysablemodels(byusingQoSCompositionrules).Atthemoment theanalyzersupportsonlyperformanceandavailabilityanalyses.
Table1
OFL main elements.
Element SubElement Description
Transition ControlFlow Defines precedences among activities in OFL control flows DataFlow Declares data routing
Event Declares asynchronous events like interrupts
DependsOn Defines if an element in OFL depends on the existence or the correct execution of another element in process definition
Handling Declares relationships among Events and their managing activities InstalledOn Defines where activity-related services are installed
PoolCreate declares that the source activity of this transition may create a persistent instance of a Pool PoolCreateOn Like PoolCreate but it creates services on existing Virtual or physical resources
PoolCreate1S Creates a service and destroys when it ends PoolDestroy Deallocate resources in a Pool
Monitoring Monitors resource PoolInvokeOn Invoke a service in a Pool
Participant Actor Represents an external user for the process: it can send events and/or provide data PhysicalP A physical resource
VirtualP A Virtual Server
Activity Interruptible Defines interruptible activities: these activities can be target of Event Transitions Handler Handles events. Connected to an event by an Handling Transition
NoReturnH This is a Handler that does not return control to the interrupted activity ReturnH This is a Handler that returns control to the interrupted activity
Resource A Cloud Resource that can execute some operation (for example a storage element) AbstractRes Defines that the activity is an abstract resource
PhysicalRes Defines that the activity is at physical resource SaaS Defines that the activity is at SaaS layer PaaS Defines that the activity is at PaaS layer IaaS Defines that the activity is at IaaS layer Monitor Defines a monitoring activity Route processes only inner data Process Data Data Simple data like files, streams etc.
Message Data containing messages from an activity to another Inner Data Variable A process variable
Transition Condition predicates that enables firing of transition LoopCond Conditions for Loop blocks
PoolCond Conditions for Pool instantiation and activation Block Structural a simple activities grouping
Loop Activities in a loop
SubProcess Declares sub-processes structures
Pool A Pool is a collection of instances of activities that can be created dynamically. Once a Pool instance is created (by proper transition), it is associated to proper pool condition. Whenever an activity fires to a pool, the firing condition selects the proper instance of resource and services to use
3. OFLsemantics
In thissection we briefly introduce the basicelementsandoperational semantics ofOFL. Then, we show how OFLis expressiveenoughtodescribeCloudPatterns.OFLisaworkflow-basedlanguage:itconsistsofagraphofactivities, partici-pantsandtheirproperties.AnActivityrepresentsonelogicalstepwithinacompositeprocess.Thecompletionofanactivity andthestartingofanotheroneisatransitionpointintheworkflow execution.Transitionsmaybeunconditional,butthe order ofexecution ofactivities atrun-timemay depend on one ormore logical expressions calledtransitionconditions. Conditions areevaluated whenactivities start andendandtheir valuesaffectthebehavioursofactivities. Moreindetail, Table1liststhemainconstructsofOFLandtheirmeanings.
Dependencies existamong elementsin differentgroups. Forexample, ControlFlow transitions can be connectedonly to activities;transitionconditions existonly inControl Flow etc. Weomit hereall dependences forbrevity. Some points exists within the workflow that allow forthe control ofactivities execution:AND-split is a point where a singlethread ofcontrolsplits intotwoormorethreadswhichare executedinparallel.AND-join isapointwheretwoormoreparallel activitiesconvergeintoasinglethreadofexecution.XOR-splitisadecisionpointwhereonlyoneofalternativebranchesis executed.XOR-joinisapointintheworkflowwheretwoormoreparallelactivitiesconvergeinasinglethreadofexecution withoutsynchronization. OR-splitisadecisionpointbetweenseveralalternativeworkflow branches.OR-joinisa pointin which several alternative branches re-convergeinto a singlethread. In the following XOR, AND and OR are called Split or Join Conditions. Thereforein the OFLlanguage, workflow processes consist of a graphof nodes(activities) and edges (transitions)identifiedby apairofnodes(From,To).Handling transitionsaretheonlyexception sincethey connectEvent Transitions toHandler Activities. Activitiesrepresentatomic CloudServiceexecution orresource uses.Types of elements
Fig.2. OFG example.
inOFLgraphs (OperationalFlowGraph: OFG)aredepictedasstereotypes(i.e.reportedinsidedouble-angledbrackets). An exampleisinFig.2thatreportstheOFGofaninstanceoftheCompensatingTransactionPattern.
Theworkflowhereisreallysimple:itincludesonlySaaSactivitiesandControlFlowtransitions,hence,weomitted stereo-typesforsimplicity.Transitionsconditionsarereportedneartherelatedtransitions.Ifthey miss,wealways evaluate con-ditionstrue.Inthefigure,Err andNoErr aretruewhenan errorornoerrorsrespectivelyoccursduringtheexecutionof thefromactivity.Obviouslytheyaremutuallyexclusive:anXORsplitassuresthatonlyonebetweencompensatingandnext activitiesareabletoexecute.Ifatheserviceexecutesacompensationactivity,itexecutesthefollowingcompensationstoo.
3.1. MappingCloudPatternstoOFLgraph
OFGs represent executableprocesses that can be easily implemented in differentCloud environments. We only need a wayto generalize OFG inorder torepresent CloudPatterns. Some patterns are not parametricin terms ofcomponent servicesandanOFGisenoughtodescribethem.Moregenerally,aCloudPatternisaparametricgraphwhereservicesand resourcesinvolvedininstancesmodifythepatterntemplate.Inordertoallowforautomaticcomposition,wemusttranslate patternsintoOFGs.The mainstructureofa patternisaparticularBlock,calledTemplate.Wehavedefinedanimperative languagecalledPatternGroundingLanguage (PGL)inordertodescribeBlocksreplicasandgroundings.Wedonotdescribe PGL herefor brevity: its main features are the abilityof defining sets (lists) ofServices that are grounded intoan OFG that describespatternsinstances.A properfunction, connect,linksservicesandresources each other by means ofproper Transitions.LetusconsidertheCompensationPattern:aDesignerwoulddescribethepatterninthefollowingway:
compensation−pattern
(
S,Serv
ices,Compensating,E)
whereServicesisalistofnormalservicesandCompensatingisthelistofservicesthatcompensatetheonesinServices.Sand
Eare thestartandendactivities respectively.The generalcompensationpatternisaBlockcoupledwithaPGLdefinition. Fig.3reportstheOFGandthePGLdescriptionforcompensationpattern.
ItissimpletoprovethatthePGLontherightofFig.3,invokedwithparameters: Compensation
(
S,[A,B,C],[CA,CB,CC],E)
producestheOFGinthebottomofFig.2. 4. Conditionspropagationandsemantics
Inprevioussectionsweoutlinedthatweareinterestedinpattern-basedcompositionandorchestrationofCloudservice. Startingfrom anabstract pattern-based descriptionwe provide asets ofrules ableto translate pattern-based description intoa workflow process. Compositionmust be verified in orderto understand ifcomponents match inputs, outputs and semanticsrequiredbyother connectedelements. Matchingispartofverificationprocessthatshould controlifInputsand Outputs are inthe rightformat forconnected elementsandif semantics ofCloud Servicesandresources arecorrect. At this purpose,we inherit some Web Servicelanguages andmethods: the Semantic Web Community created OWL-S [9], andmatchingalgorithms, methodsandtoolsbasedonIOPE(Inputs,Outputs,PreconditionsandEffects)analyses [10].The matchingprocess requires theexistence ofa Knowledge Base KB and ofa set of Inference Rules IR. A formal, explicit descriptionoftheDomainisgivenbyOWLandOWL-S.WithreferencetoFig.1,
Compensation(S, Services, Compensating, E) :
P rec(C) =
size(Services) ==size(Compensating)
ConditionCok = List[size(Services)] ConditionCerr = List[size(Compensating)] foreach (c1 :Cok, c2 :Cerr):
c1.value=true;c2.value=true;
sH=head(Services);sT =tail(Services);
C=reverse(Compensating);
foreach (srv:Services;cmp:C;ok:Cok, err:Cerr):
if(srv==sH) : connect(srv,cmp,ControlFlow,err); connect(S,srv,ControlFlow,“true”); else if(srv==sT) : connect(srv,E,ControlFlow,“true”); connect(srv,succ(srv,Services),ControlFlow,ok); connect(srv,cmp,ControlFlow,err); foreach (srv:Services):
srv.J oinCond=AN D;srv.SplitCond=XOR;
S.SpliCond=AN D;E.J oinCond=XOR
Fig.3. Compensating pattern OFG and PGL.
ElementsinKB are axiomsderivedfroma Domainontology.Relationshipsamong dataandoperationsdepend onthe semantic descriptionof operations, Pre-conditions, Effects, InputsandOutputs. Rulesfor reasoningon KB are definedin operationalsemantics.IRcontainstherulestoapply inordertobuild validOGintermsofIOPEs.Theinferencerulesdo notdependontheDomain.NoticethatmatchingdependsonlyonOFGstructure.Hence,aCloudresourcecanbegrounded toan activityif:(a)its Inputformats(ifany)meet Outputformatsofresources andservicesofincomingactivitiesinthe OFG; andif:(b)AllofitsPreconditionsare satisfied.Input andOutputmatchingisrelativelysimpletoanalyse aswell as I/Oproblemsarequitesimpletomanage:iftherequiredinputisnotavailable,probablythewholeprocessisnotcorrect;if therequiredinputexistsbutindifferentformat,properwrapperscanbeusedinordertotranslatedataformats.
PreconditionsandEffects(PE) aremoredifficulttomanage.Theyaredefinedby logicpredicatesandtheyexpress con-ceptspresentbothinCloudOntology(CO)andDomainOntology(DO)(seeFig.1).AftertheexecutionofaCloudService,some thingsmayhappenorchange:thesearetheEffectsthattheserviceproduces.ExecutionofCloudServicesmaychangethe truth value ofsome predicates:thismeans that thePE matching dependsonOFG too:a runningcomposite servicemay evaluatesome predicatestrueorfalseaftertheexecutionofany activityintheOFG.Meetingofpreconditionsis assuredby servicespreviouslyexecutedatanytimeinthecompositeprocessandconditionvaluesmaychangeduringitsexecution.
ThisisaneffectwecallConditionPropagationanditprovidesameantodescribethesemanticsofthewholecomposite service.
Solvingthematchingproblemrequiresthataresourceorservice:(a)acceptsalltheinputsrequiredbytheIOPE speci-ficationofanode intheOFG,(b)producesalloutputsrequiredbytheIOPEspecificationofanodeintheOFG,(c)satisfies all preconditions required by the IOPE specificationof a node inthe OFG, (d) produces all effects requiredby the IOPE specificationofanodeintheOFG.
The real problem is to understand if a Composite service is soundin terms of IOPE matching. Checking of adjacent elementsinanOFGissimple:Outputsofincomingnodes,mustcomplywithInputsneededbythenode wearechecking. TheproblemofPEmatchingismorecomplex:foreachnodeinthegraph,thematchermustanalysemanypredicatesinthe workflowgraph.Aneffectenablesnewpredicatesorchangestruthvaluesofexistingones.Inaddition,andthisisthecase ofourexample,duringtheexecutionofacompositeservice,somepredicatesmaychangetheirunificationwithvariables.
Preconditions ofan activity depend on Effectsof activities executed before. Anyway, the set of these activities is not uniquely determined: thanks to different Join andSplit conditions instances ofan OFG run across different paths ofthe graph(forexamplethishappensatORandXORsplitpoints).
LetPrec(N)andEff(N)bethesetsofpreconditionsandeffectsrespectively,foranodeNintheOFG.Letuscall: e
v
al(
p)
−→{
true,f alse}
,p∈Prec(
N)
orE ff(
N)
thefunctionthatevaluatesatruthvalueofapreconditionoraneffect.
Let us consider the sets PL (predicates lists) composed by the couples (pnode, eval(pnode)) where pnode ∈
Prec(node)∪Eff(node)andeval(pnode).
PLnode=
{
pnode 1 ,ev
al(
pnode1)
,· · ·,pnode n ,ev
al(
pnoden)
}
Weconsidertheunionofpreconditionsandeffectsbecause,forConditionPropagation,weassumethat,inordertobind arealserviceintotheworkflow,itmustmeetallpreconditionsand,afteritsexecution,itmustproducealldeclaredeffects. The important isto understand ifa servicecan avoidmeeting a precondition becauseof ConditionPropagation. We call PHnode(PossiblyHappens)thesetwithallpossibleconfigurationsofpredicateslists(i.e.predicateswiththeir evaluations)
foranodeintheOFG. PHnode=
{
PLnode1 ,· · ·,PLnoden
}
NoticethataPLnodeinPHnodecontainsallpredicates(withtheirevaluation)evaluatedbeforetheexecutionofnode
activ-ity(wecallthisset:PHnode
be f ore)aswellasitsEffects.Thesemayeventuallysubstitutethetruthvalueofpredicatespreviously
evaluatedinthecaseEffectscontainpredicatesthathavebeenalreadyconsidered.IfEffectscontainnewpredicates,theyare addedtoallPLsinPH:if PHnode be f ore=
{
PL node be f ore1,· · ·,PL node be f orek}
letE ffcommoni
(
node)
the set containingall predicates (and their evaluation) inPLnodebe f orei∈PH
node
be f orethatare inEff(node) even
withsameordifferentevaluation. PHnode=
{
PLnodebe f orei−E ffcommoni
(
node)
∪E ff(
node)
}
,i∈(
1..k)
Inbrief,we addneweffectswithproperevaluationtoeachPredicateList andeventually wesubstituteold evaluationsin theEffectslist.MultiplePLsinPHsetrepresentthefactthatOFGmaycontaindifferentpathsfromastarttoendpoints. Thisobviouslyhappenswhenthecomposition containschoicesorconditional executionofpaths,buthavingmultiplePLs isuseful alsoin parallel paths when they managespreconditions andeffects of the samepredicates. IfOFG is a simple sequenceofnodes,foreachnode,thecardinalityofPHis1foreachnodeinthesequence:card
PHnode=1∀
node∈OFG.Thisbecauseinasimplesequenceofnodesthereisalwaysonepossibleevaluationofpredicates.Anyway,formorecomplex OFGs,wehave:
card
PHnode≥1∀
node∈OFGLetusnowdescribe howPHnode setsarebuiltforallnodesinOFG.Wevisitall theOFGfromthestarttotheENDpoints
updating PL sets: updatesdepend on Effects andSplit and Join points in the OFG.The simplestcase, aswe introduced before,isthepuresequencepathinOFG.Ifwehavetwonodesinasequence(letuscallthemAandB,withBfollowingA
inthegraph),withAasstartpointandBtheendpoint(i.e.agraphwithonlytwonodes),wehave: PHB=
{
PLB i = PLAi ∪(
ev
al(
Prec(
B))
−E ffcommon(
B)
∪E ff(
B)
}∀
PLA i ∈PHANoticethat,ifAisastartingpointintheprocess: PHA=
{
ev
al(
E ff(
A)
∪Prec(
A)
)
}
IftheinplaceofAamorecomplexgraphexists,wemustdistinguishtwocasesforBdependingonitsjoincondition.The firstcaseiswhenthejoinconditionofBisORorXOR:Here,wecanbuildthesetPHB
be f oreandthenthePHBwiththerule
previouslyreported. PHB be f ore= t∈incoming(B)
PHf rom(t)∪ev
al(
Prec(
B))
InXORandORjoin, simplyallprevious preconditionslists (inall incomingpaths)areconsidered.Notice thatiftwo pre-conditionslists exist withboth sameprecondition andevaluation, their union resultsin an unique PL.The other caseis whenthejoin conditionofBisAND.Thisismoredifficultto managebecause twofurthercases arepossible: (1)theset ofpredicatesthat changefromthesplitnodeofparallel incomingpaths, duringpaths executionsaredisjointondifferent paths;(2)somepredicatesareintheEffectssetsofnodesbelongingtodifferentparallelpaths.
LetSPNbethenameofthe(split)nodewheretheparallelpathsbegin,andJPNthejoinpointweareconsidering.Letus call
CHnode=
{
predicates∈first(
PLnode)
:PLnode∈
{
PHnode−PHnode be f ore}
thelistofpredicatesthatchangetheirevaluationorthatareinsertedintopredicatelistsaftertheevaluationoftheeffects inanode(firstfunctionhereselectthefirstelementinacouple).Ifweconsideragenericpath
φ
intheOFGterminatinginnode,wecandefinetheCHnode setforawholepath:
CHnode
φ =
node∈φ
CHnode.
Inthefirstcase,wehave:
φ∈SPNincomingpaths
CHnode
Fig.4. PE matching example. And PHJPN be f ore=
{
PLi=PLi−{
(
pk,ev
al(
pk))
:pk∈CHφJPN}
(1) ∪{
(
pl,ev
al(
pl))
∈PLm∈PHI:pl ∈CHφJPN}}
∀
PLi∈PHSPN,∀
φ
fromSPNtoJPN,∀
I∈ f rom(
incoming(
JPN))
ThismeansthatthePHJPNisthesameofthePHSPNexceptforthepredicatesthathavechangedinallJPNincomingpaths.
Inaddition,predicatesoriginallynotinPHSPNinparallelpaths
φ
areaddedinPHJPN aswell.Thesecondcaseismorecomplicated:itinvolvesthecasewhenthesamepredicatechangesindifferentparallelpaths.It isusuallyacaseoferroneousdesign(itfigureslikeananomaly inatransactionbasedsystem),butweconsideritanyway since sometimesthisbehaviour maybeexplicitlywanted. Letusconsiderapartition
ofall paths
φ
connectingSPNtoJPN:
=
{
NC∪
C
}
,NC∩
C=∅
where
C isthesetofpathswhereapredicatechangeexists.Inthesecondcasewehave:
PHJPN be f ore=PH JPN be f oreNC∪PH JPN be f oreC (2) PHJPN
be f oreNC iscomputedasdescribedin(1)butonlyonpathsin
NC.Inaddition,
PHJPN be f oreC=
Inc∈f rom(incoming(JPN))onC PHInc
∪e
v
al(
Prec(
JPN))
WehavenowallelementstounderstandifanOFGissoundintermsof(IO)PEMatching.WeanalyseallnodesintheOFG, buildingforeachnodethesetsPHnodeandPHnode
be f ore.ThenweanalyseagaintheOFG.Twocasesmayhappen:
∀
node∈OFG,Prec(
node)
PLi∀
PLi∈PHnodebe f ore (3)∀
node∈OFG,∃
PLi∈PHbe f orenode :Prec(
node)
PLi (4)AND
∃
j:PLj∈PHnodebe f ore:¬Prec
(
node)
PLjIn the case(3), all execution paths allow forthe executionof a servicein nodeif itmeets the specified Prec(node) pre-conditions.Thecase(4) ismorecomplex:atleastapath existswhereacomponentwithPrec(node) preconditionscanbe executed withoutproblembutatleastone pathexists toowhereaservicemeeting onlypreconditionsinPrec(node) can-not beexecuted.Inthiscase, thematchingalgorithmsalertsusersthat somethingmaygowrongduringtheexecutionof the compositecloud service. Ifthe problemwasan incorrect design, userscan solve the problemby analysing PHnode
be f ore.
Otherwise,propercompensationelementscanbeintroducedinordertocorrectproblematrun-time.
Inorder toprovide an exampleofhow PH sets arebuilt,let usconsiderFig. 4.It depictsan OFGwherebold letters representnodes(activities) names.Predicates appearitalicizedbeloweach node.Withoutlosinggeneralitywereport here onlyeffects.Thepresenceofthenameofapredicate,indicatesthattheprocessevaluatesittrueaftertheexecutionofthe relatedactivity,whilethepresenceofan exclamationmarkmeansthattheprocessevaluates thepredicatefalse.Splitand Join conditionsare reportedtoo.Thefigure showstwocases: inthefirstcase, theLPC=
{
(
P4,true
)
}
,inthesecond case,LPC=
{
(
P4,true
)
,(
P2,f alse)
}
.Inthefirstcase(Fig.5ontheleft),ifPrec
(
I)
={
Prec1,Prec2,P1,P4}
wecanbindtoIaservicewithpreconditionPrec(
I)
={
Prec1,Prec2}
sinceP1 andP4arepropagatedduringprocessexecution.ThesameservicecannotbindtoIinthesecondcase(Fig.5ontheright),becausethereisacasewherePHH thatdoesnotcontainP
4andweareinthecaseof(4).Noticethat PHH describesthesemanticsofallthecompositeprocessexceptfortheexecutionofI.
Fig.5. Propagation.
Fig.6. Block OFG for Load Balancer.
5. LoadBalancerfullexample
Inthissectionwe describeallsteps neededtoprovideanOFGdescriptionoftheLoadBalancerPattern.4 Then wewill discusshowwestudymatchingontherealizedpattern.Thestepswediscussarethefollowing:(1)wedefineaparametric OFGforthepatternandtherelatedPGL;(2)weanalyzesoundnessforagiveninstanceofthepattern;(3)oncesomeIOPE specificationforthepatternarereportedontheOFG,weshowhowmatchingisenacted.
Fig.6 showstheparametric OFG forthe LoadBalancer Pattern. Inthe figure,LBal is theLoad Balancer servicewhich interfaceswithmonitored services;S andVS arerespectively the genericService andVirtualServer wherethe serviceis installed. They are collected in a Block. The Route Activity choose the Service in the Pool forload balancing purposes. It actuallyselects the virtual server withminimal load. This updatesa listof transitionconditions(Cond−Pool):the only
LoadBalancer(S, Service, V irtualServer, instances, E) : P rec(LoadBalancer) = (size(Services) ==
size(V irtualServers)), type(Service) ==
SaaS, type(V irtualServer) ==P aaS
Saas LBal = SaaS();
ConditionCbal = List[instances]; Route r = Route(“lbal.alg”); Monitor m = Monitor();
SaaSActivity Services = List[instances]; PaaSActivity VirtualServers = List[instances]; VirtualServerData[] VSD= List[instances]; createInnerDataVector(VSD);
ServiceData[] SD= List[instances]; createInnerDataVector(SD); connect(lbal,r,ControlFlow,true);
foreach (s:Services, vs:V irtualServers, c:Cbal, i= (1· · ·instances)): bind(Service,s); bind(VirtualServer,v); connect (s,vs,installedOn,0); connect (r,s,ControlFlow,c); connect (s,E,ControlFlow,true); c.value = “false”; connectMonitor(m,vs,monitors,VSD,i);
S.SpliCond=AN D;E.J oinCond=XOR
Fig.7. Load Balancer PGL.
Fig.8. Load Balancer workflow.
conditiontrueistheonethatwillconnecttherouteactivityRwithchosen serviceintheBlock.TheMonitoractivityMon storesloadandperformancesmeasuresintheInnerDatarepositoryoftheProcess.
Fig.7reportsPGLdefinitionfortheLoadBalancer;dataflowisomittedforbrevity’ssake.Newelementstointroduceare: theinstructionstocreatedataintoInnerDataSection(i.e.VirtualServerDataandServiceData,thatcontainsallinformation neededtorecordmonitoredvalues);thebindfunctionthatlinkaSaaSoraPaaStotherelatedactivity.Noticethatlbal.alg
containsthetextthatappearsintherouteactivitybox.Ifweinstancesthispatternwith: LoadBalancer
(
S,Serv
,VirtServ
,2,End)
thegeneratedworkflowistheonedepictedinFig.8.
Thisisthepointwherewedefinethesemanticsofthecompositeservice.Compositeservicedescriptionisdefinedhere intermsofstructure(patternsandOFL).WecanusePreconditionsandEffectsdefinitionsforaddingsemanticsdescriptions. The goal here is to define a Load Balanced GPS navigator service. Hence, load balanced services must compute a path betweentwoGPScoordinates.TheOFGweuseforsemanticsanalysisisinFig.9thatreportsbasic(IO)PEinformationnear eachnode.
Fig.9. OFG with IOPE for Load Balancer.
Itis easy toprove that theprecondition LoadBalancedonboth S1 andS2 issatisfied foranyserviceinstalled since it ispropagated fromPHS1
be f oreandPHSbe f ore2 :boundedserviceshavetoverifyonlytheotherpreconditions.WecanuseasS1
service,anyCloudServicemeetingallS1preconditionexceptLoadBalanced:theS1servicehastobeaGPSNavigatorservice, thatcomputesaroutefromgps1togps2coordinates;S1mustbeinstalledonamonitoredVirtualServerwithagiven avail-ability.IfallpreconditionaresatisfiedintheOFG,TheEndActivityhasthehasRouteeffectsfromgps1andgps2coordinates, allpreconditions inStart,S1 andS2 nodes,aswellasminLoadBalanced.Informationfromtransitions inFig.8that is not relatedtocontrol flow(i.e.all dottedtransitions) generatesPrecondition fortheStartActivity, like installedOnormonitors
predicates.
6. Relatedworks
Intheearly2000sservicecompositionwasintroducedandinvestigatedforwebservices[11,12].Inparticular,BPEL4WS [13]waselectedbyW3CconsortiumasreferencelanguageforcompositionofWebServices.NISTdefinitionsandstandards forCloudComputing includedComposition ofServices by meansof Orchestrationonly inthe last years[1] butthey are stillfarfromformalizingcompositionandorchestrationinthesamewayitwasdone forwebservices.Themain effortin compositionduringlast years focusedon thechoice ofservicesandresources tousein acomposite CloudServicein or-derto improveQualityof Service[14].Many worksdealwithoptimizationproblems [15–23].Anyway, themostofthese workslacksinaformaldefinitionoftheOrchestrationproblem.AtentativeofprovidingaCloudOrchestrationEnginewith anorchestrationlanguage isin[24]whereCOPE(CloudOrchestrationPolicyEngine)ispresented.Peer-to-peerand collab-orative approachesto composition havebeen proposed too: in [25–27]authors show the usefulnessof the platformnot onlyforefficientandreliabledistributedcomputingbutalsoforcollaborativeactivitiesandubiquitouscomputing[28].The onlymature workon Orchestration wasmadeby OASIS inthe TopologyandOrchestration SpecificationforCloud Appli-cation(TOSCA) [29].Severalworkshave beenreportedin literature aboutCloudPattern exploitation [30], butingeneral they contain onlydescriptions of differentdesign patterns.At thebest of ourknowledge, thisis theonly work address-ingcompositionintermsofbothCloudComputingPatternsandWorkflowpatterns.Wethinkthat thesetwoconcepts are strictlyrelatedatdifferentlayersofabstraction.Inaddition,weaddressmatchingproblemnotasoptimizationproblem.We provideawayto copematchingandanalyses oftheorchestration process.Wealsoprovideaformal languageto describe compositionin termsofworkflow.The language isa workflowlanguage, so itisdifferentfromthe other declarativeand imperative-scriptinglanguageusuallyusedinliterature.
7. Conclusionsandfutureworks
Thispaperpresentsa methodologyable tobuild andanalyse compositeCloud Services.Themethodology isbased on CloudPatternsandOrchestrationintermsofworkflowactivities.WeenableCloudDesignerstospecifypatternstheyneedin compositeservicecreation.Pattern-basedspecificationisthenautomaticallytranslatedintoaworkflowprocess.Weprovide aformallanguage (OFL)forprocessdescriptionthat takesintoaccountofresourcesandservicesrelationshipsatdifferent CloudServiceLayers.OFLis formallydefinedandits operationalsemanticscan be usedtoprove soundnessofcomposite services.Inadditionwesolvetheproblemofsemantics-basedmatchingandanalysisofcompositeprocessbymeansof Con-ditionPropagation.Futureworksincludethedefinitionofmodeltransformationalgorithmsforthestudyofotherproperties likeperformances,deadlocks,availabilityetc.
References
[1] VV.AA.Usgovernmentcloudcomputingtechnologyroadmaprelease1.0(draft).In:Specialpublication500-293,2.NIST;2011.p.1–85.
[2] FehlingC,LeymannF,RütschlinJ,SchummD.Pattern-baseddevelopmentandmanagementofcloudapplications.FutureInternet2012;4(1):110–41. [3] DustdarS,SchreinerW.Asurveyonwebservicescomposition.IntJWebGridServ2005;1(1):1–30.
[4] LorenzoGD,MazzoccaN,MoscatoF,VittoriniV. Towardssemanticsdrivengeneration ofexecutablewebservicescompositions.IntJSoftwJSW 2007;2(5):1–15.
[5] Martin D, BursteinM,Mcdermott D,Mcilraith S,Paolucci M, SycaraK,etal.Bringingsemantics towebserviceswith owl-s.World WideWeb 2007a;10(3):243–77.
[6] MedjahedB,MalikZ,BenbernouS.Onthecomposabilityofsemanticwebservices.In:Webservicesfoundations.Springer;2014.p.137–60. [7] MoscatoF,AversaR,MartinoBD,FortisT-F,MunteanuVI.Ananalysisofmosaicontologyforcloudresourcesannotation.In:IEEEproceedingsof
FedCSIS2011conference;2011.p.973–80.
[8] MoscatoF,AmatoF,AmatoA,AversaR.Model–drivenengineeringofcloudcomponentsinmetamorp(h)osy.IntJGridUtilComput2014;5(2):107–22. [9] Martin D, BursteinM,Mcdermott D,Mcilraith S,Paolucci M, SycaraK,etal.Bringingsemantics towebserviceswith owl-s.World WideWeb
2007b;10(3):243–77.
[10] KleinM,Konig-RiesB,MussigM.Whatisneededforsemanticservicedescriptions?aproposalforsuitablelanguageconstructs.IntJWebGridServ 2005;1(3–4):328–64.
[11] Rao J,SuX.Asurveyofautomatedwebservicecompositionmethods.In:Semanticwebservicesandwebprocesscomposition.Springer;2005. p.43–54.
[12] MilanovicN,MalekM.Currentsolutionsforwebservicecomposition.IEEEInternetComput2004:51–9.
[13] WeerawaranaS,CurberaF,LeymannF,StoreyT,FergusonDF.Webservicesplatformarchitecture:SOAP,WSDL,WS-policy,WS-addressing,WS-BPEL, WS-reliablemessagingandmore.PrenticeHallPTR;2005.
[14] JulaA,SundararajanE,OthmanZ.Cloudcomputingservicecomposition:asystematicliteraturereview.ExpertSystAppl2014;41(8):3809–24. [15] Gutierrez-GarciaJO,SimKM.Agent-basedcloudservicecomposition.ApplIntell2013;38(3):436–64.
[16] LiuY,LiM,WangQ.Anoveluser-preference-drivenserviceselectionstrategyincloudcomputing.IntJAdvComputTechnol2012;4(21). [17] MarroneS,NardoneR.Automaticresourceallocationforhighavailabilitycloudservices.ProcediaComputSci2015;52(1):980–7.
[18] PllanaS,BenknerS,XhafaF,BarolliL.Anovelapproachforhybridperformancemodellingandpredictionoflarge-scalecomputingsystems.IntJGrid UtilComput2009;1(4):316–27.
[19] Erfani S, Malek M, Sachar H. An expert system-based approach to capacity allocation in a multiservice application environment. IEEE Netw 1991;5(3):7–12.
[20] FengG,BuyyaR.Maximumrevenue-orientedresourceallocationincloud.IntJGridUtilComput2016;7(1):12–21.
[21] EzugwuAE,BuhariSM,JunaiduSB.Resourcemanagementsystemforscientificvirtuallaboratoryapplications.IntJGridUtilComput2014;6(1):8–20. [22] MondolMAS,AkbarMM.Anewapproachtoscheduleworkflowapplicationsforadvancereservationofresourcesingrid.IntJGridUtilComput
2014;5(3):165–82.
[23] Flammini F., Marrone S., Mazzocca N., Pappalardo A., Pragliola C., Vittorini V. Trustworthiness evaluation of multi-sensor situation recognition in transit surveillance scenarios. Lec. Notes in C. Sc. 8128 LNCS2013:442–456.
[24] LiuC,LooBT,MaoY.Declarativeautomatedcloudresourceorchestration.In:Proceedingsofthe2ndACMsymposiumoncloudcomputing.ACM; 2011.p.26.
[25] BarolliL,XhafaF.Jxta-overlay:ap2pplatformfordistributed,collaborative,andubiquitouscomputing.IndElectronIEEETrans2011;58(6):2163–72. [26] XhafaF,FernandezR,DaradoumisT,BarolliL,Caballé S.Improvementofjxtaprotocolsforsupportingreliabledistributedapplicationsinp2psystems.
In:Network-basedinformationsystems.Springer;2007.p.345–54.
[27] FrenchT,BessisN,XhafaF,MapleC.Towardsacorporategovernancetrustagentscoringmodelforcollaborativevirtualorganisations.IntJGridUtil Comput2011;2(2):98–108.
[28] Barolli L, Xhafa F, Durresi A, De MarcoG. M3ps: a jxta-based multi-platform p2p system and itsweb application tools. Int J Web Inf Syst 2007;2(3/4):187–96.
[29] BinzT,BreitenbücherU,KoppO,LeymannF.Tosca:portableautomateddeploymentandmanagementofcloudapplications.In:Advancedweb ser-vices.Springer;2014.p.527–49.
FloraAmato, Ph.D., is Assistant Professor at the Department of Electrical Engineering and Information Technology of University of Napoli Federico II. Her research activities mainly concern Formal Modeling , Verification Techniques, Knowledge Management, Information Extraction and Integration. She is author of more of 70 research papers, published on International Journals and Conference Proceedings, and she worked as Program Chair in several international Workshops.
FrancescoMoscato, Ph.D., is Researcher and Assistant Professor Professor at Second University of Naples. His research activities include Formal Modeling, Model Driven Engineering and Verification, Intelligent Systems and Cloud Computing. He is author of many research papers, published on International Journals and Conference Proceedings, and he worked in Program Committees of several international Workshops.