Efficient implementations of Java remote method in

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

EcientImplementationsofJavaRemoteMethodInvocation(RMI)VijaykumarKrishnaswamyDanWaltherSumeerBholaEthendranathBommaiahGeorgeRileyBradTopolMustaqueAhamadyCollegeofComputingGeorgiaInstituteofTechnologyAtlanta,GA30332AbstractJavaandtheRemoteMethodInvocation(RMI)mechanismsupportedbyitmakeiteasytobuilddistributedapplicationsandser-vicesinaheterogeneousenvironment.Whentheapplicationsareinteractiveandrequirelowresponsetime,ecientimplementationsofRMIareneeded.Weexplorebothtrans-portlevelprotocolsaswellasobjectcachingintheRMIframeworktomeettheperfor-mancerequirementsofinteractiveapplica-tions.Wehavedevelopedaprototypesystemthatoersnewtransportprotocolsandallowsobjectstobecachedatclientnodes.Wede-scribethedesignissuesandtheimplementa-tionchoicesmadeintheprototypealongwithsomepreliminaryperformanceresults.1IntroductionInteractiveapplicationsthatenablewidelydistributeduserstocooperateovertheInter-netwillbecomeincreasinglycommoninthefuture.SuchapplicationshavetraditionallybeenexploredintheareaofgroupwarebutasincreasedbandwidthsbecomeavailableintoThisworkwassupportedinpartbyNSFgrantsCDA-9501637andCCR-9619371,andindustrialpart-nersoftheBroadbandTelecomCenter,GeorgiaIn-stituteofTechnology.yContactauthor:Emailandhomepage{mustaq@cc.gatech.edu,(e.g.,cableanddigitalsubscriberline(xDSL)networks),electroniccommerceandentertainmentapplicationswillbecomeinteractive.Forexample,aconsumerlocatedathomecanutilizeagraphicaluserinterface(GUI)toviewvariousretailitemsheorsheisinterestedinpurchasing.Simultaneously,asalesassociatelocatedattheretailoutletmayalsohaveacopyoftheGUIwhichper-mitstheassociatetoseewhatthecustomerisselectingandmaysuggestalternativeswhicharethenpresentedinthecustomer’sGUI.Furthermore,thehomeconsumermayhaverequestedfriendslocatedatotherhomestoalsoparticipateinthisdecisionmakingandthereforetheytoomayberunningaGUIandviewingthepossibilitiesandalsomakingsug-gestions.Manysuchinteractiveapplicationscenarioscanbeconstructedeasily.Interactiveapplicationswillbesupportedbyshareddistributedservices.Inorderfortheinternetworkedcomputinginfrastructuretosupporttheaboveapplicationscenario,systemsupportisneededtoallowthedis-tributedservicesandclientapplicationstobeprogrammedeasily.Theuseofobjecttech-nologyisbecominganincreasinglypopularapproachforimplementingdistributedser-vices.Thisisduetothefactthatobjecttechnologyprovidesauniformmechanismforaccessinglocalandremoteresourcesandre-ducesthecomplexityofbuildingapplicationsinaninternetworkedcomputingenvironment.TheJavalanguageisapopularfoundationforbuildingdistributedservicesandappli-cationsbecauseithidestheproblemsthatariseduetoheterogeneityofserverandclienthardwareandsoftwareplatforms.RemoteMethodInvocation(RMI)isJava’smecha-nismforsupportingdistributedobjectbasedcomputing[18].RMIallowsclient/serverbaseddistributedapplicationstobedevel-opedeasilybecauseaclientapplicationrun-ninginaJavavirtualmachineatonenodecaninvokeobjectsimplementedbyaremoteJavavirtualmachine(e.g.,aremoteservice)thesamewayaslocalobjects.AlthoughRMIenhancestheeaseofpro-grammingfordistributedapplications,wehavefoundthatitdoesresultinsignicantperformancepenaltiesforapplicationscom-paredtomessagepassing[10].Suchlossofperformanceisundesirableforinteractiveap-plicationsinawide-areaenvironmentbecauseoftheneedforinteractiveresponsetimeinthepresenceofhighcommunicationlaten-cies.TheadditionalprocessingrequiredbyRMIwilladdsomeoverheadcomparedtomessagepassingbutthereareanumberoftechniquesthatcanexploitthecommunica-tionstructureembodiedbyRMItoprovidebetterperformance.Forexample,itmaybepossibletoexploitthe\invocation-responsenatureofRMIcommunicationstodevelopamoreecientcommunicationprotocolthantheTCPprotocolthatisemployedbyRMI(suchanapproachwasusedintheimple-mentationofremoteprocedurecallorRPC[2]whichiscloselyrelatedtoRMI).Further-more,whenpossible,aclientmaybeabletocachethestateofremoteobjectsandinvokethemlocally.Inthiscase,theoverheadas-sociatedwithcommunicationcanbeavoidedwhenthereissignicantlocalityofaccess.Weexploreanumberoftechniquestoim-proveRMIperformanceandintegratethemintotheRMIframework.Sincetheperfor-manceofRMIdependsontheunderlyingcommunicationprotocols,werstexploreanumberofalternatetransportsthatmayim-provetheperformanceofRMIimplementa-tions.Wedevelopedauserdatagrampro-tocol(UDP)basedreliablemessagedeliveryprotocolthatexploitstherequest-responsenatureofRMIcommunications.Also,whenobjectstateiscachedatclientnodes,con-sistencyofthereplicatedobjectcopieshastobemaintained.Consistencyprotocolsforreplicatedobjectscanbenetfromone-to-many(e.g.,multicast)communicationandwehavedevelopedaexiblemulticasttransportthatisavailabletoRMIimplementation.Fi-nally,weextendthereferencelayerintheRMIframeworktocacheobjectsatclientnodes.Thisapproachallowsclientstotrans-parentlyinvokeremoteobjectsindependentofwhethertheyarebeingcached.Whenacachedcopyofaninvokedobjectisavailable,theinvocationisexecutedlocally.Aninvali-dationbasedprotocolhasbeenimplementedtomaintainconsistencyofthecac

1 / 17
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功