Resource-Aware Applications for the Cloud Reiner Hähnle 1 and Einar Broch Johnsen 2 1 Technical University of Darmstadt, Germany haehnle@cs.tu-darmstadt.de 2 University of Oslo, Norway einarj@ifi.uio.no Making'full'usage'of'the'potential'of'virtualized'computation'requires'nothing'' less'than'to'rethink'the'way'in'which'we'design'and'develop'software.' Capitalizing*on*the*Cloud* Theplanet sdatastorageandprocessingisabouttomoveintotheclouds.thishas thepotentialtorevolutionizehowwewillinteractwithcomputersinthefuture.a cloudconsistsofvirtualcomputersthatcanonlybeaccessedremotely.itisnota physicalcomputer,youdonotnecessarilyknowwhereitis,butyoucanuseitto storeandprocessyourdataandyoucanaccessitatanytimefromyourregular computer.ifyoustillhaveanold?fashionedcomputer,thatis.youmightaswell accessyourdataorapplicationsthroughyourmobiledevice,forexamplewhile sittingonthebus.* Cloud?baseddataprocessing,orcloudcomputing,ismorethanjustaconvenient solutionforindividualsonthemove.althoughchallengesremainconcerningthe privacyofdatastoredinthecloud,thecloudisalreadyemergingasaneconomically interestingmodelforastart?up,ansme,orsimplyforastudentwhodevelopsan appasasideproject,duetoanundeniableaddedvalueandcompellingbusiness drivers[1].onesuchdriveriselasticity:businessespayforcomputingresources whentheyareneeded,insteadofprovisioninginadvancewithhugeupfront investments.newresourcessuchasprocessingpowerormemorycanbeaddedtoa virtualcomputeronthefly,oranadditionalvirtualcomputercanbeprovidedtothe clientapplication.goingbeyondsharedstorage,themainpotentialincloud computingliesinitsscalablevirtualizedframeworkfordataprocessing,which becomesasharedcomputingfacilityforyourmultipledevices.ifaserviceuses cloud?basedprocessing,itscapacitycanbeautomaticallyadjustedwhennewusers arrive.anotherdriverisagility:newservicescanbedeployedquicklyandflexibly onthemarketatlimitedcost,withoutinitialinvestmentsinhardware. TheEUbelieves 1 thatcloud?baseddataprocessingwillcreate2.5millionnewjobs andanannualvalueof160billioneurosineuropeby2020.anotherstudy 2 predicts 1 Digital Agenda for Europe, http://ec.europa.eu/digital-agenda/en/european-cloudcomputing-strategy
14millionnewjobsworldwideuntil2015.However,reliabilityandcontrolof resourcesarebarrierstotheindustrialadoptionofcloudcomputingtoday.to overcomethesebarriersandtoregaincontrolofthevirtualizedresourcesonthe cloud,clientservicesneedtobecomeresource?aware. Challenges* Cloudcomputingisnotmerelyanewtechnologyforconvenientandflexibledata storageandimplementationofservices.makingfullusageofthepotentialof virtualizedcomputationrequiresnothinglessthantorethinkthewayinwhichwe designanddevelopsoftware. Empowering+the+Designer.Theelasticityofsoftwareexecutedinthecloudmeans thatdesignershavefarreachingcontrolovertheresourceparametersofthe executionenvironment:thenumberandkindofprocessors,theamountofmemory andstoragecapacity,andthebandwidth.theseparameterscanevenbechanged dynamically,atruntime.thismeansthattheclientofacloudservicenotonlycan deployandrunsoftware,butisalsoinfullcontrolofthetrade?offsbetweenthe incurredcostandthedeliveredquality?of?service. Torealizethesenewpossibilities,softwareinthecloudmustbedesigned'for' scalability.nowadays,softwareisoftendesignedbasedonspecificassumptions aboutdeployment,includingthesizeofdatastructures,theamountofram,andthe numberofprocessors.rescalingrequiresextensivedesignchanges,ifscalabilityhas notbeentakenintoaccountfromthestart. Fig.1:Relativecoststofixsoftwaredefectsforstaticinfrastructure(source:IBM SystemsSciencesInstitute).Thecolumnsindicatethephaseofthesoftware developmentatwhichthedefectisfoundandfixed. 2 IDC White Paper Cloud Computing s Role in Job Creation, http://www.microsoft.com/ en-us/news/features/2012/mar12/03-05cloudcomputingjobs.aspx
+ Deployment+Aspects+at+Design+Time.Theimpactofcloudcomputingonsoftware design,however,goesbeyondscalabilityissues:traditionally,deploymentis consideredalateactivityduringsoftwaredevelopment.intherealmofcloud computing,thiscanbefatal.considerthewell?knowncostincreaseforfixingdefects duringsuccessivedevelopmentphases[2].ibmsystemssciencesinstituteestimates thatadefectwhichcostsoneunittofixindesign,costs15unitstofixintesting (system/acceptance)and100unitsormoretofixinproduction(seefig.1).this costestimationdoesnotevenconsidertheimpact'costdueto,forexample,delayed timetomarket,lostrevenue,lostcustomers,andbadpublicrelations. Fig.2:Estimateofrelativecoststofixsoftwaredefectsforvirtualizedsystemswith elasticity,from[3]. Now,theseratiosareforstaticdeployment.Consideringthehighadditional complexityofresourcemanagementinvirtualizedenvironments,itisreasonableto expectevenmoresignificantdifferences;fig.2conservativelysuggestsratiosfor virtualizedsoftwareinanelasticenvironment.thisconsiderationmakesitclear thatitisessentialtodetectandfixdeploymenterrors,forexample,failuretomeeta servicelevelagreement(sla),alreadyin'the'design'phase. Tomakefullusageoftheopportunitiesofcloudcomputing,softwaredevelopment fortheclouddemandsadesignmethodologythat(a)takesintoaccountdeployment modelingatearlydesignstagesand(b)permitsthedetectionofdeployment'errors earlyandefficiently,helpedbysoftwaretools,suchassimulators,testgenerators, andstaticanalyzers. Controlling*Deployment*In*The*Design*Phase* Ouranalysisexhibitsasoftware'engineering'challenge:howcanthevalidationof deploymentdecisionsbepusheduptothemodelingphaseofthesoftware developmentchainwithoutconvolutingthedesignwithdeploymentdetails?
Fig.3:Conceptualpartsofadeployedcloudservice. Whenaserviceisdevelopedtoday,thedevelopersfirstdesignitsfunctionality,then theydeterminewhichresourcesareneededfortheservice,andultimatelythe provisioningoftheseresourcesiscontrolledthroughansla,seefig.3.the functionalityisrepresentedintheclient'layer.theprovisioning'layermakes resourcesavailabletotheclientlayeranddeterminesavailablememory,processing power,andbandwidth.theslaisalegaldocumentthatclarifieswhatresourcesthe provisioninglayershouldmakeavailabletotheclientservice,whatitcost,and statespenaltiesforbreachofagreement.atypicalslacoverstwoaspects:(i)alegal' contractstatingthemutualobligationsandtheconsequencesincaseofabreach;(ii) thetechnicalparametersandcostfiguresoftheofferedservices,whichwecallthe service'contract. How'can'the'validation'of'deployment'decisions'be'pushed'' up'to'the'modeling'phase'of'the'software'development'chain'' without'convoluting'the'design'with'deployment'details?' Fig.4:Makingservicesresource?aware.
Sofar,thedifferentpartsofadeployedcloudserviceliveinseparateworlds,butwe needtoconnectthem.inafirststeptheprovisioninglayerismadeavailabletothe client,sothattheclientcanobserveandmodifyresourceparameters.wecallthis thecloud'api.thisisnotthesameastheapisthatcloudenvironmentsprovideto theirclientsnow:ourgoalistomovedeploymentaspectsintothedesign'phase.we advocatethatclientbehaviorisrepresentedbyanabstract'behavioral'modelofthe clientapplication,forexampleinanexecutablemodelinglanguagesuchasabs[4]. Suchamodelcanrealisticallybecreatedduringthedesignphase.TheCloudAPIis thenanabstractinterfacetotheprovisioninglayer,seefig.4.such earlymodeling ofclientbehaviormakesitpossibletosimulatedifferentclient?sideprovisioning schemesandobservetheirimpactoncostandperformance. ToconnectSLAswiththeclientlayer,thekeyobservationisthattheservice contractaspectsofanslacanbegivenaformalsemantics.thisenablesformal analysisofclientbehaviorwithrespecttotheslaatdesign'time.possibleanalyses includeresourceconsumption,performance,testcasegeneration,andeven functionalverification[3].formodelinglanguagessuchasabsthisishighly automated[5]. Earlyanalysis makesassumptionsaboutthecloudapiexplicitand enablesthegenerationofmonitorsintheprovisioninglayer.runtimemonitorsthen provide lateanalysis. Opportunities* Makingdeploymentdecisionsatdesign?timeshiftscontrolfromtheprovisioning layertotheclientlayer.theclientservicebecomesresource?aware.thisprovidesa numberofattractiveopportunities. Fine8grained+provisioning.Businessmodelsforresourceprovisioningonthe cloudarebecomingsimilarlyfine?grainedasthoseweknowfromotherindustry sectorssuchastelephonyorelectricity.itisbecomingincreasinglycomplexto decidewhichmodeltoselectforyoursoftware.design?timeanalysisand comparisonofdeploymentdecisionsallowanapplicationtobedeployedaccording totheoptimalpaymentmodelfortheexpectedend?users.cloudcustomerscantake advantageoffine?grainedprovisioningschemessuchasspotprice. Tighter+provisioning.Betterprofilesoftheresourceneedsoftheclientlayerhelp cloudproviderstoavoidover?provisioningtomeettheirslas.betterusageofthe resourcesmeansmoreclientscanbeservedwiththesameamountofhardwarein thedatacenter,withoutviolatingslasandincurringpenalties. Application8specific+resource+control.Design?timeanalysisofscalabilityenables theclientlayertomakebetteruseoftheelasticityofferedbythecloud,toknow beforehandatwhatloadthresholdsitisnecessarytoscaleupthedeploymentto avoidbreakingslasanddisappointingtheexpectationsoftheend?users.
Application8controlled+elasticity.Goingonestepfurther,weforeseeautonomous, resource?awareservicesthatruntheirowndeploymentstrategy.suchaservicewill monitortheloadonitsvirtualmachineinstancesaswellastheend?usertraffic,and makeitsowndecisionsaboutthetrade?offsbetweenthedeliveredqualityofservice andtheincurredcost.theserviceinteractswiththeprovisioninglayerthroughan APItodynamicallyscaleupordown.Theservicemayevenrequestorbidforvirtual machineinstanceswithgivenprofilesonthevirtualresourcemarketplaceofthe future Summary* Wearguedthattheefficiencyandperformanceofcloud?basedservicesareboosted bymovingdeploymentdecisionsupthedevelopmentchain.resource?aware servicesgivetheclientbettercontrolofresourceusage,tomeetslasatlowercost. Weidentifyformalmethods,executablemodels,anddeploymentmodelingasthe ingredientsthatcanmakethisvisionhappen.aconcreterealizationofourideasis currentlybeingimplementedaspartoftheeufp7projectenvisage:engineering VirtualizedServices(http://www.envisage?project.eu). Acknowledgments.ThisworkhasbeenpartiallysupportedbyEUprojectFP7? 610582Envisage:EngineeringVirtualizedServices. References* [1] R. Buyya, C. S. Yeo, S. Venugopal, J. Broberg, and I. Brandic. Cloud computing and emerging IT platforms: Vision, hype, and reality for delivering computing as the 5th utility. Future Generation Comp. Sys., 25(6):599 616, 2009. [2] B. W. Boehm and P. N. Papaccio. Understanding and controlling software costs. IEEE Trans. SW Eng., 14(10):1462 1477, 1988. [3] E. Albert, F. de Boer, R. Hähnle, E. B. Johnsen, and C. Laneve. Engineering virtualized services. In M. A. Babar and M. Dumas, editors, 2nd Nordic Symp. Cloud Computing & Internet Technologies, pages 59 63. ACM, 2013. [4] E. B. Johnsen, R. Hähnle, J. Schäfer, R. Schlatte, and M. Steffen. ABS: A core language for abstract behavioral specification. In B. Aichernig, F. de Boer, and M. M. Bonsangue, editors, Proc. 9th Intl. Symp. on Formal Methods for Components and Objects, volume 6957 of LNCS, pages 142 164. Springer, 2011. [5] E. Albert, F. de Boer, R. Hähnle, E. B. Johnsen, R. Schlatte, S. L. Tapia Tarifa, and P. Y. H. Wong. Formal modeling of resource management for cloud architectures: An industrial case study. J. of Service-Oriented Computing and Applications, 2013. Springer Online First, DOI 10.1007/s11761-013-0148-0.