




已阅读5页,还剩10页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
0外文资料InfrastructureforAutomaticDynamicDeploymentOfJ2EEApplicationinDistributedEnvironments1IntroductionInrecentyears,wehaveseenasignificantgrowthincomponent-basedenterpriseapplicationdevelopment.TheseapplicationsaretypicallydeployedoncompanyIntranetsorontheInternetandarecharacterizedbyhightransactionvolume,largenumbersofusersandwideareaaccess.Traditionallytheyaredeployedinacentrallocation,usingserverclusteringwithloadbalancing(horizontalpartitioning)tosustainuserload.However,horizontalpartitioninghasbeenshownveryefficientonlyinreducingapplication-relatedoverheadsofuser-perceivedresponsetimes,withouthavingmucheffectonnetwork-inducedlatencies.Verticalpartitioning(e.g.,runningwebtierandbusinesstierinseparateVMs)hasbeenusedforfaultisolationandloadbalancingbutitissometimesimpracticalduetosignificantrun-timeoverheads(evenifonewouldkeepthetiersonafastlocal-areanetwork)relatedtoheavyuseofremoteinvocations.Recentwork14inthecontextofJ2EEcomponentbasedapplicationshasshownviabilityofverticalpartitioninginwide-areanetworkswithoutincurringtheaforementionedoverheads.Thekeyconclusionsfromthatstudycanbesummarizedasfollows:Usingproperlydesignedapplications,verticaldistributionacrosswide-areanetworksimprovesuser-perceivedlatencies.Wide-areaverticallayeringrequiresreplicationofapplicationcomponentsandmaintainingconsistencybetweenreplicas.Additionalreplicasmaybedeployeddynamicallytohandlenewrequests.Differentreplicasmay,infact,bedifferentimplementationsofthesamecomponentbasedonusage(read-only,read-write).Newrequestpathsmayreusecomponentsfrompreviouslydeployedpaths.Applyingintelligentmonitoring6andAIplanning2,12techniquesinconjunction1withtheconclusionsofthatstudy,weseeapotentialfordynamicadaptationinindustry-standardJ2EEcomponent-basedapplicationsinwideareanetworksThroughdeploymentofadditionalapplicationcomponentsdynamicallybasedonactivemonitoring.However,inordertoachievesuchdynamicadaptation,weneedaninfrastructureforautomatingJ2EEapplicationdeploymentinsuchanenvironment.ThisneedisquiteevidenttoanyonewhohasevertrieddeployingaJ2EEapplicationevenonasingleapplicationserver,whichisataskthatinvolvesagreatdealofconfigurationofboththesystemservicesandapplicationcomponents.ForexampleonehastosetupJDBCdatasources,messagingdestinationsandotherresourceadaptersbeforeapplicationcomponentscanbeconfiguredanddeployed.Inawideareadeploymentthatspansmultipleservernodes,thisprovesevenmorecomplex,sincemoresystemservicesthatfacilitateinter-nodecommunicationsneedtobeconfiguredandstartedandavarietyofconfigurationdata,likeIPaddresses,portnumbers,JNDInamesandothershavetobeconsistentlymaintainedinvariousconfigurationfilesonmultiplenodes.Thisdistributeddeploymentinfrastructuremustbeableto:addressinter-componentconnectivityspecificationanddefineitseffectsoncomponentconfigurationanddeployment,addressapplicationcomponentdependenciesonapplicationserverservices,theirconfigurationanddeployment,providesimplebutexpressiveabstractionstocontroladaptationthroughdynamicdeploymentandundeploymentofcomponents,enablereuseofservicesandcomponentstomaintainefficientuseofnetworknodesresources,providethesefacilitieswithoutincurringsignificantadditionaldesigneffortonbehalfofapplicationprogrammers.InthispaperweproposetheinfrastructureforautomaticdynamicdeploymentofJ2EEapplications,whichaddressesalloftheaforementionedissues.Theinfrastructuredefinesarchitecturedescriptionlanguages(ADL)forcomponentandlinkdescriptionandassembly.TheComponentDescriptionLanguageisusedtodescribeapplicationcomponentsandlinks.2Itprovidesclearseparationofapplicationcomponentsfromsystemcomponents.Aflexibletypesystemisusedtodefinecompatibilityofcomponentportsandlinks.Adeclarationandexpressionlanguageforconfigurablecomponentpropertiesallowsforspecificationofinter-componentdependenciesandpropagationofpropertiesbetweencomponents.TheComponent(Replica)AssemblyLanguageallowsforassemblyofreplicasofpreviouslydefinedcomponentsintoapplicationpathsbyConnectingappropriateportsvialinkreplicasandspecifyingthemappingofthesecomponentreplicasontotargetapplicationservernodes.TheComponentConfigurationProcessevaluatesanapplicationpathscorrectness,identifiesthedependenciesofapplicationcomponentsonsystemcomponents,andconfigurescomponentreplicasfordeployment.Anattemptismadetomatchandreuseanypreviouslydeployedreplicasinthenewpathbasedontheirconfigurations.WeimplementtheinfrastructureasapartoftheJBossopensourceJavaapplicationserver11andtestitonseveralSampleJ2EEapplicationsJavaPetstore23,Rubies20andTPC-W-NYU32.TheinfrastructureimplementationutilizestheJBosssextendablemicro-kernelarchitecture,basedontheJMX27specification.ComponentizedarchitectureofJBossallowsincrementalservicedeploymentsdependingontheneedsofdeployedapplications.Webelievethatdynamicreconfigurationofapplicationserversthroughdynamicdeploymentandundeploymentofsystemservicesisessentialtobuildingaresource-efficientframeworkfordynamicdistributeddeploymentofJ2EEapplications.Therestofthepaperisorganizedasfollows.Section2providesnecessarybackgroundforunderstandingthespecificsoftheJ2EEcomponenttechnologywhicharerelevanttothisstudy.Section3givesageneraldescriptionoftheinfrastructurearchitecture,whilesection4goesdeeperindescribingparticularlyimportantandinterestinginternalmechanismsoftheinfrastructure.Section5describestheimplementationoftheframework,andrelatedworkisdiscussedinsection6.2J2EEBackground2.1IntroductionComponentframeworks.Acomponentframeworkisamiddlewaresystemthatsupportsapplicationsconsistingofcomponentsconformingtocertainstandards.3Applicationcomponentsare“plugged”intothecomponentframework,whichestablishestheirenvironmentalconditionsandregulatestheinteractionsbetweenthem.Thisisusuallydonethroughcontainers,componentholders,whichalsoprovidecommonlyrequiredsupportfornaming,security,transactions,andpersistence.Componentframeworksprovideanintegratedenvironmentforcomponentexecution,asaresultsignificantlyreducetheeffort.ittakestodesign,implement,deploy,andmaintainapplications.CurrentdayindustrycomponentframeworkstandardsarerepresentedbyObjectManagementGroupsCORBAComponentModel18,SunMicrosystemsJava2PlatformEnterpriseEdition(J2EE)25andMicrosofts.NET17,withJ2EEbeingcurrentlythemostpopularandwidelyusedcomponentframeworkintheenterprisearena.J2EE.Java2PlatformEnterpriseEdition(J2EE)25isacomprehensivestandardfordevelopingmulti-tierenterpriseJavaapplications.TheJ2EEspecificationamongotherthingsdefinesthefollowing:Componentprogrammingmodel,Componentcontractswiththehostingserver,Servicesthattheplatformprovidestothesecomponents,Compatibilitytestsuitesandcompliancetestingprocedures.Amongthelistofservicesthatacompliantapplicationservermustprovidearemessaging,transactions,namingandothersthatcanbeusedbytheapplicationcomponents.ApplicationdevelopedusingJ2EEadheretotheclassical3-TierarchitecturesPresentationTier,BusinessTier,andEnterpriseInformationSystem(EIS)Tier(seeFig.1).J2EEcomponentsbelongingtoeachtieraredevelopedadheringtotheSpecificJ2EEstandards.1.PresentationorWebtier.Thistierisactuallysubdividedintoclientandserversides.Theclientsidehostsawebbrowser,appletsandJavaapplicationsthatcommunicatewiththeserversideofpresentationtierorthebusinesstier.TheserversidehostsJavaServletcomponents30,JavaServerPages(JSPs)29andstaticwebcontent.Thesecomponentsareresponsibleforpresentingbusinessdatatotheendusers.Thedataitselfistypicallyacquiredfromthe4businesstierandsometimesdirectlyfromtheEnterpriseInformationSystemtier.TheserversideofthepresentationtieristypicallyaccessedthroughHTTP(S)protocol.2.BusinessorEJBtier.ThistierconsistsofEnterpriseJavaBeans(EJBs)24thatmodelthebusinesslogicoftheenterpriseapplication.Thesecomponentsprovidepersistencemechanismsandtransactionalsupport.ThecomponentsintheEJBtierareinvokedthroughremoteinvocations(RMI),in-JVMinvocationsorasynchronousmessagedelivery,dependingonthetypeofEJBcomponent.TheEJBspecificationdefinesseveraltypesofcomponents.Theydifferininvocationstyle(synchronousvs.asynchronous,localvs.remote)andstatefulness:completelystateless(e.g.,Message-DrivenBean),statefulnon-persistent(e.g.,StatefulSessionBean),statefulpersistent(e.g.,EntityBean).SynchronouslyinvocableEJBcomponentsexposethemselvesthroughaspecialfactoryproxyobject(anEJBHomeobject,whichisspecifictoagivenEJB),whichistypicallyboundinJNDIbythedeployeroftheEJB.TheEJBHomeobjectallowscreationorlocationofanEJBObject,whichisaproxytoaparticularinstanceofanEJB1.3.EnterpriseInformationSystem(EIS)orDatatier.Thistierreferstotheenterpriseinformationsystems,likerelationaldatabases,ERPsystems,messagingsystemsandthelike.BusinessandpresentationtiercomponentcommunicatewiththistierwiththehelpofresourceadaptersasdefinedbytheJavaConnectorArchitecture26.TheJ2EEprogrammingmodelhasbeenconceivedasadistributedprogrammingmodelwhereapplicationcomponentswouldruninJ2EEserversandcommunicatewitheachother.Aftertheinitialintroductionandfirstserverimplementations,thetechnology,mostnotably,theEJBtechnologyhasseensomeasignificantshiftawayfrompurelydistributedcomputingmodeltowardslocalinteractions2.Therewereverylegitimateperformance-relatedreasonsbehindthisshift,howevertheDistributedfeaturesarestillavailable.TheJ2EEspecificationhasseenseveralrevisions,thelateststablebeingversion1.3,whileversion1.4isgoingthroughlastreviewphases3.Weshallfocusourattentionontheformer,whileactuallylearningfromthelatter.CompliantcommercialJ2EEimplementationsarewidelyavailablefromBEASystems4,5IBM9,Oracle21andothervendors.Severalopensourceimplementations,includingJBoss11andJOnAS19claimcompatibilityaswell.ARecentadditiontothelistisanewApacheprojectGeronimo1.2.2J2EEComponentProgrammingModelBeforewedescribebasicJ2EEcomponents,letsfirstaddresstheissueofdefiningwhatacomponentisasoftwarecomponentisaunitofcompositionwithcontractuallyspecifiedinterfacesandexplicitcontextdependenciesonly.Asoftwarecomponentcanbedeployedindependentlyandissubjecttocompositionbythirdparties31.AccordingtothisdefinitionthefollowingentitieswhichmakeupatypicalJ2EEapplicationwouldbeconsideredapplicationcomponents(someexceptionsgivenbelow):EJBs(session,entity,message-driven),Webcomponents(servlets,JSPs),messagingdestinations,Datasources,EJBandWebcomponentsaredeployedintotheircorrespondingcontainersprovidedbytheapplicationservervendor.Theyhavewell-definedcontractswiththeircontainersthatgovernlifecycle,threading,persistenceandotherconcerns.BothWebandEJBcomponentsuseJNDIlookupstolocateresourcesorotherEJBcomponentstheywanttocommunicatewith.TheJNDIcontextinwhichtheselookupsareperformedismaintainedseparatelyforeachcomponentbyitscontainer.Bindingsmessagingdestinations,suchastopicsandqueues,areresourcesprovidedbyamessagingserviceimplementation.Datasourcesareresourcesprovidedbytheapplicationserverfordataaccessbybusinesscomponentsintotheenterpriseinformationservices(data)tier,andmostcommonlyareexemplifiedbyJDBCconnectionpoolsmanagedbytheapplicationServer.AJ2EEprogrammerexplicitlyprogramsonlyEJBsandWebcomponents.Thesecustom-writtencomponentsinteractwitheachotherandsystemservicesbothimplicitlyandexplicitly.Forexample,anEJBdevelopermaychooseexplicittransactiondemarcation(i.e.,Bean-ManagedTransactions)whichmeansthatthedeveloperassumestheburdenofwritingexplicitprogrammaticinteractionwiththeplatformsTransactionManagerService6throughwell-definedinterfaces.Alternatively,thedevelopermaychooseContainer-Managedtransactiondemarcation,wheretransactionalbehaviorofacomponentisdefinedthroughitsdescriptorsandhandledcompletelybytheEJBcontainer,thusactingasanimplicitdependencyoftheEJBontheunderlyingTransactionManagerservice.2.3LinksBetweenComponents2.3.1RemoteInteractionsJ2EEdefinesonlythreebasicinter-componentconnectiontypesthatcancrossapplicationserverboundaries,inallthreecases;communicationisaccomplishedthroughspecialJavaobjects.RemoteEJBinvocation:synchronousEJBinvocationsthroughEJBHomeandEJBObjectinterfaces.JavaConnectoroutboundconnection:synchronousmessagereceipt,synchronousandasynchronousmessagesending,DatabasequeryusingConnectionFactoryandConnectioninterfaces.JavaConnectorinboundconnection:asynchronousmessagedeliveryintoMessage-DrivenBeans(MDBs)only,utilizingActivationSpecobjects.Inthefirsttwocases,anapplicationcomponentdeveloperwritesthecodethatperformslookupoftheseobjectsinthecomponentsrun-timeJNDIcontextaswellascodethatissuesmethodinvocationsorsendsandreceivesmessagestoandfromtheremotecomponent.Thecomponentsrun-timeJNDIcontextiscreatedforeachdeploymentofthecomponent.Bindingsinthecontextareinitializedatcomponentdeploymenttimebythedeployed(usuallybymeansofcomponentsdeploymentdescriptors).Thesebindingsareassumedtobestatic,sincethespecificationdoesnotprovideanycontractbetweenthecontainerandthecomponenttoinformofanybindingchangesInthecaseofJavaConnectorinboundcommunication,ActivationSpecobjectlookupandallsubsequentinteractionswithitaredoneimplicitlybytheMDBcontainer.Theprotocolforlookuphasnotbeenstandardized,thoughitisreasonabletoassumeaJMX-orJNDI-basedlookupassumingtheunderlyingapplicationserverprovidesfacilitiestocontroleachstepofdeploymentprocess,establishmentofalinkbetweenJ2EEcomponentswouldinvolve:7Deploymentoftargetcomponentclasses(optionalforsomecomponents,likedestinations),CreationofaspecialJavaobjecttobeusedasatargetcomponentsproxy,Bindingofthisobjectwithcomponentshostnamingservice(JNDIorJMX),Startofthetargetcomponent,Deploymentofreferencingcomponentclasses,Creationandpopulationofreferencingcomponentsrun-timecontextinitshostnamingservice,startofthereferencingcomponent.However,noneofmodernapplicationserversallowdetailedcontrolofthedeploymentprocessforallcomponenttypesbeyondwhatispossiblebylimitedoptionsintheirdeploymentdescriptors4.Thereforeourinfrastructurewilluseasimplifiedapproachthatreliesonfeaturescurrentlyavailableonmostapplicationservers:Abilitytodeploymessagingdestinationsanddatasourcesdynamically,AbilitytocreateandbindintoJNDIspecialobjectstoaccessmessagingdestinationsanddatasources,AbilitytospecifyinitialbindingofEJBHomeobjectsuponEJBcomponentdeployment,AbilitytospecifyaJNDIreference5inthereferencingcomponentsrun-timecontexttopointtotheEJBHomebindingofthereferencedEJBcomponent.Inourinfrastructurewhichislimitedtohomogeneousapplicationservers,theseoptionsaresufficienttocontrolintercomponentlinksthroughsimpledeploymentdescriptormanipulation.However,incontextofheterogeneousapplicationservers,simpleJNDIreferencesandthussimpledescriptormanipulationareinsufficientduetocross-application-serverClassloadingissues.2.3.2LocalInteractionsSomeinteractionsbetweencomponentscanoccuronlybetweencomponentsco-locatedinthesameapplicationserverJVMandsometimesonlyinthesamecontainer.IntheWebtier,examplesofsuchinteractionsareservlet-to-servletrequestforwarding.Inthe8EJBtier,suchinteractionsareCMPEntityrelationsandinvocationsviaEJBlocalinterfaces.Suchlocaldeploymentconcernsneednotbeexposedatthelevelofadistributeddeploymentinfrastructureotherthantoensurecollocation.Therefore,theinfrastructuretreatsallcomponentsrequiringcollocationasasinglecomponent.2.4DeploymentofJ2EEApplicationsandSystemServices2.4.1DeploymentofApplicationComponentsDeploymentandundeploymentofstandardJ2EEcomponentshasnotyetbeenstandardized(seeJSR8810forstandardizationeffort6).Therefore,eachapplicationservervendorprovidesproprietaryfacilitiesforcomponentdeploymentandundeployment.AndwhiletheJ2EEspecificationdoesdefinepackagingofstandardcomponentswhichincludesformatandlocationofXML-baseddeploymentdescriptorswithinthepackage,thispackageisnotrequiredtobedeployablebyanapplicationserverwithoutproprietarytransformation.ExamplesofsuchtransformationareGenerationofadditionalproprietarydescriptorsthatsupplementorreplacethestandardones,Codegenerationofapplicationserver-specificclasses.Inordertoproceedwithbuildingadynamicdistributeddeploymentinfrastructurecapableofdeployinginheterogeneousnetworks,weproposeauniversalunitofdeploymenttobeasingleXML-baseddeploymentdescriptororasetofsuch,Bundledintoanarchive.ThearchivemayoptionallyincludeJavaclassesthatimplementthecomponentandanyotherresourcesthatthecomponentmayneed.Alternatively,thedeploymentdescriptorsmaysimplyhaveURLreferencestocodebases.Weassumepresenceofadynamicdeployment/undeploymentserviceonallcompliantJ2EEserversandarobustapplicationserverclassloadingarchitecturecapableofrepeateddeploymentcycleswithoutundesiredclassloading-relatedissues.Mostmodernapplicationservers(e.g.,JBoss11andGeronimo1)doprovidesuchfacilities.2.4.2DeploymentofSystemComponents(Services)Whilelackingonlyintheareaofdefiningaclearspecificationofdeploymentandundeploymentwhenitcomestoapplicationcomponents,theJ2EEstandardfallsmuch9shorterwithrespecttosystemservices.Notonlyastandardizeddeploymentfacilityforsystemservicesisnotspecified,thespecification,infact,placesnorequirementsevenonlifecyclepropertiesoftheseservices,nordoesitaddresstheissueofexplicitspecificationofapplicationcomponentdependenciesontheunderlyingsystemservices.Insteaditdefinesaroleofhumandeploywhoisresponsibleforensuringthattherequiredservicesarerunningbasedonhis/herunderstandingofdependenciesofapplicationcomponentsonsystemservicesasimpliedbythenatureofcomponentsandtheirdeploymentdescriptors.10对应中文翻译基于J2EE在分布式环境下的底层结构的自动动态配置的应用1.前言近几年,我们已经看到基于组件的企业应用开发的显著增加。这种应用程序通常被部署在公司的内部网或者是因特网上,以高事务容量,大量的用户和覆盖范围广的访问为特征,它通常会被部署在中央区域,采用服务器集群来均衡负载从而支持用户下载。但是这种平均负荷的方法被证明只对减少应用转发的用户可以察觉的反应时间有效,而对于减少网络方面的延迟作用不大,垂直分割(例如运行网络层和事务层在不同的虚拟机)被用于错误分离和均衡负荷,但是它是不符合实际的由于远程调运的大量使用显著地增加了运行时时间。最近的著作已经表明在广域网中利用垂直负荷而不引起前面所述的超时问题的可行性。那非研究的主要结论可以概括如下:(1)应用合适的应用程序,在广域网中的垂直负荷可以察觉的延迟。(2)广域垂直层需要复制应用层组件而且需要维持和原组件间的一致性。(3)新加的复制组件可以被动态配置以满足新的需要。(4)事实上,不同的复制组件可能会根据应用不同的方式实现相组件。(5)新的请求路径可以复用先前的组件配置路径。应用智能监视和人工智能规划方法再结合那个研究得出的结论,我们看到通过动态布置基于动态监视的额外的应用组件,在广域网中符合工业标准基于组件的应用程序中动态的可适应性是可以实现的。然而,为了实现这种动态可适性,我们需要一种框架来在这样的环境里自动化地配置J2EE应用程序。这种需要对于哪怕在单一的应用程序服务器上尝试布置J2EE应用的人来说也显而易见,这种任务设计到大量的系统服务和应用组件的配置。例如你必须在配置和部署应用组件前先建立JDBC数据源,设立消息目的地和资源适配器。在需要跨越多个节点服务器的广域网配置中,这将更加复杂,因为更多的便利内部节点通信的系统服务需要配置和启动,而且多种配置数据比如IP地址,端口号,JNDI名字和其他的数据在多个节点的配置文件中必须维持一致性。这种分布式配置框架必须满足:(1)声明内部组件一致性规范和定义它对组件配置部署的影响。(2)声明应用程序组件对应用服务器,以及它们的配置和部署的依赖性。(3)提供简单但可表达的抽象方法去控制通过部署和拆卸组件获得的适用
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 医学影像设备的先进教学模型课件
- 皮革保养行业绿色生产与循环经济考核试卷
- 移动设备充电器兼容性与故障修理考核试卷
- 纺织品在交通安全与防护产品的应用考核试卷
- 薯类食品品牌定位与市场推广考核试卷
- 小班交通安全教育:小心门
- 2025年毛皮服装及其附件合作协议书
- 《化学与物理之化学》课件
- 《电机原理与应用》课件
- 人员培训设计方案
- 杭州市高层次人才分类认定申请表-
- 高考语文答题思维导图
- 天然气管道工程段线路安装工程鱼塘(水塘)穿越施工方案
- 教练技术三阶段讲义
- 证券公司营业部网络结构拓扑图
- 2001船舶修理价格本中文
- 某污水处理厂自控系统调试方案(常用)
- 蓝色背景-PPT模板
- 设备检维修作业票填写模板
- 危大工程动态管控表
- 商场重大危险源评估标准
评论
0/150
提交评论