An Experience on CORBA Component Deployment - CiteSeerX

1 downloads 0 Views 92KB Size Report
“hooks-up” components that are part of facet X rece ptacle ... gory and activation model a specific POA is created by ... gory according to the component demand.
An Experience on CORBA Component Deployment

MariaClaudiaBBarros, . EdmundoRM. . Madeira,Iri neu Sotoma [email protected],{edmundo,isotoma}@ic.unicamp.br –InstituteoComputing, f UNICAMP University oCampinas, f Av.AlbertSabin,1251 CEP - 13083-970Campinas,SP,Brazil

ABSTRACT Thecomponenttechnologieshavebeenmoreand moredevelopedandusedtospeedupthedevelopment (distributed)applications.OMGhasdevelopedamod forCORBAcomponents,whichbrieflydescribesthed ploymentofCORBAcomponentswithoutmanydetails. Thispaperpresentsanddiscussessomeimplementati aspectsandexperimentalresultsobtainedbyusing extendeddeploymentmodelforCORBAComponents previouslyproposedbtyheauthors.

of el eon an

1.Introduction Asoftwarecomponenthaswelldefinedinterfacesan d properties,whichfacilitatetheconfigurationand connectionwithothersoftwarecomponents.Byusingcompo nents,theapplicationdeveloperonlybuildsthebu siness semanticandconnectsito ttheexistingcomponents The . infrastructuretodistributedcommunication,events trans, actions,security,naming,andotherservices,are encapsulatedinthecomponents.Bythisway,itiseasyto develop andmaintainabusinessapplicationandspeedupth e application developmentcycle. Animportantpartoftheuseocfomponentsitshed eployment.Thedeploymentofcomponentsconsistsin installation,instantiationandconnectionofcompo nents. TheOMG(ObjectManagementGroup)hasgenerateda componentspecificationtoCORBA(CommonObject BrokerArchitecture)calledCCM(CORBAComponent Model)[4],whichdoesnotdetailtheCORBA Compone nt deploymentimplementation. Thispaperpresentssomeimplementationaspectsand experimentalresultsobtainedthroughtheimplement ation ofanextendedmodelfordeploymentofCORBAcomponents.Themodelwasdetailedin[10]andthispape r commentsthemodelparticipants,anextensiontoth e deploymentprocess and use a caseothe f proposedm odel. Thispaperios rganizedafsollows.Section2prese nts somebasicconceptsaboutCORBAcomponents,and discusssomerelatedwork.Section3showsthedeta ilsof theproposeddeploymentmodel.Section4discusses some

implementationissuesoftheproposedmodelonTAO ORB(ObjectRequestBroker),showsausecase,describesexperimentsanddiscussesresultsothem. f Section 5offers someconclusions.

Finally,

2. Basic Concepts 2.1. POA (PortableObjectAdapter) ThePOA(PortableObjectAdapter)[5]wasspecifie d bytheOMGformakingtheobjectimplementationspo rtablebetweendifferentORBproducts.Additionally, POAs havepolicieswhichallowtheapplicationdeveloper to controlthreadingmanagement, ObjectId management, andservantcreation,destruction,activationandd eactivation.Thefollowingpoliciesareimportanttothis paper understanding: Request Processing Policy (USE_ACTIVE_OBJECT_MAP_ONLY, USE_DEFAULT_SERVANT, USE_SERVANT_MANAGER), Servant Retention Policy (RETAIN, NO_RETAIN), LifespanPolicy (TRANSIENT, PERSISTENT) and Id Assignment Policy ( USER_ID, SYSTEM_ID).

2.2. CCMspecification ComponenttypesaredefinedusingtheCIDL(ComponentImplementationDefinitionLanguage),whichi extensiontotheIDL(InterfaceDefinitionLanguage theyarerepresentedintheInterfaceRepository.A ponentisdenotedbyacomponentreference,whichi representedbyanobjectreference.Componentsare packagedinziparchivefiles,whichhaveXML(Exte bleMarkupLanguage)descriptors,whichdescribet contents.Acomponentpackagecomprisesoneormore implementationsoafcomponent.Eachcomponentpack agecontainsacomponentimplementation.Acomponen implementationisaDLL(DynamicLinkingLibrary), sharedlibrary,or Jaava.class file.

asn ),and coms nsiheir t a

DeploymentArchitecture. CCMdescribesadeployment architecture,withaclassdiagram(showedinFig. 1)and interactionsbetweenthepieces,whichrequiresobj ectsof theproposedinterfaces ComponentInstallation,

AssemblyFactory and Assembly,andsupposesthe useoadeployment f application.Theotherinterfac esare includedonlyforillustrativepurposes.Thesteps indeployingandactivatingacomponentassemblycouldu nfoldasfollows:1T ) hedeploymentapplicationinte racts withtheusertodeterminewhereeachcomponentis tobe placed;2)Thedeploymentapplicationasksthe ComponentInstallationobject,whichretrievesthecomponentfileandoptionallymakesiat vailableinth elocal environment;3)Thedeploymentapplicationcreates an Assemblyobjectbycallingan AssemblyFactory objectonthehostwheretheassemblyobjectisto becreated. Assemblyobjectscoordinatethecreationand destructionofcomponentassemblies;4)Basedonth e informationintheassemblydescriptorfile,the Assemblyobjectcreateseachcomponentandcomponenthome andhooks-uptheassembly;5)Increatinga Component, the Assemblyobjectusesthe ServerActivator, ComponentServer, Container,andthe ComponentHomeobjects;6)The ServerActivatorobject, onthetargethost,createsthe ComponentServerobject.;7T ) he ComponentServerobject,onthetarget host,creates containerswithinthe ComponentServer. Acontainerisreferredbyreference a tothe Container interface;8)The Containerobjectonthetargethost installsthe ComponentHomeobjectintothecontainer; 9)The Containerobjectcreatesthe ComponentHomeobject;10)The ComponentHomeobjectcreates the Componentinstance;11)Aconfiguratorcouldbe appliedtothecomponent;12)Afterthecomponenti nstallation,the Assemblyobjectconnectscomponentsinthe assemblybasedontheinformationintheassemblyd escriptorfile;and13)Afterthesuccessfulconnect ion amongallcomponents,the Assemblyobjectsignals eachobjectthatallofitsinitialconnectionshav ebeen fixed.

RudkinandSmith[6]definedaservicecreationan d deploymentprocessofJavaapplicationsthatuseJa va Beanscomponents.Mikic-RakicandMedvidovic[3]de alt withseveraldeploymentproblemswhichtheyhadide ntified.TheyusedasoftwarearchitecturecalledPris m.The authorsdidnotexplicitlymentionedwhattypeof standardizedcomponents(COM,JavaBeansoC r CM)Prism supports.However,itseemseachofthesecouldbe supportedifthePrismstyleisfollowed.Hissametal [. 1] suggestsanewapproach,calledPECT(PredictionEnabledComponentTechnology),totechnologycomponents,whichintegratescomponenttechnologywitha nalysismodel.ByusingPECT,consumersmayobtainmeas urablyboundedtrustinbothcomponentsanddesigntime predictions basedotnheuseothese f components.

Assembly Factory

«instantiates»

Assembly

Server Activator «instantiates» «instantiates»

Deployment Application

Component Server «instantiates»

Container «instantiates»

Component Installation

ComponentHome «instantiates»

Component

Fig.1. Dependenciesamongthe deploymentarchitecturepiecesproposedinCCM

3. The ProposedDeployment Model 2.3.Related work Theliteraturehas severalworks on componentmodel s. However,worksonCCMandCCMdeploymentare minimumyet.Wangetal.[8]suggestedapplyingref lectivemiddlewaretechniquesbyusingseveraldesign patternstoresolvesomekeydesignchallengesforQoS enabled(QualityofService-enabled)CCMimplementa tions.KebbalandBernard[2]extendedtheCCMdepl oymentprocessbecausetheyhavenotedmainlytwodra wbacksintheCCMspecification:itdoesnotaddress issues likelocalizationofcomponentimplementationsand the managementohf ostconfiguration;anditdoesnotf ixa numberofdetailssuch athe s localization ohelpe f objects r (Assembly, ComponentInstallationandson).

Thissectiondetailstheproposedmodelfordeploymentandpresents uasecase.

3.1. TheProposed Model Ourdeploymentmodelproposesaframeworkfor componentinstallationandactivation[10].Themai n differencesbetweenourproposedmodelandtheCCM deploymentspecificationare:aclassdiagramwhich detailsthepartiesinvolvedinthedeploymentproces s, naew repositorycalled ComponentAssemblyInstanceRepository(CAI)andamodifieddeploymentprocess.Ourproposedmodelhasthefollowingparticipants: repositories, user information and , processes.

Repositoriesotfheproposedmodel. Therepositoriesof theproposedmodelareusedbytheprocessesandth ey formtheuserinformation.The InterfaceRepositoryin CIDLisformedbyinterfacerepositoryobjectsorganize d hierarchicallyasacontainmenttree.TheComponent Repositoryitype as thatderivesfromRepositorya ndiist usedatop-level as containerfortheIRsthatstor ceomponentinformation.The ImplementationRepository contains alltheinformationnecessarytolocateandactivat ecomponentimplementations.Sincethecomponentswillb e accessedviatheirequivalentinterfaces,theImple mentationRepositoryforComponentsisverysimilartot he ImplementationRepositoryusedtolocate/activateo bject implementations.Themaindifferenceiisnsteadof storing theassociationbetweenanobjecttypeand server a executable,theImplementationRepositorystorestheass ociationbetweenacomponentdefinitionandadynamicl ibrary,whichwillbeplacedintomemory.The Assembly Archive(AAR) iscomposedofiles f CCD(CorbaComponentDescriptor),CAD(ComponentAssembly Descripto r) andCPF(ComponentPropertyFile).Thecontentand formatotfhosefilesweredefinedattheCCMspeci fication.The ComponentAssemblyInstanceRepository(CAI) storestheinformationofeachcomponentassemblyi nstance deployed:componentassemblyidentification, featuresof eachcomponentinstancethatarepartotfhe assembly,theconnectionsbetweencomponentsthroug h events,andtheconnectionsbetweencomponentsthro ugh ports.Eachassemblyinstancemusthaveitsowncom ponentinstances.Componentinstancesarenotshareab le amongassemblyinstances.EachCAIRepositoryentry corresponds to component a assembly instancedeploy ed. Userinformationintheproposedmodel. Theuserinformationhastwopieces.The Userinput correspondsto: Componentschosen btyheuser toform thewholeapplication; UserinputforAssembly w , hichdescribeshowthe chosencomponentswillbe“hooked-up”;and Userinput forDeployment which , informsonwhichhosteachcomponentwillbedeployed.The Useroutput correspondsto the AssemblyId(uniquenameotfhedeployedassembly)and ComponentIds(componentinstanceidentifier ofeachdeployedcomponent).Theusercanusethis informationtoaccess/localizethecomponentinstance tshat belong totheassembly. Processesotfheproposedmodel. Fig.2showsaclass diagramwhichshowsthedependenciesbetweenthe classesthatimplementtheprocessesofthepropose d model.The BuilderTool showsalistofComponents (basedonInterfaceandImplementationRepositories and ) getstheUserinputinformation.Afterwards,igt en erates anAssemblyArchive(AAR).The PopulatoroCAI f reads theAARfileandcreatesanentryintheCAIthatr epre-

sentstheassemblybeingdeployed.The Deployment Managercoordinatesthedeploymentprocess.Itreadsthe necessaryinformationfromtheCAIRepository,and interactswiththeothermanagersandserversinorde rto createthedeploymentinfrastructureineachmachin e. Additionally,itstoresintheCAItheinformation returned bythemanagerservers.The InstallationManager distributesthelibrariesthatimplementthecomponentsan dtheir propertyfiles(ifexist)tothemachineswherethe componentswillbedeployed.The ActivationManager asksthe ActivationServerineachhostrequestingthecreat ionof thereferencesforthecomponentinstancesbeing de ployed inthehost.The ActivationServer createsandmaintains thePOAs thatgeneratethecomponentinstancerefer ences, andmanagesthelifetimeoftheservantsthatincar nate thosecomponentinstances.The EventServercreatesthe eventChannelsforthecomponentassembly,and“hook sup”theproducer(s)andconsumer(s).Componentscan receivereferencestootherobjectsandusethoser eferencestoinvokeoperations.TheComponentscanprov ide internalobjectreferences whicharecalledfacets,andcan use(getconnectedto)thereferencesprovidedbyo ther componentsviareceptacleports.The LinkingManager “hooks-up”componentsthatarepartoffacetXrece ptacle connections.Theusercanconsultthe HomeServer in ordertoobtainareferencetoanycomponent.Theu ser callsthemethod Home.resolve (assemblyId, componentId),whichjustgetspreviouslycreated referencesfromtheCAIRepositorythatwerecreate d during thedeploymentprocess. «informs»

«process»

«process»

Builder Tool

Populator of CAI «informs» «process»

«uses»

DeploymentManager «uses» «process»

InstallationManager «process»

ActivationServer POA

«process»

Linking Manager «uses» «uses»

«process» EventSe rver

«uses»

«process» ActivationManager

POA

Fig.2. Dependenciesamongthepiecesoour f deploymentarchitecture ThePOAsforcomponents. ForeachcomponentcategoryandactivationmodelaspecificPOAiscreated by theActivationServer.Theactivationmodelthatbe tterfits withcomponentsisOnDemand:thePOAcreatesthe

referencetothecomponentbuttheservantwillbe created onlyathe t firsttimethisreferenceiussedbya client.We useServant a Managertocreatetheservants.This Servant Manageractsaacontainer, s providingforthecomp onent servantaccesstotheCORBAServices.TheServantR etentionPOApolicydeterminestheServantManagerb ehavior:ServantLocation( NON_RETAIN)orServant Activation( RETAIN).Anotheractivationmodelusefulis theExplicit,soatdeploymenttimeboththecompon ent referenceandservantarecreated.Thisiasnadvan tagefor applicationsthatgetfewcomponentsand/orneedth atthe componentsarereadytobeusedimmediately.Table 1 summarizes thePOAs createdbtyheActivation Serve r.At deploymenttimetheusershouldchooseanactivatio n model(OnDemand- RETAIN,OnDemand- NON_RETAIN orExplicit)foreachcomponentinstance.Thisinfo rmation willbestoreditnheCAIRepository.

Com ponent Category

Activation Model Service Session Process Entity

NON_RETAIN

RETAIN

EXPLICIT

POAServiceNR POAServiceR POAServiceExp POASessionNR POASessionR POASessionExp POAProcessNR POAProcessR POAProcessExp POAEntityNR POAEntityR POAEntityExp

Table1. POAscreatedbytheActivationServer CCMDeploymentArchitectureversustheproposed model.Thepiecesoour f modelarerelatedwiththeCCM deploymentarchitecture,showninFig.1,inthefo llowing way.The Assemblyclassfunctionalitiesweredistributedinourmodel(Fig.2).ThePOAServantManager in , ourmodel,actssimilartothe ContainerclassoCCM, f byprovidingforcomponentservantstheaccessto CORBAservices.ThePOAinourmodelactssimilart o theComponentServeroC f CMinthesenseitcallst he ServantManageraccordingtotheServantRetention Policy. Unlikethe ComponentHomeinCCM,ourHome Serveronlyconsultsthereferencetothecomponent . UnliketheCCM Component,ourmodelcreatesthe componentsaccordingtheactivationmodel.Animpor tant achievementoof urproposedmodelisthepossibilit yto providedifferentlife-cyclepoliciesaccordingto thecomponentcategories.Thisallowsperformanceenhancements,especiallyitfheuserchoosesthecomponent categoryaccordingtothecomponentdemand.Anotheradv antageithat s in caseofailure, f theproposedmodel helps the recovery:whentheActivationServercomesup,itr ecreatesallthePOAs,andwhentheEventServercomes upit readstheCAIrepositoryinordertorecreateandr econnectthenecessaryeventchannels.Also,theCAIRe positorycontainsallthenecessaryinformationtoundo ade-

ployment;inwhichcase,onlythenecessaryprocess thecorrectmachinesarenotifiedothe f deployment ing.AdisadvantageisthattheProposedModeldepe ontheCAIrepository:ifnewcomponentcategories newlife-cyclebehaviorsareaddedtothesystem,o modelmustbeupdated.Inthissense,theCCMdeplo mentarchitectureismoregenericand,therefore,m flexibletochanges.

esat undonds with ur yore

DeploymentProcess. Fig.3representsourdeployment process,whichisdividedin assemblysteps ( ato d)and deploymentsteps ( teo n).Thisdeploymentprocessmodel describeshowtogatherthenecessaryinformationf orthe deployment,andhowtosetupthedeploymentinfras tructure.Weassumealltheprocessesoof urproposedm odel arestartedbeforetheuseotfheBuilderTool.In the AssemblyStep t,heuseractivatestheBuilderTool(dotted line 1).TheBuilderToolgetsfromtheuser:thechosen componentimplementations( a),theassemblynamethat representsthe application,theidentificationtagforeach component(optional)( b),andthehostsinwhicheach componentwillbeinstalled( c).Afterwards,byusingthis userinformation,theBuilderToolgeneratesanAss embly Archive(AAR)( d).Inthe DeploymentStep the , Builder ToolinformstothePopulatorofCAI,thefilename ofthe AAR(AssemblyArchive)justcreated(dottedline 2).The PopulatoroC f AIreadstheAAR( e),createsanentryin theCAIandgenerates AssemblyId, ComponentIdsand ConnectionIds( f). TheBuilderToolcalls theDeploymentManagerandinformsthe AssemblyId (dottedline 3).TheDeploymentManager,byusingan AssemblyIdandtheCAI( g),interactstothe:InstallationManager( h),whichinstallsthelibrariesandtheir propertyfiles(ifexist)inthetargetmachines;A ctivation Manager( i),whichcallstheActivationServer( j)aeach t hosttocreatereferencestothecomponentinstance s; EventServer( l),whichcreateseventchannelsandlinks eventconsumersandproducers;andLinking Manager (m),whichmakestheconnectionbetweenthecomponents.Theusercannowusethe AssemblyIdand ComponentIdsavailableintheCAItoinvoketherequired components( n).Thestep( j)returnsacomponentreferencetotheActivationManager,thatforwardsito the DeploymentManager( i’),whichstoresitintotheCAI (i’’).Thestep( l’)returnsaneventchannelreferenceto theDeploymentManager thatstores itintotheCAI (l’’).

4. ImplementationandTests Themainpartsoftheproposedmodelwereimplementedinordertovalidatethemodelandalsotoe implementationaspects.Ausecaseishownandthe formanceothe f POAs for components is evaluated.

valuate per-

a

ComponentschosenbU y ser b Provided Component Implementations

User inputfor Deployment

1

1 Builder Tool

Implementation Repository e

AssemblyId ComponentIds

d

2 Interface Repository inCIDL

c

User input for Assembly

Files generation

n

3

AAR –Assembly Archive CCD CorbaComponentDescriptors CAD ComponentAssembly Descriptors CPF ComponentProperty Files

Populator of CAI l’’ f generates AssemblyId ComponentIds, ConnectionIds

ComponentAssembly Instance Repository

i’’

g

D e p l o y m e n t M a n a g e r

m

Linking Manager

l’

Event Server

l ActivationServer POA

POA

i’ Activation Manager i

j

InstallationManager h

Fig.3. DeploymentProcess

4.1.DevelopmentEnvironment OurdevelopmentenvironmentwasanEthernetnetworkcomposedoSUN f workstationsrunningSolaris2 intheInstituteoC f omputingaUNICAMP. t Theimple mentationisbasedonTAO[9]version1.1,whichis ORBcompatiblewithCORBA2.Xspecification,uses theIIOP1.1protocol,providesaPOAimplementation andcontains someextensions tosupportrealtime.

.7 -

,

4.2.IssuesoftheImplementation AllthemodelprocessesareCORBAobjects,and excepttheBuilderToolprocess,theothersaredae mon processes,whichmustbestartedbeforetheuseof the BuilderTool.Inordertoguaranteeuniqueness,eac h eventchannelnameitsheconcatenationothe f Assem-Policies blyIdandthe ConnectionId. These idsareunique andaregeneratedbythePopulator.Iitsimportant to notethattheDeploymentManagerhastheroleopr f opagatingthegeneratedcomponentreferencestoallth e fields of theCAIrepository entries. ComponentReferenceencoding. Ourproposalisthat everyreferenceforacomponentcontainsintothef ield objectidentification,astringwiththenameotfh eDLL thatimplementsthecomponentandthenameothe ff unc-

tionthatmustbecalledtocreateacomponentinst ance, forexample: MyServant:create_MyFoo.ThePOA canimplementgenericmethodstoreadthiscodedin formation,loadtheDLLintomemoryandexecutethefu nctiontocreatethecomponent.Another approach woul dbe storingtheinformationabouttheDLLandthecreat ion functionintotheCAIRepositoryandcodingintoth e referencethecorrespondingCAIRepositoryentryke y. Anyway,theminimumsetoP f OAinstancesiscreated , because the same POA can be used to manage/create/destroyservantsofdifferentcomponents . Therefore,thereios nePOAinstanceforeachpair componentcategoryXactivationmodel,becauseotfhe differentpoliciesrequiredforeachpairasillustrat edin Tables 2and3. RequestProcessing POA ServiceExp SessionExp ProcessExp EntityExp

Servant Retention

USE_ACTIVE_OBJECT_MAP_ONLY USE_ACTIVE_OBJECT_MAP_ONLY USE_ACTIVE_OBJECT_MAP_ONLY USE_ACTIVE_OBJECT_MAP_ONLY

RETAIN RETAIN RETAIN RETAIN

Table2. POApoliciesfortheExplicitactivation model

POAsforComponents. TheActivationServerisresponsibleforcreatingthePOAswhenitstarts.Tab indicatessomepoliciesusedtocreatethePOAswit activationmodelExplicit.Table3indicatessomep ciesusedtocreatethePOAswiththeactivationmo OnDemand. Policies

RequestProcessing POA ServiceNR ServiceR SessionNR SessionR ProcessNR ProcessR EntityNR EntityR

le2 hthe olidel

Servant Retention

USE_SERVANT_MANAGER NON_RETAIN USE_SERVANT_MANAGER RETAIN USE_SERVANT_MANAGER NON_RETAIN

GraphicallyourGUIapplicationlooksliketheFig 5. . Ourapplicationhasthefollowingbehavior.Thepro perty filesareusedtosetuptheinitialstatusoLeft f Smileand RightSmile.Therefore,thebuttonsHappyButtonand SadButtonchangethestatusofLeftSmile. Then,when theLeftSmilestatusics hanged,itforwardsitspr evious statustoRightSmile.Forinstance,iftheLeftSmil eis “Sad”,andtheRightSmilei“sHappy”(Fig.5aa)nd the HappyButtonips ressed,B a uttonPressedEventissen to t theLeftSmile.ThentheLeftSmiletogglesitsstatu sto “Happy”andsendsitspreviousstatus(“Sad”)toth e RightSmile(Fig.5b).

USE_SERVANT_MANAGER RETAIN USE_SERVANT_MANAGER NON_RETAIN USE_SERVANT_MANAGER RETAIN USE_SERVANT_MANAGER NON_RETAIN USE_SERVANT_MANAGER RETAIN

Table3. POApoliciesfortheOnDemandactivation model

HappyButton

SadButton

emits ButtonPressedEvent

emits ButtonPressedEvent Event Channel

consumes ButtonPressedEvent

4.3.UseCase Inthissectionwepresentaverysimpleusecaseo n componentassemblyforcreatingagraphicaluserin terface,inordertoexercisetheDeploymentProcess. Let’s consider thefollowing componentdeclarations in CI DL: module MyBeans { interface Smile { void happy(); void sad() } component SmileyBean supports Smile { void draw(); provides Smile actionToBePerformed; uses Smile actionToBePerformedAtNeighbour; attribute boolean isSmile; consumes ButtonPressedEvent actionEvent; } component ButtonBean { void draw(); attribute string label; emits ButtonPressedEvent pressEvent; } }; WecanbuildaGUIapplicationbyassemblingtogether four componentinstances: LeftSmile:theSmileyBean thatappears attheleft RightSmile:theSmileyBean thatappears attheright HappyButton:theButtonBeanthathasthelabel “Happy” SadButton:theButtonBean thathas thelabel“Sad”, as illustratediF n ig.4.

Left Smile

uses actionToBe PerformendAt Neighbour

provides actionToBe Performend

Right Smile

Fig.4. ComponentAssembly toformtheapplication

Happy

Sad

Happy

Sad

Fig.5. GUIBehavior:a)InitialStatus,and b) StatusafterPressingHappyButton Let’sfollowallthestepsshowedintheFig.3for this usecase: (a) Componentschosenbytheuser T : heuserchooses thecomponentimplementationstobeused: SmileyBean and ButtonBeani,nformswhichinstances shouldbecreated:twoinstancesof SmileyBean (LeftSmileandRightSmile)andtwoinstancesof ButtonBean (HappyButtonandSadButton),andwhatis theinitialstatusoef achinstance(propertyfiles ).Each componentimplementationstorestheinformationof the DLLlocation andthecreatefunctionusedtocreat ea componentinstance. (b) Userinputforassembly The : userhooksupthecomponentinstances:theeventsemittedbytheHappyBu tton andtheSadButtonaresenttotheLeftSmile, there isa

receptacleXfacetconnectionbetweenLeftSmileand RightSmile. (c) Userinputfordeployment :Theuserinforms:in whichhosteachcomponentshouldbedeployed,what is thecategoryandactivationmodelofeachcomponent . Forthisexampleallcomponentinstanceswillbese rvice, no_retain,andbdeeployedathe t samehost. (d) AARFileGeneration :TheAARfileisgenerated withtheformatdefinedinthespecification,putti ngtogether alltheinformation previously gathered. (e,f) ThePopulator r:eadstheAARfileandcreatesan entry describingtheassembly intheCAIRepository Itis . responsibleforgeneratinguniqueidentifiersfort he fields AssemblyId, ComponentsId s and ConnectionIds. (g,h) TheDeploymentManager r:eadstheCAIRepositoryentrycontentand,foreachcomponentinstance , calls the InstalationManager. (i)Foreachcomponentinstance,theDeploymentManagercallsthe ActivationManager usingtheinformation containedinthefields: Hostname, CompCategory, Activation Model/ ServantRetentionPolicy , and DLLName/CreateFunction.Withthereturnedreference (i’),theDeploymentManagersearchesintheCAIentry forallfieldsthatshouldcontainthegeneratedre ference andupdates them (i’’). (l)Fortheeventconnections,theDeploymentManager callsthe EventServer tocreatetheeventchannelsand storesthereturnedeventchannelreferences (l’)inthe CAIentry (l’’). (m)TheDeploymentManagercallsthe LinkingManagertolinkthecomponentswhichareconnectedtogether viafacetXreceptaclerelationships. (n)Finally,the AssemblyIdand ComponentIdsare returnedtotheuser,thatcanusethisinformation toaccess/localizecomponentinstancesthatbelongtoth e deployedassembly.

4.4.TestScenario InordertocomparethedifferentPOAsforcomponents,wehavedefined asimplecomponentwithatwowayoperation,called Long doit(),whichonlyreturnsa Longvalue.Thecomponentimplementationwas encapsulatediDLL, na andtherequestprocessingb tyhe POAandthecreation/binding/deletionoservants f f orthe component weremeasured. ASUNworkstationwasallocatedexclusivelyforthi s work,inordertoguaranteethemeasureaccuracy.W e havedevelopedexperimentsusingthreeruns,with1 0, 100and1000operationinvocations,respectively,o n eachPOAtypeforcomponents.Ineachrun,wehave measuredthefirstinvocationtimeandtheaverage betweenallremaininginvocations.Togetmoreaccura te

measures,wehaveusedtheaveragebetweenthreeex ecutionsofeachrun.Additionally,aet achexecutio n,a newclientwascreatedathe t beginningotfheexec ution anddestroyedattheendoftheexecution,andane w serverwithonespecificPOAtype(Tables12, ,and 3) wascreatedbeforethefirstclientinvocationand destroyedafterthelastclientinvocation.Fig.6sh ows the resultsfromexecutionswith100operationinvocati ons. Theresultsfromexecutionswith10and1000operat ion invocations, and experiments made between two workstationsarenotshownbecausetheyaresimilar to thoseiF n ig.6. Fig.6showsclearlythecomponentPOAtypeswith RETAINservantretentionpolicy(RandExpsuffixes) haveloweroperationinvocationtime(by6.40ms), exceptthefirst,thanthosewith NON_RETAIN(by36.15 ms)servantretentionpolicy.Thisconfirmstheint uition becausewiththe RETAINservantretentionpolicythe servantiscreatedonlyinthefirstinvocationand itis usedinsubsequentinvocations.Itisalsoclearth atinthe firstinvocationofarun,thePOAswithexplicita ctivationmodel(by53ms)arebetterthanwithondeman d activationmodelwith RETAINservantretentionpolicy (by79.80ms)becauseintheexplicitactivationmo del, therequestprocessingis USE_ACTIVE_OBJECT_MAP_ONLYandintheondemandactivationmodelis USE_SERVANT_MANAGER.Inotherwords,intheexplicitactivationmodelonlytheActiveObjectMap is consulted,whileintheondemandactivationmodel the ActiveObjectMapisalwaysconsultedandthenase rvantmanageriscalled.Otherfeatureisthatthef irst invocationtimeisveryclosetoPOAtypesforcomp onentwithondemandactivationmodeland RETAIN(by 79.80ms)and NON_RETAIN(by81.50ms)servant retentionpolicies.This occurs becauseboth polici es have tosetupthePOAinthefirstinvocationinorder topreparetosubsequentinvocations.The NON_RETAINpolicyhas bit a higheroverheadthanthe RETAINpolicy,in thefirstinvocation,duetotheobjectdestruction after each invocation. Particularly,optimizationtechniques[6],whichha ve beenappliedtotheimplementationofthePOAinth e TAO,improve,forexample,thememorymanagement (useofthread-specificstoragedesignpattern)and the POAdemultiplexing(perfecthashingandactivedemu ltiplexing).Theseoptimizationtechniquesimproved the differencebetweenthefirstandremaininginvocati onsin POAswith RETAINand NON_RETAINservantretentionpolicies.Moreover,thehighdifferencebetwee nthe firstandtheremaininginvocationswith RETAINpolicy hasoccurrednotonlyduetotheinherentfeatureo tfhe RETAINpolicy,butalsobecauseinTAO,the RETAIN policyalsobenefitsfromapplyinganadditionalre verse-

lookupmapwhichassociateseachservantwithitso IDin O(1)average-casetime[6].Ingeneral,thefirst invocationisabout((79.80+81.50)/2)/6.40=12.6t slower than remaining invocations inPOAs with RETAINservantretentionpolicy,anditisabout 81.50/36.15 = 2.25 times slower in POAs with NON_RETAINservantretention policy. Timespentbythefirst operation invocation and theaverageotime f spent at theremaining invocations Invocation

imes

first remaining

retentionpolicy,whichare79.8/53=1.5timesslo werin thefirstinvocationand36.15/6.40=5.65times sl ower in thesubsequentinvocations,whencomparedtoPOAs withondemandactivationmodeland RETAINservant retentionpolicy.Thisactivationmodelshouldbce hosen for components thatareusednotvery frequently. Asfuture a researchworkwpe roposetocomparethe “basic”CCMDeploymentModelimplementationwith ourProposedModelimplementationandevaluateperformanceimprovements andpenalties. Acknowledgements: Theauthors thankFAPESP (Grant00/05369-2)andCNPq by their financialsupport.

entityNR

entityR

entityExp

processNR

processR

processExp

sessionNR

sessionR

sessionExp

serviceNR

serviceR

6. References

serviceExp

90,00 80,00 70,00 60,00 50,00 40,00 30,00 20,00 10,00 0,00

bject

POAtype

Fig.6. Averageofthreeexecutions,each 100operationinvocations

onewith

5.Conclusion Thispaperdiscussesimportantissuesfortheimple mentationocf omponentdeploymentmodels.Inrelati on tothemodelpresentedin[10],thispapershowsin detailsthePOApoliciesforondemandandexplicita ctivationmodelsandallcomponentcategories.Besides, it presentsausecasetoillustratebettertheintera ction betweenthemodelparticipants(repositories,proce sses, anduserinformation)andbetweentheuserandthe modelduring thedeploymentprocess. Finally,accordingtoperformedexperiments,thebe st performanceoPf OAsforcomponentswasobtainedfir st byPOAswithexplicitactivationmodel,whichare 79.8/53=1.5timesfasterinthefirstinvocation andthey aresimilarinthesubsequentinvocations,whencom paredtoPOAswithondemandactivationmodeland RETAINservantretentionpolicy.However,depending ontheapplication,it’snotreasonabletocreatea llthe componentsinadvance,mainlybecauseotfheresour ce consumption.So,agoodapproachwouldbeusingexplicitactivationforthosecomponentsthatarehig hly usedanddemandfasttimeresponse. TheworstperformancewasobtainedwithPOAswith ondemandactivationmodeland NON_RETAINservant

1.Hissam,S. A.,Moreno,G.A.,Stafford,J.A.,andWallnau, K.C.PackagingPredictableAssembly. FirstInternational IFIP/ACMWorkingConferenceonComponentDeployment,June,2002,Berlin,Germany,asaSpringer-Verlag LNCSpublication. 2.Kebbal,D.,andBernard, G.ComponentSearchServiceand DeploymentofDistributedApplications. Proc.3rdInternationalSymposiumonDistributedObjectsandApplica tions (DOA'01),Rome,Italy,September,2001. 3.Mikic −Rakic,M.,andMedvidovic,NA . rchitecture −Level Supportfor SoftwareComponentDeploymentinResource ConstrainedEnvironments. FirstInternationalIFIP/ACM WorkingConferenceonComponentDeployment ,June, 2002,Berlin,Germany,asaSpringer-VerlagLNCSpu blication. 4.ObjectManagementGroup.CORBA ComponentsVolume I. Documentorbos/99-07-01.1999. 5.ObjectManagementGroup.CORBA2.6 -chapter11 Portable ObjectAdapter.Documentformal/01-12-49. 2001. 6.Pyarali,I.,O'Ryan,C.,Schmidt,D.C.,Wang,N .,Kachroo, V.,andGokhale,A.ApplyingOptimizationPatterns toDesignReal-time ORBs,Proceedingsof the 5thUSENIX ConferenceonObject-OrientedTechnologiesandSystems , May,1999,SanDiego,CA. 7.Rudkin,S.,andSmith,A.ASchemeforComponent Based ServiceDeployment. ProceedingsoTrends f inDistributed Systems:TowardsaUniversalServiceMarket Sept. , 2000, Springer-Verlag,pp68-80. 8.Wang,N.,Parameswaran,K.,Kircher,M.,andSch midt,D. ApplyingReflectiveMiddlewareTechniquestoOptimi zea QoS-enabledCORBAComponentModelImplementation. Proceedingsofthe24thAnnualInternationalComput er SoftwareandApplicationsConference (COMPSAC2000), Taipei,Taiwan,October,2000. 9.TAO(TheACEORB).TAOisCORBA a ORBavailable to download at the site: http://www.cs.wustl.edu/~schmidt/ACE_wrappers/TAO.tar. gz 10.Barros,M.C.B.;Madeira,E.R.M.andSotoma,I. –“A DeploymentModelforCORBAComponents”-InternationalSymposiumonDistributedObjects&Applicati ons – DOA’02, Irvine,USA,October2002,TechnicalReport University oCalifornia, f Irvine.

Suggest Documents