8/2/2019 Ieee Computer 2004
1/24
COVERFEATURE
PhilipK.
McKinleySeyedMasoudSadjadi
EricP.
KastenBettyH.C.Cheng
MichiganStateUniversity
ComposingAdaptiveSoftware
Compositionaladaptationenablessoftwaretomodifyitsstructureandbehaviordynamicallyinresponsetochangesinitsexecutionenvironment.
Areviewofcurrenttechnologycompareshow,when,andwhererecompositionoccurs.IInterestinadaptivecomputingsystemshasincreaseddramaticallyinthepastfewyears,andavarietyoftechniquesnowallowsoftwaretoadaptdynamicallytoitsenvironment.Tworevolutionsinthecomputingfieldaredrivingthisdevelopment.Firstistheemergenceofubiquitouscomputing,1whichfocusesondissolvingtraditionalboundariesforhow,when,andwherehumansandcomputersinteract.Forexample,
mobilecomputingdevicesmustadapttovariableconditionsonwirelessnetworksandconservelimitedbatterylife.Secondisthegrowingdemandforautonomiccomputing,2whichfocusesondevelopingsystemsthatcanmanageandprotectthemselveswithonlyhigh-levelhumanguidance.Thiscapabilityisespeciallyimportanttosystemssuchasfinancialnetworksandpowergridsthatmustsurvivehardwarecomponentfailuresandsecurityattacks.
MiddlewareCompositionaladaptation
SeparationofconcernsComputationalreflectionComponent-baseddesignFigure1.Maintechnologiessupportingcompositionaladaptation:separationofconcerns,computationalreflection,andcomponent-baseddesign.
Therearetwogeneralapproachestoimplementing
8/2/2019 Ieee Computer 2004
2/24
softwareadaptation.Parameteradaptationmodifiesprogramvariablesthatdeterminebehavior.TheInternetsTransmissionControlProtocolisanoften-citedexample:TCPadjustsitsbehaviorbychangingvaluesthatcontrolwindowmanagementandretransmissionsinresponsetoapparentnetworkcongestion.Butparameteradaptationhasaninherentweakness.Itdoesnotallownewalgorithmsandcomponentstobeaddedtoanapplicationaftertheoriginaldesignandconstruction.Itcantuneparametersordirectanapplicationtouseadifferentexistingstrategy,butitcannotadoptnewstrategies.
Bycontrast,compositionaladaptationexchangesalgorithmicorstructuralsystemcomponentswithothersthatimproveaprogramsfittoitscurrentenvironment.Withcompositionaladaptation,anapplicationcanadoptnewalgorithmsforaddressingconcernsthatwereunforeseenduringdevelopment.Thisflexibilitysupportsmorethansimpletuningofprogramvariablesorstrategyselection.Itenablesdynamicrecompositionofthesoftwareduringexecutionforexample,toswitchprogram
componentsinandoutofamemory-limiteddeviceortoaddnewbehaviortodeployedsystems.
Dynamicrecompositionofsoftwaredatesbacktotheearliestdaysofcomputing,whenself-modifyingcodesupportedruntimeprogramoptimizationandexplicitmanagementofphysicalmemory.However,suchprogramsweredifficulttowriteanddebug.Severalnewsoftwaretoolsandtechnologiesnowhelpaddresstheseproblems.Giventheincreasingpaceofresearchincompositionaladaptation,weofferareviewofthesupportingtechnologies,proposedsolutions,andareasthatrequirefurther
study.
56ComputerPublishedbytheIEEEComputerSociety0018-9162/04/$20.002004IEEE
8/2/2019 Ieee Computer 2004
3/24
MiddlewareandAdaptation
Muchrecentresearchinadaptivesoftwarefocusesonmiddlewarethelayersofservicesseparatingapplicationsfromoperatingsystemsandnetworkprotocols.
DouglasSchmidtdecomposesmiddlewareintofourlayers,1showninFigureA:
Host-infrastructuremiddlewareresidesatoptheoperatingsystemandprovidesahigh-levelAPIthathidestheheterogeneityofhardwaredevices,operatingsystems,andtosomeextentnetworkprotocols.Distributionmiddlewareprovidesahigh-levelprogrammingabstraction,suchasremoteobjects,enablingdeveloperstowritedistributedapplicationsinawaysimilartostand-aloneprograms.Corba,DCOM,andJavaRMIallfitinthislayer.Commonmiddlewareservicesincludefaulttolerance,security,persistence,andtransactionsinvolvingentitiessuchasremoteobjects.Domain-specificmiddlewareservicesaretailoredtomatchaparticularclassofapplications.
Mostadaptivemiddlewareisbasedonanobject-orientedprogrammingparadigmandderivedfrompopularmiddlewareplatformssuchasCorba,JavaRMI,andDCOM/.NET.
Manyadaptivemiddlewareapproachesworkbyinterceptingandmodifyingmessages.FigureBshowstheflowofarequest-replysequenceinasimplifiedCorbaclient-serverapplication.Thisapplicationcomprisestwoautonomousprogramshostedontwocomputersconnectedbyanetwork.
AssumethattheclienthasavalidCorbareferencetotheservantobject.Theclientrequesttotheservantgoesfirsttothestub,whichrepresentstheCorbaobjectontheclientside.The
stubmarshalstherequestandsendsittotheclientobjectrequestbroker.TheclientORBsendstherequesttotheserverORB,whereaskeletonunmarshalstherequestanddeliversittotheservant.Theservantrepliestotherequest,bywayoftheserverORBandskeleton.TheclientORBwillreceivethereplyanddispatchittotheclient.
Inrecentyears,numerousstudieshaveaddressedtheissueofhowmiddlewarecanadapttodynamic,heterogeneousenvironmentstobetterserveapplications.2,3Middlewaretraditionallyhidesresourcedistributionandplatformheterogeneityfromtheapplicationbusinesslogic.Thusitisalogicalplacetoputadaptivebehaviorthatisrelatedtocrosscuttingconcernssuchas
QoS,energymanagement,faulttolerance,andsecuritypolicy.
References
1.D.C.Schmidt,MiddlewareforReal-TimeandEmbeddedSystems,Comm.ACM,June2002,pp.43-48.2.Comm.ACM,specialissueonadaptivemiddleware,June2002,pp.30-64.
8/2/2019 Ieee Computer 2004
4/24
3.IEEEDistributedSystemsOnline,specialissueonreflectivemiddleware,June2001;http://dsonline.computer.org/0105/features/gei0105.htm.ApplicationsDomain-specificmiddlewareservicesCommonmiddlewareservicesDistributionmiddlewareHost-infrastructuremiddlewareOperatingsystemsandprotocolsHardwaredevices
FigureA.Four-layerdecompositionofmiddlewaretobridgethegapbetweenanapplicationprogramandtheunderlyingoperatingsystems,networkprotocols,andhardwaredevices.
ClientapplicationServerapplication
ClientApplicationsServantDomainservicesCommonservicesStubSkeletonDistribution
ClientORBServerORBHostinfrastructureSystemplatform
NetworkRequestflow
Replyflow
FigureB.Corbacallsequenceforasimplifiedclient-serverapplication.
ENABLINGTECHNOLOGIESInaddition,thewidespreaduseofmiddleware
Atthecoreofallapproachestocompositionalindistributedcomputinghasbeenacatalystforadaptationisalevelofindirectionforinterceptingcompositionaladaptationresearch.Middlewareandredirectinginteractionsamongprogramenti-providesanaturalplacetolocatemanytypesties.Figure1showsthreetechnologiessepara-ofadaptivebehavior,astheMiddlewareandtionofconcerns,computationalreflection,andAdaptationsidebardescribes.
component-baseddesignthatweconsideraskeytoreconfigurablesoftwaredesign.ProgrammersSeparationofconcernscanusethesetechnologiestoconstructself-adap-Separationofconcerns4enablestheseparatetivesystemsinasystematicandprincipledasdevelopmentofanapplicationsfunctionalbehavopposedtoadhocmanner.3iorthatis,itsbusinesslogicandthecodefor
July2004
8/2/2019 Ieee Computer 2004
5/24
57
8/2/2019 Ieee Computer 2004
6/24
BaselevelApplicationMOPsObjectsMetalevelStructuralBehavioralIntrospectionIntercessionIntercessionIntrospectionBaselevelApplicationMOPsObjectsMetalevelStructuralBehavioralIntrospectionIntercessionIntercessionIntrospectionFigure2.Metalevelunderstandingcollectedintometaobjectprotocols.
crosscuttingconcerns,suchasqualityofservice(QoS),energyconsumption,faulttolerance,andsecurity.Anapplicationcannotimplementacrosscutting
concernatasingleprogramlocation;instead,itmustaddthecodeatmanyplaces.Separatingcrosscuttingconcernsfromfunctionalbehaviorsimplifiesdevelopmentandmaintenance,whilepromotingsoftwarereuse.
Separationofconcernshasbecomeanimportantprincipleinsoftwareengineering.5Presently,themostwidelyusedapproachappearstobeaspect-orientedprogramming.6AOPprovidesabstractiontechniquesandlanguageconstructstomanagecrosscuttingconcerns.Thecodeimplementingtheseconcerns,calledaspects,isdevelopedseparately
fromotherpartsofthesystem.InAOP,pointcutsaresetsoflocationsinthecodewherethedevelopercanweaveinaspects.Pointcutsaretypicallyidentifiedduringdevelopment.Later,forexampleduringcompilation,thedeveloperusesaspecializedcompiler,calledanaspectweaver,tocombinedifferentaspectswithanapplicationsbusinesslogictocreateaprogramwithnewbehavior.AnexampleistheAspectJcompiler.AOPproponentsarguethatdisentanglingcrosscuttingconcernsleadstosimplersoftwaredevelopment,maintenance,andevolution.
AOPisimportanttodynamicrecompositionbecausemostadaptationsarerelativetosomecrosscuttingconcern,suchasQoS.AOPenablestheseconcernstobeisolatedfromtherestoftheprogram.However,intraditionalAOPthecompiledprogramisstilltangled.Tosupportdynamicrecomposition,theprogrammerneedsawaytomaintainthisseparationatruntime.
Computationalreflection
8/2/2019 Ieee Computer 2004
7/24
Computationalreflectionreferstoaprogramsabilitytoreasonabout,andpossiblyalter,itsownbehavior.7Reflectionenablesasystemtorevealselecteddetailsofitsimplementationwithoutcompromisingportability.
Reflectioncomprisestwoactivities:introspection
toletanapplicationobserveitsownbehavior,and
intercessiontoletasystemorapplicationacton
theseobservationsandmodifyitsownbehavior.Inaself-auditingdistributedapplication,forexample,softwaresensorscoulduseintrospectiontoobserveandreportusagepatternsforvariouscomponents.Intercessionwouldallowthesystemtoinsertnewtypesofsensors,aswellascomponentsthatimplementcorrectiveaction,atruntime.
AsFigure2shows,areflectivesystem(representedasbase-levelobjects)anditsself-representation(representedasmetalevelobjects)are
causallyconnected,meaningthatmodificationstoeitheronewillbereflectedintheother.
Ametaobjectprotocol(MOP)isaninterfacethatenablessystematicintrospectionandintercessionofthebase-levelobjects.MOPssupporteitherstructuralorbehavioralreflection.3Structuralreflectionaddressesissuesrelatedtoclasshierarchy,objectinterconnection,anddatatypes.Asanexample,ametalevelobjectcanexamineabase-levelobjecttodeterminewhatmethodsareavailableforinvocation.Conversely,behavioralreflectionfocusesontheapplicationscomputational
semantics.Forinstance,adistributedapplicationcanusebehavioralreflectiontoselectandloadacommunicationprotocolwellsuitedtocurrentnetworkconditions.
AdevelopercanusereflectiveservicesthatareeithernativetoaprogramminglanguagesuchasCommonLispObjectSystem(CLOS),Python,orvariousJavaderivativesorprovidedbyamiddlewareplatform.WhencombinedwithAOP,reflectionenablesaMOPtoweavecodeforcrosscuttingconcernsintoanapplicationatruntime.However,dynamicallyloadingandunloading
adaptivecoderequiresthetargetsoftwaremodulestoexhibitaplug-and-playcapability.
Component-baseddesign
Thethirdmajortechnologysupportingcompositionaladaptationiscomponent-baseddesign.Softwarecomponentsaresoftwareunitsthatthirdpartiescanindependentlydevelop,deploy,andcompose.9Popularcomponent-basedplatforms
8/2/2019 Ieee Computer 2004
8/24
includeCOM/DCOM,.NET,EnterpriseJavaBeans,andtheCorbaComponentModel.
Component-baseddesignsupportstwotypesofcomposition.Instaticcomposition,adevelopercancombineseveralcomponentsatcompiletimetoproduceanapplication.Indynamiccomposition,thedevelopercanadd,remove,orreconfigurecomponentswithinanapplicationatruntime.Toprovidedynamicrecomposition,acomponent-basedframeworkmustsupportlatebinding,whichenablescouplingofcompatiblecomponentsatrun
58Computer
8/2/2019 Ieee Computer 2004
9/24
Table1.Exampleresearchprojects,commercialpackages,andstandardspecificationsthatprovidecompositionaladaptation.ProjectInstitution/Organization
Language-basedprojects
AspectJXeroxPaloAltoResearchCenterCompositionfiltersUniversiteitTwente,TheNetherlandsProgramControlLanguage(PCL)UniversityofIllinoisOpenJavaIBMResearchR-JavaUniversityFederaldeSoCarlos,BrazilKavaUniversityofNewcastle,UKAdaptiveJavaMichiganStateUniversityTransparentReflectiveAspectProgramminginJava(TRAP/J)MichiganStateUniversityMiddleware-basedprojectsDomain-specificserviceslayer:BoeingBoldStroke(BBS)BoeingCommonserviceslayer:CorbaServicesObjectManagementGroupQualityobjects(QuO)BBNTechnologiesAdaptiveCorbaTemplate(ACT)MichiganStateUniversity
InteroperableReplicationLogic(IRL)UniversityofRome,ItalyDistributionlayer:.NETremotingMicrosoftOpenORBandOpenCOMLancasterUniversity,UKTheACEORB(TAO)andComponentIntegratedACEORB(CIAO)DistributedObjectComputingGroupDynamicTAOandUniversallyInteroperableCore(UIC)UniversityofIllinoisOrbix,Orbix/E,andORBacusIonaTechnologiesSquirrelUniversityofKaiserslautern,GermanyAspectIXFriedrich-AlexanderUniversity,GermanyHostinfrastructurelayer:
Javavirtualmachine(JVM)
CommonLanguageRuntime(CLR)SunMicrosystemsMicrosoftIguana/JTrinityCollege,DublinProseSwissFederalInstituteofTechnologyAdaptiveCommunicationEnvironment(ACE)EnsembleDistributedObjectComputingGroupCornellUniversityCross-layerprojectsDistributedExtensibleOpenSystems(DEOS)GraceGeorgiaInstituteofTechnology
UniversityofIllinois
timethroughwell-definedinterfacesusedascontracts.Inaddition,toprovideconsistencywithotherapplications,acomponent-basedframeworkmustsupportcoexistenceofmultipleversionsofcomponents.
Byenablingtheassemblyofoff-the-shelfcomponentsfromdifferentvendors,component-based
8/2/2019 Ieee Computer 2004
10/24
designpromotessoftwarereuse.Moreover,mechanismsformaintainingaprogramscomponentstructureaftertheinitialdeployment,whencombinedwithlatebinding,facilitatecompositionaladaptation.
Middlewareandotherfactors
Inadditiontothethreemaintechnologiessupportingdynamicrecomposition,manyotherfactorshavecontributedtothegrowthinthisarea.Perhapsthemostimportantismiddlewares
increasingroleindistributedcomputing.Middle-wareprovidesalayerthatdeveloperscanexploittoimplementadaptivebehavior.Indeed,manyapproachestocompositionaladaptationarerealizedinvariousmiddlewarelayers.
Othertechnologiesimportanttoadaptivesoftwaredesignincludesoftwaredesignpatterns,mobileagents,generativeprogramming,adaptiveprogramming,andintentionalprogramming.5
COMPOSITIONALADAPTATIONTAXONOMY
Researchersanddevelopershaveproposedawidevarietyofmethodsforsupportingcompositionaladaptation.Table1listsseveralresearchprojects,commercialsoftwarepackages,andstandardspecificationsthatsupportsomeformofcompositionaladaptation.Thelistisbynomeansexhaustive.Rather,itincludesprojectsthatexemplifythe
July2004
59
8/2/2019 Ieee Computer 2004
11/24
Table2.Softwarerecompositiontechniques.
TechniqueDescriptionExamplesFunctionpointersApplicationexecutionpathisdynamicallyVtablesinCOM,delegatesandeventsinredirectedthroughmodificationoffunction.NET,callbackfunctionsinCorbapointers.WrappersObjectsaresubclassedorencapsulatedbyotherACE,R-Java,PCL,QuO,TRAP/Jobjects(wrappers),enablingthewrappertocontrolmethodexecution.ProxiesSurrogates(proxies)areusedinplaceofobjects,ACT,AspectIXenablingthesurrogatetoredirectmethodcallstodifferentobjectimplementations.StrategypatternEachalgorithmimplementationisencapsulated,DynamicTAOandUICenablingtransparentreplacementofoneimplementationwithanother.VirtualcomponentpatternComponentplaceholders(virtualcomponents)areACEandTAOinsertedintotheobjectgraphandreplacedasneededduringprogramexecution.MetaobjectprotocolMechanismssupportingintercessionandOpenJava,Kava,TRAP
/J,OpenORB,introspectionenablemodificationofprogramOpenCOM,Iguana/Jbehavior.AspectweavingCodefragments(aspects)thatimplementaAspectJ,CompositionFilters,TRAP/J,crosscuttingconcernarewovenintoanapplicationAspectIX,Iguana/J,Prosedynamically.MiddlewareinterceptionMethodcallsandresponsespassingthroughaACT,IRL,Prosemiddlewarelayerareinterceptedandredirected.IntegratedmiddlewareAnapplicationmakesexplicitcallstoadaptiveAdaptiveJava,Orbix,Orbix/E,ORBacus,servicesprovidedbyamiddlewarelayer.BBS,CIAO,Iguana/J,Ensemble
distinctionsinataxonomywehavedevelopedbasedonhow,when,andwheresoftwarecompositiontakesplace.Wehaveappliedthetaxonomytomanyadditionalprojects.10
Howtocompose
Thefirstdimensionofourtaxonomyaddressesthespecificsoftwaremechanismsthatenablecompositionaladaptation.Table2listsseveralkeytechniqueswithbriefdescriptionsandexamples.MehmetAksitandZidChoukair8provideanexcellentdiscussionofsuchmethods.
AllofthetechniquesinTable2createalevelofindirectionintheinteractionsbetweenprogramentities.Sometechniquesusespecificsoftwaredesignpatternstorealizethisindirection,whereasothersuseAOP,reflection,orboth.Thetwomiddlewaretechniquesbothmodifyinteractionbetweentheapplicationandmiddlewareservices,buttheydifferinthefollowingway:Middlewareinterceptionisnotvisibletotheapplication,
8/2/2019 Ieee Computer 2004
12/24
whereasintegratedmiddlewareprovidesadaptiveservicesinvokedexplicitlybytheapplication.
Weusethetermcomposertorefertotheentitythatusesthesetechniquestoadaptanapplication.Thecomposermightbeahumanasoftwaredeveloperoranadministratorinteractingwitharunningprogramthroughagraphicaluserinterfaceorapieceofsoftwareanaspectweaver,acomponent
loader,aruntimesystem,orametaobject.Indeed,autonomiccomputingpromisesthat,increasingly,composerswillbesoftwarecomponents.
Whenandwherethecomposermodifiestheprogramdeterminesthetransparencyoftherecomposition.Transparencyreferstowhetheranapplicationorsystemisawareoftheinfrastructureneededforrecomposition.Forexample,amiddlewareapproachtoadaptationistransparentwithrespecttotheapplicationsourcecodeiftheapplicationdoesnotneedtobemodifiedtotakeadvantageoftheadaptivefeatures.Differentdegreesoftransparency(withrespecttoapplication
source,virtualmachine,middlewaresource,andsoon)determineboththeproposedsolutionsportabilityacrossplatformsandhoweasilyitcanaddnewadaptivebehaviortoexistingprograms.10
Whentocompose
Second,wedifferentiateapproachesaccordingtowhentheadaptivebehavioriscomposedwiththebusinesslogic.Generallyspeaking,latercompositiontimesupportsmorepowerfuladaptationmethods,butitalsocomplicatestheproblemofensuringconsistencyintheadaptedprogram.For
example,whencompositionoccursatdevelopment,compile,orloadtime,dynamismislimitedbutitiseasiertoensurethattheadaptationwillnotproduceanomalousbehavior.Ontheother
60Computer
8/2/2019 Ieee Computer 2004
13/24
Applicationtype
Figure3.Classification
Mutable
forsoftware
Dynamic
compositionusing
composition
Tunable
thetimeofcompositionor
Configurable
recompositionasaclassification
Static
Customizable
compositionmetric.
Hardwired
Development
Compile/link
Load
Runtime
timetime
time
Increasingdynamism
hand,whileruntimecompositionisverypowerful,itisdifficulttousetraditionaltestingandformalverificationtechniquestochecksafetyandothercorrectnessproperties.Figure3illustratestheuseofcompositiontimeastheclassificationmetricforadaptiveapplications.Theverticalaxislistsapplicationtypesthatimplementeitherstaticordynamiccomposition.Staticcompositionmethodstakeplaceatdevelopment,compile,orloadtime,whereasdynamiccompositionreferstomethods
8/2/2019 Ieee Computer 2004
14/24
thatacomposercanapplyatruntime.
Staticcomposition.Ifanadaptiveprogramiscomposedatdevelopmenttime,thenanyadaptivebehaviorishardwiredintotheprogramandcannotbechangedwithoutrecoding.
Alternatively,adeveloperorusercanimplementalimitedformofadaptationatcompiletimeorlinktimebyconfiguringtheapplicationforaparticularenvironment.Forexample,aspect-orientedprogramminglanguagessuchasAspectJenableweavingofaspectsintoprogramsduringcompilation.Aspectsmightimplementanenvironment-specificsecurityorfault-tolerancepolicy.Suchcustomizableapplicationsrequireonlyrecompilationorrelinkingtofittoanewenvironment.
Configurableapplicationsdelaythefinaldecisiononthealgorithmicunitstouseinthecurrentenvironmentuntilarunningapplicationloadsthecorrespondingcomponent.Forexample,theJavavirtualmachine(JVM)loadsclasseswhenaJavaapplicationfirstusesthem.Althoughweconsider
load-timecompositionatypeofstaticcomposition,itoffersmoredynamismthanotherstaticmethods.Whentheapplicationrequeststheloadingofanewcomponent,decisionlogicmightselectfromalistofcomponentswithdifferentcapabilitiesorimplementations,choosingtheonethatmostcloselymatchesthecurrentneeds.Forexample,ifauserstartsanapplicationonahandheldcomputer,theruntimesystemmightloadaminimaldisplaycomponenttoguaranteeproperpresentation.
Otherload-timeapproachesworkbydynamicallymodifyingtheclassitselfasitisloaded.For
example,toprovideruntimemonitoringanddebuggingcapabilities,KavaenablestheJVMtomodifythebytecodeasitloadsaclass.
Dynamiccomposition.Themostflexibleapproachestocompositionaladaptationimplementitatruntime.Acomposercanreplaceorextendalgorithmicandstructuralunitsduringexecutionwithouthaltingandrestartingtheprogram.Wedifferentiatetwotypesofapproachesaccordingtowhetherornotthecomposercanmodifytheapplicationsbusinesslogic.
Tunablesoftwareprohibitsmodificationofcodeforthebusinesslogic.Instead,itsupportsfine-tuningofcrosscuttingconcernsinresponsetochangingenvironmentalconditions,suchasdynamicconditionsencounteredinmobilecomputingenvironments.AnexampleisthefragmentobjectmodelusedinAspectIX,whichenablesruntimetuningofaCorbaapplicationsdistributionbehavior.
8/2/2019 Ieee Computer 2004
15/24
Incontrast,mutablesoftwareallowsthecomposertochangeeventheprogramsimperativefunction,enablingdynamicrecompositionofarunningprogramintoonethatisfunctionallydifferent.Forexample,intheOpenORBmiddlewareplatform,allobjectsinthemiddlewareandapplicationcodehavereflectiveinterfaces,soatruntimethereflectiveapplicationcanchangevirtuallyanyobjectinanyway,includingmodifyingitsinterfaceandinternalimplementation.Whileverypowerful,inmostcasesthedevelopermustconstrainthisflexibilitytoensurethesystemsintegrityacrossadaptations.
Wheretocompose
Thefinaldimensioninwhichwecompareapproachestocompositionaladaptationcentersonwhereinthesystemthecomposerinsertstheadaptivecode.Thepossibilitiesincludeoneofthemiddlewarelayers(seeFigureAintheMiddlewareandAdaptationsidebar)ortheapplicationcodeitself.Inthissurvey,wedonotdiscusschangestotheoperatingsystem;however,wenotethatoperatingsystemextensibilityisanactiveresearcharea.
Moreover,adaptationsincross-layerframeworks
July2004
61
8/2/2019 Ieee Computer 2004
16/24
suchasDEOSandGraceinvolvethecoop-
Introducingadaptivebehaviorinhighermiddlewarelayersenablesportabilityacrossvirtualmachines.
erationoftheoperatingsystem,middleware,andapplication.
Middlewarelayers.Projectsinvolvingcompositionaladaptationatthehost-infrastructuremiddlewarelayergenerallyfallinoneoftwogroups.Oneapproachistoconstructalayerofadaptablecommunicationservices.ACEisanearlyexamplethatusedservicewrappersandC++dynamicbindingtosupportadaptableinterprocesscommunication
andeventhandlingservices.Ensemblepro
videsalayeredarchitecturethatenablesadistributedapplicationtoselectaparticularcommunicationprotocol.
Thesecondapproachistoprovideavirtualmachinewithfacilitiestointerceptandredirectinteractionsinthefunctionalcode.Forexample,JVMandcommonlanguageruntime(CLR)facilitatedynamicrecompositionthroughreflectionfacilitiesprovidedbytheJavalanguageand.NETplatform,respectively.R-Javasupportsmetaobjects
byaddinganewinstructiontotheJavainterpreter,whileProseandIguana/JuseaspectweavingtoaddbehavioralreflectiontothestandardJVM.Ingeneral,approachesinthiscategoryareveryflexiblewithrespecttodynamicreconfigurationinthattheyallownewcodetobeintroducedatruntime.However,theyusecustomizedvirtualmachinestoprovidetransparencytotheapplication,whichmayreduceportability.
Introducingadaptivebehaviorinhighermiddlewarelayersdistribution,commonservices,anddomain-specificservicesenablesportability
acrossvirtualmachines.Theseapproachestypicallyinvolvemiddlewarecomponentsthatinterceptmessagesassociatedwithremotemethodinvocationsandredirectormodifytheminamannerthataccountsforcurrentconditions.Forsomeframeworks,theapplicationdeveloperconstructsexplicitcallstoadaptivemiddlewareservices.ExamplesincludeOrbix,Orbix/E,ORBacus,CIAO,andBoeingBoldStroke.QuOuseswrappersaroundCorbastubsandskeletonstogaincontrol
8/2/2019 Ieee Computer 2004
17/24
ofthecallsequence,whereasIRLandACTuseCorbaportableinterceptorstodoso.Portableinterceptorsserveasgenerichooksthatacomposercanuseatruntimetoloadothertypesofinterceptors.Sinceausercanloadaportableinterceptorusingacommand-lineparameter,thisapproachenablesthecomposertointegrateadaptivecomponentsintotheprogramwithoutmodifyingeithertheapplicationorthemiddlewarecode.
Applicationcode.Althoughmiddlewareapproachessupporttransparentadaptation,theyapplyonlytoprogramsthatarewrittenagainstaspecificmiddlewareplatform.Amoregeneralapproachisfordeveloperstoimplementcompositionaladaptationintheapplicationprogramitself.
Twomaintechniquesareavailable.Thefirstistoprogramallorpartoftheapplicationcodeusingalanguagethatdirectlysupportsdynamicrecomposition.Somelanguages,suchasCLOSorPython,providesupportinherently,whileothershavebeenextendedtosupportadaptation.Forexample,Open
Java,R-Java,Handi-Wrap,PCL,andAdaptiveJavaallextendJavatoincludenewkeywordsandconstructsthatenhancetheadaptivecodesexpressiveness.However,thisapproachrequiresthedevelopertousethesefeaturesexplicitlyinconstructingtheprogram.
Thesecondtechniqueistoweavetheadaptivecodeintothefunctionalcode.AspectJandCompositionFiltersweaveadaptivebehaviorintoexistingapplicationsatcompiletime.Incontrast,toolssuchasTRAP/Juseatwo-stepapproachtoenabledynamicrecomposition.Inthefirststep,an
aspectweaverinsertsgenericinterceptionhooks,inthiscaseimplementedasaspects,intotheapplicationcodeatcompiletime.Inthesecondstep,acomposerdynamicallyweavesnewadaptivecomponentsintotheapplicationatruntime,andametaobjectprotocolusesreflectiontoforwardinterceptedoperationstotheadaptivecomponents.Thisapproachoffersawaytoaddadaptivebehaviortoexistingapplicationstransparentlywithrespecttotheoriginalcode.Suchacapabilityisimportantasusersexpectlegacyapplicationstoexecuteeffectivelyacrossanincreasinglydiversecomputinginfrastructure.
KEYCHALLENGES
Despitemanyadvancesinmechanismstosupportcompositionaladaptation,thefullpotentialofdynamicallyrecomposablesoftwaresystemsdependsonfundamentaladvancesonfourotherfronts.
Assurance
8/2/2019 Ieee Computer 2004
18/24
Recomposablesoftwaredesignrequiresaprogrammingparadigmthatsupportsautomatedcheckingofbothfunctionalandnonfunctionalsystemproperties.11
Tohelpensuretheadaptedsystemscorrectness,developersmustfirstcertifyallcomponentsforcorrectnesswithrespecttotheirspecifications.Theycanobtainthiscertificationeitherbyselectingcom
62Computer
8/2/2019 Ieee Computer 2004
19/24
ponentsthathavealreadybeenverifiedandvalidatedofflineusingtraditionaltechniques,suchastesting,inspection,andmodelchecking,orbygeneratingcodeautomaticallyfromspecifications.Thecertificationcanincludenonfunctionalrequirements,suchassecurityandperformance,aswellasfunctionalrequirements.
Second,techniquesareneededtoensurethatthesystemstillexecutesinanacceptable,orsafe,mannerduringtheadaptationprocess.Ourgroupandothersareusingdependencyanalysistoaddressthisproblem.Inaddition,developerscanusehigh-levelcontracts12andinvariantstomonitorsystemcorrectnessbefore,during,andafteradaptation.
Security
Whereasassurancedealsprimarilywithsystemintegrity,securityaddressesprotectionfrommaliciousentitiespreventingwould-beattackersfromexploitingtheadaptationmechanisms.Inadditiontoverifyingcomponentsources,anadaptivesoftware
systemmustprotectitscorefromattackers.Variouswell-studiedsecuritymechanismsareavailable,suchasstrongencryptiontoensuretheconfidentialityandauthenticityofmessagesrelatedtoadaptation.
However,thesystemmustalsohideadaptationmanagementfromwould-beintrudersandpreventthemfromimpedingorcorruptingtheadaptationprocess.Acomprehensiveapproachtothisproblemmustensuretheintegrityofthedatausedindecision-makingandconcealtheadaptiveactions,perhapsbyobscuringthemwithinothersystemactivities.
Interoperability
Distributedsystemsthatcanadapttotheirenvironmentmustbothadaptindividualcomponentsandcoordinateadaptationacrosssystemlayersandplatforms.Softwarecomponentsarelikelytocomefromdifferentvendors,sothedevelopermayneedtointegratedifferentadaptivemechanismstomeetanapplicationsrequirements.Theproblemiscomplicatedbythediversityofadaptivesoftwareapproachesatdifferentsystemlayers.Evensolutionswithinthesamelayerareoftennotcompatible.
Developersneedtoolsandmethodstointegratetheoperationofadaptivecomponentsacrossthelayersofasinglesystem,amongmultiplecomputingsystems,andbetweendifferentadaptiveframeworks.
Decisionmaking
Adaptivesystemsrespondtoadynamicphysical
8/2/2019 Ieee Computer 2004
20/24
world.Theymustactautonomously,modifying
softwarecompositiontobetterfitthecurrent
environmentwhilepreventingdamageorlossofservice.Decision-makingsoftwareusesinputfromsoftwareandhardwaresensorstodecidehow,when,andwheretoadaptthesystem.Interactivesystemsmayevenrequirethedecisionmakertolearnaboutandadapttouserbehavior.
Someresearchershaveconstructedsoft
waredecisionmakersusingrule-basedapproachesorcontroltheory.Othershavedesigneddecisionmakerswhoseactionsareinspiredbybiologicalprocesses,suchasthehumannervoussystemandemergentbehaviorininsectspeciesthatformcolonies.
Theseapproachestodecisionmakinginadaptivesoftwarehavebeeneffectiveincertaindomains,but
environmentaldynamicsandsoftwarecomplexityhavelimitedtheirgeneralapplication.Moreextensiveresearchindecisionmakingforadaptivesoftwareisneeded.Futuresystemsmustaccommodatehigh-dimensionalsensorydata,continuetolearnfromnewexperience,andtakeadvantageofnewadaptationsastheybecomeavailable.
MManyofthemechanismsforcompositionaladaptationareavailablenow,andweexpecttheirusetoincreaseasprogrammersbecome
morefamiliarwithadaptivesoftwaretechnologiesandsocietycomestoexpectcomputersystemstomanagethemselves.Thereisapotentialdownside,however,inthelackofsupportingdevelopmentenvironments.Compositionaladaptationispowerful,butwithoutappropriatetoolstoautomaticallygenerateandverifycode,itsusecannegativelyimpactratherthanimprovesystemintegrityandsecurity.
Thecomputersciencecommunitymustbuilddevelopmenttechnologiesandtools,wellgroundedinrigoroussoftwareengineering,tosupportcompositionaladaptation.Thisfoundationwillraise
thenextgenerationofcomputingtonewlevelsofflexibility,autonomy,andmaintainabilitywithoutsacrificingassuranceandsecurity.
Acknowledgments
Weexpressourgratitudetothemanyindividualswhohavecontributedtothisemergingareaofstudy.DiscussionswithresearchersassociatedwithmanyoftheprojectslistedinTable1havegreatly
8/2/2019 Ieee Computer 2004
21/24
improvedourunderstandingofthisarea.WealsothankthefacultyandstudentsintheSoftwareEngineeringandNetworkSystemsLaboratoryat
Thesystemmustalsohideadaptationmanagementfromwould-beintruders.
July2004
63
8/2/2019 Ieee Computer 2004
22/24
MichiganStateUniversityfortheircontributionstoRAPIDware,Meridian,andrelatedprojects.
ThisworkwassupportedinpartbyNationalScienceFoundationgrantsCCR-9901017,CCR9912407,EIA-0000433,EIA-0130724,andITR0313142,andbytheUSDepartmentoftheNavy,OfficeofNavalResearch,undergrantno.N0001401-1-0744.
Furtherinformation
Ourgroupisparticipatingincompositionaladaptationresearchthroughtwoprojects:RAPIDware(www.cse.msu.edu/rapidware)addressesadaptivesoftwareforprotectingcriticalinfrastructures,andMeridian(www.cse.msu.edu/meridian)addressesautomatedsoftwareengineeringformobilecomputing.Amongotherartifacts,theseprojectsproducedACT,AdaptiveJava,andTRAP/J.ThetechnicalreportonourtaxonomyisalivingdocumentavailablethroughtheRAPIDwareURL.
References
1.M.Weiser,HotTopics:UbiquitousComputing,Computer,Oct.1993,pp.71-72.2.J.O.KephartandD.M.Chess,TheVisionofAutonomicComputing,Computer,Jan.2003,pp.41-50.3.G.S.Blairetal.,AnArchitectureforNext-GenerationMiddleware,Proc.IFIPIntlConf.DistributedSystemsPlatformsandOpenDistributedProcessing(Middleware98),Springer,1998,pp.191-206.
4.D.L.Parnas,OntheCriteriatoBeUsedinDecomposing
SystemsintoModules,Comm.ACM,Dec.1972,pp.1053-1058.5.K.CzarneckiandU.Eisenecker,GenerativeProgramming,Addison-Wesley,2000.6.G.Kiczalesetal.,Aspect-OrientedProgramming,Proc.EuropeanConf.Object-OrientedProgramming(ECOOP),LNCS1241,Springer-Verlag,1997,pp.220-242.
7.P.Maes,ConceptsandExperimentsinComputationalReflection,Proc.ACMConf.Object-OrientedProgrammingSystems,Languages,andApplications(OOPSLA),ACMPress,1987,pp.147-155.
8.M.AksitandZ.Choukair,Dynamic,Adaptive,andReconfigurableSystemsOverviewandProspectiveVision,Proc.23rdIntlConf.DistributedComputingSystemsWorkshops(ICDCSW03),IEEECSPress,May2003,pp.84-89.9.C.Szyperski,ComponentSoftware:BeyondObject-OrientedProgramming,2nded.,Addison-Wesley,2002.10.P.K.McKinleyetal.,ATaxonomyofCompositional
8/2/2019 Ieee Computer 2004
23/24
Adaptation,tech.reportMSU-CSE-04-17,Dept.ComputerScienceandEngineering,MichiganStateUniv.,2004.11.N.Venkatasubramanian,SafeComposabilityofMiddlewareServices,Comm.ACM,June2002,pp.49-52.12.A.Beugnardetal.,MakingComponentsContractAware,Computer,July1999,pp.38-45.PhilipK.McKinleyisaprofessorintheDepartmentofComputerScienceandEngineeringatMichiganStateUniversity.Hisresearchinterestsincludeadaptivemiddleware,mobilecomputing,pervasivecomputing,distributedsystems,andgroupcommunication.McKinleyreceivedaPhDincomputersciencefromtheUniversityofIllinoisatUrbana-Champaign.HeisamemberoftheIEEEComputerSocietyandtheACM.Contacthimatmckinley@cse.msu.edu.
SayedMasoudSadjadiisaPhDcandidateintheDepartmentofComputerScienceandEngineeringatMichiganStateUniversity.Hisresearchinterestsincludeadaptivesoftware,middleware,pervasivecomputing,autonomiccomputing,andsensornetworks.
SadjadireceivedanMSinsoftwareengineeringfromAzadUniversityatTehran.HeisastudentmemberoftheIEEEComputerSocietyandtheACM.Contacthimatsadjadis@cse.msu.edu.
EricP.KastenisaPhDcandidateintheDepartmentofComputerScienceandEngineeringandasoftwaredeveloperintheNationalSuperconductingCyclotronLaboratory,bothatMichiganStateUniversity.Hisresearchinterestsincludeautonomiccomputingandlearningalgorithmsforadaptablesoftware.KastenreceivedanMSincomputersciencefromMichiganStateUniversity.Heisamember
BettyH.C.ChengisaprofessorintheDepartmentofComputerScienceandEngineeringatMichiganStateUniversity.Herresearchinterestsincludeformalmethodsforsoftwareengineering,component-basedsoftwaredevelopment,object-orientedanalysisanddesign,embeddedsystemsdevelopment,andvisualization.ChengreceivedaPhDincomputersciencefromtheUniversityofIllinoisatUrbana-Champaign.SheisaseniormemberoftheIEEEComputerSocietyandamemberofthe
64Computer
8/2/2019 Ieee Computer 2004
24/24