分布式系統(tǒng)課件:Chapter 2 Communication(RPCRMIMOM)_第1頁
分布式系統(tǒng)課件:Chapter 2 Communication(RPCRMIMOM)_第2頁
分布式系統(tǒng)課件:Chapter 2 Communication(RPCRMIMOM)_第3頁
分布式系統(tǒng)課件:Chapter 2 Communication(RPCRMIMOM)_第4頁
分布式系統(tǒng)課件:Chapter 2 Communication(RPCRMIMOM)_第5頁
已閱讀5頁,還剩140頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

DistributedComputingParadigmChapter22.1ParadigmandAbstractionImportantcharacteristicsthatdistinguishdistributedapplicationsfromconventionalapplicationswhichrunonasinglemachine:Interprocesscommunication:Adistributedapplicationrequirestheparticipationoftwoormoreindependententities(processes).Todoso,theprocessesmusthavetheabilitytoexchangedataamongthemselves.(多方參與)Eventsynchronization:Inadistributedapplication,thesendingandreceivingofdataamongtheparticipantsofadistributedapplicationmustbesynchronized.2.1ParadigmandAbstractionParadigm:

Paradigmmeans“apattern,example,ormodel.”Inthestudyofanysubjectofgreatcomplexity,itisusefultoidentifythebasicpatternsormodels,andclassifythedetailaccordingtothesemodels.一個用于說明如何完成某項特定任務的抽象模型。2.1ParadigmandAbstractionAbstractions:Arguablythemostfundamentalconceptincomputerscience,abstractionistheideaofdetailhiding.Weoftenuseabstractionwhenitisnotnecessarytoknowtheexactdetailsofhowsomethingworksorisrepresented,becausewecanstillmakeuseofitinitssimplifiedform.Gettinginvolvedwiththedetailoftentendstoobscurewhatwearetryingtounderstand,ratherthanilluminateit.(太細節(jié)的東西會影響對主要問題的理解)Abstractionplaysaveryimportantroleinprogrammingbecauseweoftenwanttomodel,insoftware,simplifiedversionsofthingsthatexistintherealworldwithouthavingtobuildtherealthings.(編程就是對所關注事情的抽象)Insoftwareengineering,abstractionisrealizedwiththeprovisionoftoolsorfacilitieswhichallowsoftwaretobebuiltwithoutthedeveloperhavingtobecognizantofsomeoftheunderlyingcomplexities.(工具和設施提供抽象)科研過程更是如此.2.1OverviewofpresentedParadigmsMessagepassingRemoteProcedureCallClient-serverPeer-to-PeerMessagesystem:Point-to-point;Publish/SubscribeDistributedobjects:Remotemethodinvocation

NetworkservicesObjectRequestBroker

Objectspace

ComponentBasedTechnologiesMobileagentsCollaborativeapplicationsMessagepassing

RemoteProcedureCallClient-serverPeer-to-PeerMessagesystem:Point-to-point;Publish/SubscribeDistributedobjects:Remotemethodinvocation

NetworkservicesObjectRequestBroker

Objectspace

ComponentBasedTechnologiesMobileagentsCollaborativeapplications2.2TheMessagePassingParadigm2.2TheMessagePassingParadigm

Messagepassingisthemostfundamentalparadigmfordistributedapplications.Aprocesssendsamessagerepresentingarequest.Themessageisdeliveredtoareceiver,whichprocessestherequest,andsendsamessageinresponse.Inturn,thereplymaytriggerafurtherrequest,whichleadstoasubsequentreply,andsoforth.2.2TheMessagePassingParadigmMessagepassingparadigmAnIllustration:進程B

進程A

SendM1receiveReceiveM2SendSendM3receive2.2TheMessagePassingParadigmThebasicoperations:send,andreceive.Forconnection-orientedcommunication,theoperationsconnect

anddisconnectarealsorequired.Withtheabstractionprovidedbythismodel,theinterconnectedprocessesperforminputandoutputtoeachother,inamannersimilartofileI/O.TheI/Ooperationsencapsulatethedetailofnetworkcommunicationattheoperating-systemlevel.(抽象形態(tài))Thesocketapplicationprogramminginterfaceisbasedonthisparadigm.hfdgdgttp:///products/jdk/1.2/docs/api/index.html/2.3RemoteProcedureCallMessagepassingRemoteProcedureCallClient-serverPeer-to-PeerMessagesystem:Point-to-point;Publish/Subscribe

Distributedobjects:Remotemethodinvocation

NetworkservicesObjectRequestBroker

Objectspace

ComponentBasedTechnologiesMobileagentsCollaborativeapplications2.3RemoteProcedureCallTheRemoteProcedureCall(RPC)modelprovidessuchanabstraction.Usingthismodel,interprocesscommunicationsproceedasprocedure,orfunction,calls,whicharefamiliartoapplicationprogrammers.Aremoteprocedurecallinvolvestwoindependentprocesses,whichmayresideonseparatemachines.Aprocess,A,wishingtomakearequesttoanotherprocess,B,issuesaprocedurecalltoB,passingwiththecallalistofargumentvalues.Asinthecaseoflocalprocedurecalls,aremoteprocedurecalltriggersapredefinedactioninaprocedureprovidedbyprocessB.Atthecompletionoftheprocedure,processBreturnsavaluetoprocessA.

2.3RemoteProcedureCallRemoteProcedureCallparadigmProcessAProcessBProc1(arg1,arg2)返回值2.3RemoteProcedureCall2.3RemoteProcedureCallRPCallowsprogrammerstobuildnetworkapplicationsusingaprogrammingconstructsimilartothelocalprocedurecall,providingaconvenientabstractionforbothinterprocesscommunicationandeventsynchronization.Sinceitsintroductionintheearly1980s,theRPCmodelhasbeenwidelyinuseinnetworkapplications.TherearetwoprevalentAPIsforRemoteProcedureCalls.TheOpenNetworkComputingRemoteProcedureCall,evolvedfromtheRPCAPIoriginatedfromSunMicrosystemsintheearly1980s.TheOpenGroupDistributedComputingEnvironment(DCE)RPC.BothAPIsprovideatool,rpcgen,fortransformingremoteprocedurecallstolocalprocedurecalls.2.3RemoteProcedureCall拍賣系統(tǒng)實例:拍賣者程序為竟拍者提供2個遠程過程:

1.竟拍者注冊過程;2.竟拍者投標過程;每個竟拍者程序提供以下遠程過程:1.允許拍賣者向竟拍者宣布拍賣開始;2.允許拍賣者向竟拍者通告最新標價;3.允許拍賣者向竟拍者宣布拍賣結束.2.4Client-ServerParadigmMessagepassingRemoteProcedureCallClient-serverPeer-to-PeerMessagesystem:Point-to-point;Publish/Subscribe

Distributedobjects:Remotemethodinvocation

NetworkservicesObjectRequestBroker

Objectspace

ComponentBasedTechnologiesMobileagentsCollaborativeapplicationsPerhapsthebestknownparadigmfornetworkapplications,theclient-servermodel,assignsasymmetricrolestotwocollaboratingprocesses(非對稱).Oneprocess,theserver,playstheroleofaserviceproviderwhichwaitspassivelyforthearrivalofrequests.Theother,theclient,issuesspecificrequeststotheserverandawaitsitsresponse.

2.4Client-ServerParadigmclient–server

paradigm.1.25Client和server分別扮演服務請求者和服務提供者2.4Client-ServerParadigmAnExampleClientandServer(1)Theheader.hfileusedbytheclientandserver.AnExampleClientandServer(2)Asampleserver.AnExampleClientandServer(3)Aclientusingtheservertocopyafile.1-27bSimpleinconcept,theclient-servermodelprovidesanefficientabstractionforthedeliveryofnetworkservices.Operationsrequiredincludethoseforaserverprocesstolistenandtoacceptrequests,andforaclientprocessto

issuerequestsandacceptresponses.Byassigningasymmetricrolestothetwosides,eventsynchronizationissimplified:theserverprocesswaitsforrequests,andtheclientinturnwaitsforresponses.ManyInternetservicesareclient-serverapplications.Theseservicesareoftenknownbytheprotocolthattheapplicationimplements.WellknownInternetservicesincludeHTTP,FTP,DNS,finger,gopher,etc.2.4Client-ServerParadigmProcessingLevelThegeneralorganizationofanInternetsearchengineintothreedifferentlayers1-28Client-ServerArchitectures客戶機器只包含用戶界面層的程序服務器包含其他部分(類似啞終端,服務器負載重)另一種可能的Client-Server模型的體系結構如下MultitieredArchitectures(1)Alternativeclient-serverorganizations(a)–(e).1-29MultitieredArchitectures(2)Anexampleofaserveractingasaclient.1-30服務器有時會擔任客戶機的角色,現(xiàn)成多層體系結構ModernArchitectures

多層是按縱向劃分,也可以按橫向劃分(horizontaldistribution)

(例如:服務器負載均衡)

AnexampleofhorizontaldistributionofaWebservice.1-312.5.Peer-to-PeerParadigmMessagepassingRemoteProcedureCallClient-serverPeer-to-PeerMessagesystem:Point-to-point;Publish/Subscribe

Distributedobjects:Remotemethodinvocation

NetworkservicesObjectRequestBroker

Objectspace

ComponentBasedTechnologiesMobileagentsCollaborativeapplicationsP2P——網(wǎng)絡上的所有節(jié)點都可以“平等”共享其他節(jié)點的計算資源:服務器到服務器、服務器到PC機、PC機到PC機,PC機到WAP手機,所有網(wǎng)絡節(jié)點上的設備都可以建立P2P對話。2.5.Peer-to-PeerParadigmInsystemarchitectureandnetworks,peer-to-peerisanarchitecturewherecomputerresourcesandservicesaredirectexchangedbetweencomputersystems.(資源與服務可直接交換)Theseresourcesandservicesincludetheexchangeofinformation,processingcycles,cachestorage,anddiskstorageforfiles.Insuchanarchitecture,computersthathavetraditionallybeenusedsolelyasclientscommunicatedirectlyamongthemselvesandcanactasbothclientsandservers,assumingwhateverroleismostefficientforthenetwork.(根據(jù)效率確定角色)/whatis/index.html2.5.Peer-to-PeerParadigm

Theparticipatingprocessesplayequalroles,withequivalentcapabilitiesandresponsibilities(hencetheterm“peer”).Eachparticipantmayissuearequesttoanotherparticipantandreceivearesponse.(角色平等)2.5.Peer-to-PeerParadigm

Whereastheclient-serverparadigmisanidealmodelforacentralizednetworkservice,thepeer-to-peerparadigmismoreappropriateforapplicationssuchasinstantmessaging,peer-to-peerfiletransfers,videoconferencing,andcollaborativework.Itisalsopossibleforanapplicationtobebasedonboththeclient-servermodelandthepeer-to-peermodel.(c/s適合集中式網(wǎng)絡服務,P2P適合分散式服務)

Awell-knownexampleofapeer-to-peerfiletransferserviceisNorsimilarsiteswhichallowfiles(primarilyaudiofiles)tobetransmittedamongcomputersontheInternet.Itmakesuseofaserverfordirectoryinadditiontothepeer-to-peercomputing.(P2P文件傳輸服務,服務器作為集中目錄)2.5.Peer-to-PeerParadigmnapster是P2PParadigm一個里程碑,它提供一個平臺,供用戶上傳、檢索和下載作品;并具有強大的搜索功能,可以將在線用戶的MP3音樂信息進行自動搜尋并分類整理,以備其他用戶查詢。1999年,國際五大唱片公司起訴Napster,指其涉及侵權歌曲數(shù)百萬首,要求每支盜版歌曲賠償10萬美元。2000年2月,法院判定Napster敗訴;2002年6月,Napster宣告破產(chǎn)。2001年提供音樂免費下載服務的Napster公司被國際傳媒巨頭貝塔斯曼集團收購。2.5.Peer-to-PeerParadigmP2P:centralizeddirectoryoriginal“Napster”design1)whenpeerconnects,itinformscentralserver:IPaddresscontents2)Alicequeriesfor“HeyJude”3)AlicerequestsfilefromBobcentralizeddirectoryserverpeersAliceBob111123Ref:ComputerNetworking,JimF.KuroseandKeithW.RossP2P:problemswithcentralizeddirectorySinglepointoffailurePerformance

bottleneckCopyrightinfringement(版權問題)

Filetransferisdecentralized(分散的),butlocatingcontentsishighlycentralizedQueryflooding:GnutellaGnutella在napster之后出現(xiàn)的一種用于網(wǎng)絡交換文件的完全分布式的p2p通信協(xié)議。所有利用Gnutella協(xié)議運行的客戶端程序的計算機都被稱為在Gnutella網(wǎng)絡上。在Gnutella網(wǎng)絡上,每個結點連接其他幾臺計算機,信息同時可能從很多來源接收。設一個用戶連接4臺計算機,每臺計算機又連接4臺計算機,用戶能與計算機的總數(shù)為4+4*4=20個用戶進行信息交流。消息只沿著網(wǎng)絡傳遞2次(稱為生存時間或者叫TTL)。假定TTL為3,則它能進行信息交流的計算機的總數(shù)4+4*4+4*4*4=84。因此,能與用戶交流的計算機的數(shù)量與它的搜尋請求的TTL值和隨TTL增長的計算機數(shù)目成指數(shù)增加的關系。Queryflooding:Gnutellafullydistributed—nocentralserverpublicdomainprotocolmanyGnutellaclientsimplementingprotocoloverlaynetwork:graphedgebetweenpeerXandYifthere’saTCPconnectionallactivepeersandedgesisoverlaynetworkEdgeisnotaphysicallinkGivenpeerwilltypicallybeconnectedwith<10overlayneighbors(每個節(jié)點的相鄰連接數(shù)小于10)Ref:ComputerNetworking,JimF.KuroseandKeithW.RossGnutella:protocolQueryQueryHitQueryQueryQueryHitQueryQueryQueryHitFiletransfer:HTTP

Querymessage

sentoverexistingTCP

connectionspeersforward

QuerymessageQueryHit

sentover

reverse

pathRef:ComputerNetworking,JimF.KuroseandKeithW.RossThepeer-to-peerparadigmcanbeimplementedwithfacilitiesusinganytoolthatprovidemessage-passing,orwithahigher-leveltoolsuchasonethatsupportsthepoint-to-pointmodeloftheMessageSystemparadigm.(P2P可以通過基于消息傳遞或消息系統(tǒng)的方式實現(xiàn)Forwebapplications,thewebagentisaprotocolpromotedbytheXNSORG(theXNSPublicTrustOrganization)forpeer-to-peerinterprocesscommunication(

面向WEB的P2P協(xié)議)。

“ProjectJXTAisasetofopen,generalizedpeer-to-peerprotocolsthatallowanyconnecteddevice(cellphone,toPDA,PCtoserver)onthenetworktocommunicateandcollaborate.開源項目JXTAJava標準版本,是由BillJoy引領開發(fā)的P2P計算平臺。

2.5.Peer-to-PeerParadigm即時通信軟件,如ICQ、QQ、MSN等。2個或多個用戶可以通過文字、語音或文件進行交流,甚至還可以與手機通信;實現(xiàn)共享文件資源的軟件,如Napster、Gnutella和PPStream等。用戶可以直接從任意一臺安裝同類軟件的PC上下載或上載文件,并檢索、復制共享的文件;游戲軟件。目前的許多網(wǎng)絡游戲都是通過對等網(wǎng)絡方式實現(xiàn)的;存儲軟件,如Farsite。用于在網(wǎng)絡上將存儲對象分散存儲。數(shù)據(jù)搜索及查詢軟件,如Infrasearch、Pointera。用來在對等網(wǎng)絡中完成信息檢索;協(xié)同計算軟件,如Netbatch??蛇B接幾千或上萬臺PC,利用其空閑時間進行協(xié)同計算;協(xié)同處理軟件,如Groove??捎糜谄髽I(yè)管理。2.5.Peer-to-PeerParadigm(一些應用)對等網(wǎng)絡尚無統(tǒng)一的標準。2000年8月成立了P2P工作組,成員包括Intel、IBM和HP公司等。發(fā)展對等網(wǎng)絡的其他主要障礙還有版權問題、網(wǎng)絡帶寬問題、管理問題和安全問題等。如何連接電話、手機和家電、工業(yè)設備等,也是對等網(wǎng)絡需要解決的問題。2.5.Peer-to-PeerParadigm2.6.

The

MessageSystemParadigmMessagepassingRemoteProcedureCallClient-serverPeer-to-PeerMessagesystem:

Point-to-point;Publish/SubscribeDistributedobjects:Remotemethodinvocation

NetworkservicesObjectRequestBroker

Objectspace

ComponentBasedTechnologiesMobileagentsCollaborativeapplicationsAmessagesystemservesasanintermediaryamongseparate,independentprocesses.Itactsasaswitchformessages,throughwhichprocessesexchangemessagesasynchronously,inadecoupledmanner.

(作為獨立的中介實現(xiàn)消息以非偶合的方式異步交換)

Asenderdepositsamessagewiththemessagesystem,whichforwardsittoamessagequeueassociatedwitheachreceiver.Onceamessageissent,thesenderisfreetomoveontoothertasks.2.6.

TheMessageSystemParadigm2.6.

TheMessageSystemParadigmMessageSystemparadigmsender

receiver

MessageSystem

消息隊列…Message

消息隊列…進程以非偶合的方式進行通信。也可以通過一個Message-OrientedMiddleware實現(xiàn)消息的異步交換。兩種類型:

Point-to-pointmessagemodel;Publish/subscribemessagemodel;1.ThePoint-To-PointMessageModelComparedtothebasicmessage-passingmodel,thisparadigmprovidestheadditionalabstractionforasynchronousoperations.Inthismodel,amessagesystemforwardsamessagefromthesendertothereceiver’smessagequeue.Unlikethebasicmessagepassingmodel,themiddlewareprovidesamessagedepository,andallowsthesendingandthereceivingtobedecoupled.Viathemiddleware,asenderdepositsamessageinthemessagequeueofthereceivingprocess.Areceivingprocessextractsthemessagesfromitsmessagequeue,andhandleseachoneaccordingly.2.ThePublish/SubscribeMessageModelThepublish/subscribemessagemodeloffersapowerfulabstractionformulticastingorgroupcommunication.The

publishoperationallowsaprocesstomulticasttoagroupofprocesses,andthesubscribeoperationallowsaprocesstolistenforsuchmulticast.Eachmessageisthenassociatedwithaspecifictopicorevent.

Applicationsinterestedintheoccurrenceofaspecificeventmaysubscribetomessagesforthatevent(訂閱感興趣的事件).Whentheawaitedeventoccurs,theprocesspublishesamessageannouncingtheeventortopic(事件發(fā)生時發(fā)布消息).Themiddlewaremessagesystemdistributesthemessagetoallitssubscribers.(系統(tǒng)將消息送給訂閱者)2.ThePublish/SubscribeMessageModel該模型提供了一種用于組播或組通信的抽象機制。發(fā)布操作使一個進程可以向一組進程組播消息,訂閱操作則使一個進程能夠監(jiān)聽這樣的組播消息。在該模型中,每一條消息都與某一主題或事件相關。對某個事件感興趣的應用程序可以訂閱與該事件相關的主題。當訂閱者等待的事件發(fā)生時,觸發(fā)該事件的進程將發(fā)布一條消息以宣布該事件或主題。中間件消息系統(tǒng)將該消息分發(fā)給該消息的所有訂閱者。ToolkitsbasedontheMessage-SystemParadigmTheMOM(MessageOrientedMiddleware)paradigmhashadalonghistoryindistributedapplications.MessageQueueServices(MQS)havebeeninusesincethe1980’s.TheIBMMQ*Seriesisanexampleofsuchafacility./software/ts/mqseries/Otherexistingsupportforthisparadigm:Microsoft’sMessageQueue(MSQ), /library/psdk/msmq/msmq_overview_4ilh.htmJava’sMessageService(JMS) /developer/technicalArticles/Networking/messaging/例如:采用發(fā)布/訂閱模型實現(xiàn)的拍賣系統(tǒng)。每個竟拍者都訂閱一條“begin-auction”事件消息.拍賣者發(fā)送一條“begin-auction”事件消息,意味著拍賣會開始;竟拍者在收到“begin-auction”事件消息后,接著就訂閱“end-auction”事件消息;拍賣者訂閱“new-bid”事件消息;要出價的竟拍者可以發(fā)布一條“new-bid”事件消息,該消息轉發(fā)給拍賣者;拍賣會結束時,拍賣者發(fā)布一條“end-auction”事件消息,將拍賣結果通報給所有的竟拍者。2.6.

TheMessageSystemParadigm2.7DistributedobjectsParadigmsMessagepassingRemoteProcedureCallClient-serverPeer-to-PeerMessagesystem:Point-to-point;Publish/SubscribeDistributedobjects:Remotemethodinvocation

NetworkservicesObjectRequestBroker

Objectspace

ComponentBasedTechnologiesMobileagentsCollaborativeapplicationsTheideaofapplyingobjectorientationtodistributedapplicationsisanaturalextensionofobject-orientedsoftwaredevelopment.Applicationsaccessobjectsdistributedoveranetwork.Objectsprovidemethods,throughtheinvocationofwhichanapplicationobtainsaccesstoservices.Object-orientedparadigmsinclude:Remotemethodinvocation(RMI)NetworkservicesObjectRequestBrokerObjectspaces2.7DistributedobjectsParadigms1.RemoteMethodInvocation(RMI)

Remotemethodinvocationistheobject-orientedequivalentofremotemethodcalls.Inthismodel,aprocessinvokesthemethodsinanobject,whichmayresideinaremotehost.AswithRPC,argumentsmaybepassedwiththeinvocation.2.TheNetworkServicesParadigm

Inthisparadigm,serviceprovidersregisterthemselveswithdirectoryserversonanetwork.Aprocessdesiringaparticularservicecontactsthedirectoryserveratruntime,and,iftheserviceisavailable,willbeprovidedareferencetotheservice.Usingthereference,theprocessinteractswiththeservice.

Thisparadigmisessentiallyanextensionoftheremotemethodcallparadigm.Thedifferenceisthatserviceobjectsareregisteredwithaglobaldirectoryservice,allowingthemtobelookupandaccessedbyservicerequestorsonafederatednetwork.(3個角色,實現(xiàn)了動態(tài)性)2.TheNetworkServicesParadigm-2Web-servicesextendthenetworkofamessagenetworkservicetothecompleteinternet.Withweb-servicesprocessescancommunicateoverHTTP.DataistransferredusingXML-basedSOAP(SimpleObjectAccessProtocol).Webservice技術

Webservice被普遍認為是下一代分布式系統(tǒng)開發(fā)的模型,其目的是建立一種基于Web的、松散耦合的分布式計算平臺。W3C認為webservice有三個部分組成:傳輸模塊、描述模塊和發(fā)現(xiàn)模塊。

傳輸模塊是在線交換的標準;描述模塊用于描述服務個體或服務的收集;發(fā)現(xiàn)模塊用于服務的發(fā)現(xiàn)。

Web服務模型三個基本角色:服務提供者、服務注冊中心、服務請求者。三個基本操作:公布、查找、綁定。傳輸描述發(fā)現(xiàn)SOAP打包管理交流事務可靠性安全緩存異步路由WSDL服務特征劇本XMLSchema注冊檢查工作流語言安全

WebServices體系結構兩者的結合可使系統(tǒng)的適應性更好CORBARMIDCOMCORBARMIDCOM內聚化應用SOAPintranet內聚化應用intranet內聚化應用CORBARMIDCOMintranetSOAPSOAPInternet數(shù)據(jù)孤島Java’sJinitechnologyisalsobasedonthisparadigm.3.TheObjectRequestBrokerParadigm

Intheobjectbrokerparadigm,anapplicationissuesrequeststoanobjectrequestbroker(ORB),whichdirectstherequesttoanappropriateobjectthatprovidesthedesiredservice.Thedifferenceisthattheobjectrequestbrokerinthisparadigmfunctionsasamiddlewarewhichallowsanapplication,asanobjectrequestor,topotentiallyaccessmultipleremote(orlocal)objects.Therequestbrokermayalsofunctionasanmediatorforheterogeneousobjects(異構對象中介),allowinginteractionsamongobjectsimplementedusingdifferentAPIsand/orrunningondifferentplatforms.ORB(ObjectRequestBroker)ORB與RMI的區(qū)別:ORB充當中間件角色,使作為對象請求者的應用程序可以訪問多個遠程(或本地)對象。3.TheObjectRequestBrokerParadigm

3.TheObjectRequestBrokerParadigmThisparadigmisthebasisoftheObjectManagementGroup’sCORBA(CommonObjectRequestBrokerArchitecture)architecture.(/)Toolkitsbasedonthearchitectureinclude:Inprise’sVisibroker/visibroker/Java’sInterfaceDevelopmentLanguage(JavaIDL) /products/jdk/idl/Orbix’sIONA,andTAOfromtheObjectComputing,Inc./vendors/pages/iona.htmlCORBA結構是基于ORB的3.TheObjectRequestBrokerParadigm

4.TheObjectSpaceParadigmPerhapsthemostabstractoftheobject-orientedparadigms,theobjectspaceparadigmassumestheexistenceoflogicalentitiesknownasobjectspaces.

Theparticipantsofanapplicationconverge(會聚)inacommonobjectspace.Aproviderplacesobjectsasentriesintoanobjectspace,andrequesterswhosubscribetothespaceaccesstheentries.4.TheObjectSpaceParadigm-2Inadditiontotheabstractionsprovidedbyotherparadigms,theobjectspaceparadigmprovidesavirtualspaceormeetingroomamongprovidersandrequestersofnetworkresourcesorobjects.Thisabstractionhidesthedetailinvolvedinresourceorobjectlookupneededinparadigmssuchasremotemethodinvocation,objectrequestbroker,ornetworkservices.CurrentfacilitiesbasedonthisparadigmincludeJavaSpaces.(/products/javaspaces/)5.Component-basedTechnologiesComponent-basedtechnologiessuchasMicrosoft’sCOM,MicrosoftDCOM,Microsoft.Net,CORBA,JavaBean,andEnterpriseJavaBeanarealsobasedondistributed-objectparadigms,ascomponentsareessentiallyspecialized,packagedobjectsdesignedtointeractwitheachotherthroughstandardizedinterfaces.Inaddition,applicationservers,

popularforenterpriseapplications,aremiddlewarefacilitieswhichprovideaccesstoobjectsorcomponents.WebSpherefromIBMWebLogicPortalfromBEASystemsJEEfromSunMicrosystemsJ2EEfromSunMicrosystems2.8TheMobileAgentParadigm

MessagepassingRemoteProcedureCallClient-serverPeer-to-PeerMessagesystem:Point-to-point;Publish/SubscribeDistributedobjects:Remotemethodinvocation

NetworkservicesObjectRequestBroker

Objectspace

ComponentBasedTechnologiesMobileagentsCollaborativeapplications

軟件Agent技術最早可以追溯到人工智能研究的初期階段,1977年Hewitt在研究ConcurrentActorModel時提出了具有自組織性、反應機制和同步執(zhí)行能力的軟件模型,即最初的軟件Agent思想。90年代初,大家都將精力集中于對軟件Agent理論的研究,并從系統(tǒng)的角度提出了一些基本概念。2.8TheMobileAgentParadigm

90年代初,GeneralMagic公司在推出其商業(yè)系統(tǒng)Telescript時提出了移動Agent概念,即一個能在異構網(wǎng)絡環(huán)境中自主地從一臺主機遷移到另一臺主機,并可與其它Agent或資源交互的軟件實體。移動Agent可以看成是軟件Agent技術與分布式計算技術相結合的產(chǎn)物,具有軟件Agent的基本特性--自治性、響應性、主動性和推理性外,還具有移動性。

2.8TheMobileAgentParadigmAmobileagentisatransportableprogramorobject(移動性).Inthismodel,anagentislaunchedfromanoriginatinghost.Theagenttravelsfromhosttohostaccordingtoanitinerarythatitcarries.Ateachstop,theagentaccessesthenecessaryresourcesorservices,andperformsthenecessarytaskstoaccomplishitsmission.2.8TheMobileAgentParadigm

2.8TheMobileAgentParadigmTheparadigmofferstheabstractionforatransportableprogramorobject.

Inlieuof(代替)messageexchanges,dataiscarriedbytheprogram/objectastheprogramistransportedamongtheparticipants.Commercialpackageswhichsupportthemobileagentparadigminclude:IBM’sAgletsystem. http://www.trl.ibm.co.jp/aglets/MitsubishiElectricITA’sConcordiasystem /HSL/Projects/Concordia/Welcome.htmlMessagepassingRemoteProcedureCallClient-serverPeer-to-PeerMessagesystem:Point-to-point;Publish/SubscribeDistributedobjects:Remotemethodinvocation

NetworkservicesObjectRequestBroker

Objectspace

ComponentBasedTechnologiesMobileagentsCollaborativeapplications2.9TheCollaborativeApplication(Groupware)Paradigm

2.9TheCollaborativeApplication(Groupware)Paradigm

Inthismodel,processesparticipateinacollaborativesessionasagroup.Eachparticipatingprocessmaycontributeinputtopartorallofthegroup.Processesmaydosousing:multicastingtosenddatatoallorpartofthegroup,ortheymayusevirtual

sketchpads(畫板)orwhiteboards

whichallowseachparticipanttoreadandwritedatatoashareddisplay.ChoosingaparadigmTovaryingdegrees,paradigmsprovideabstractionsthatinsulatethedevelopersfromthedetailofinterprocesscommunicationandeventsynchronization,allowingtheprogrammertoconcentrateonthebiggerpictureoftheapplicationitself.(根據(jù)所關注的層面選擇)Inchoosingaparadigmoratoolforanapplication,therearetradeoffs(權衡)thatshouldbeconsidered,includingoverheads,scalability,cross-platformsupport,andsoftwareengineeringissues.DistributedComputingSystemsDistributedInformationSystemsDistributedPervasiveSystems2.10分布式系統(tǒng)的類型DistributedComputingSystems

用于高性能計算任務的系統(tǒng),可以分為:ClusterComputingSystemsGridComputingSystems2.10分布式系統(tǒng)的類型ClusterComputingSystemsAnexampleofaclustercomputingsystem.底層由工作站或PC機組成,通過高速網(wǎng)絡連結,每個結點運行相同的操作系統(tǒng)。電網(wǎng)電站電站電站水壩礦山油井GridComputing如同使用電力一樣,無需在用戶端配全套計算機系統(tǒng)和復雜軟件,就可以簡便地得到網(wǎng)格提供的各種服務。

GridComputing網(wǎng)格計算目前還沒有一個標準的定義,關鍵問題是如何把來自不同計算機組織的資源集中起來,使一組人或機構進行協(xié)調工作。網(wǎng)格計算系統(tǒng)具有高度的異構性(硬件、OS、網(wǎng)絡、管理域和安全策略等)。GridComputing兩個比較重要的網(wǎng)絡體系結構:Foster等提出的分層結構;結合WebService提出的開放網(wǎng)格服務結構OGSA。GridComputingGridComputingSystemsAlayeredarchitectureforgridcomputingsystems.應用層應用層網(wǎng)格計算協(xié)議互聯(lián)網(wǎng)協(xié)議匯集層資源層連接層連接層構造層互聯(lián)網(wǎng)傳輸層構造層(Fabric)提供共享的資源,它們是物理或邏輯實體。連接層(Connectivity)

它是網(wǎng)格中網(wǎng)絡事務處理通信與授權控制的核心協(xié)議。資源層(Resource)

對單個資源實施控制,實現(xiàn)資源注冊、資源分配和資源監(jiān)視。匯集層(Collective)

資源匯集,供虛擬組織的應用程序共享、調用。提供目錄服務、日程安排、資源代理、資源監(jiān)測診斷、網(wǎng)格啟動、負荷控制、賬戶管理等多種功能。應用層(Applications)

通過各層的API調用相應的服務,再通過服務調用網(wǎng)格上的資源來完成任務。需要構建支持網(wǎng)格計算的庫函數(shù)。應用層工具與應用匯集層資源與連接層各種資源構造層資源與服務的安全訪問目錄代理診斷與監(jiān)控等OGSA--開放網(wǎng)格服務體系結構OGSA是以服務為中心的結構,這里服務是指具有特定功能的網(wǎng)絡化實體。OGSA定義了“網(wǎng)格服務”的概念,網(wǎng)格服務是一種WebService,該服務提供了一組接口:網(wǎng)格={網(wǎng)格服務}網(wǎng)格服務=接口/行為+服務數(shù)據(jù)GGG(GreatGlobalGrid)HPIBMWebServicesMicrosof.NetSunONE/N1TeraGridIPGGIGASCIGridDataGrid信息網(wǎng)格和知識網(wǎng)格SemanticWebKnowledgeManagementOntologyInformationPlatform商業(yè)應用網(wǎng)格CDNRTECWebService其它模式P2PParasiticComputing計算和數(shù)據(jù)網(wǎng)格GridComputingSystems一些主要研究計劃:GlobusLegionInformationPowerGridEuroGridDistributedTerascaleFacilityChinaGridGlobus計劃

Globus是美國Argonne國家實驗室的研發(fā)項目,全美有12所大學和研究機構參與了該項目。

Globus對資源管理、安全、信息服務及數(shù)據(jù)管理等網(wǎng)格計算理論進行研究,開發(fā)能在各種平臺上運行的網(wǎng)格計算工具軟件(Toolkit源碼開放),幫助規(guī)劃和組建大型的網(wǎng)格試驗平臺,開發(fā)適合大型網(wǎng)格系統(tǒng)運行的大型應用程序。Toolkit是Globus最重要的成果,其第一版在1999年推出。目前,Globus的技術已在NASA網(wǎng)格(NASAIPG)、歐洲數(shù)據(jù)網(wǎng)格(DataGrid)、美國國家技術網(wǎng)格(NTG)等項目中得到應用。

Legion計劃維吉尼亞大學的一個基于對象的元系統(tǒng)軟件項目,它被設計成一個具有幾百萬個主機和幾百萬億個對象的系統(tǒng),這些主機和對象通過高速鏈路系在一起。在家用機器上工作的用戶在獲取各種數(shù)據(jù)和物理資源時,例如數(shù)字圖書館、物理仿真、照相機、線性加速器和視頻流,看起來就像在一臺單一的計算機上獲取的。用戶群體可以構造共享虛擬工作空間,進行合作研究和交換信息。這一抽象概念來源于Legion計劃的透明進度、數(shù)據(jù)管理、容錯、位置自治、一些列的安全選項。InformationPowerGrid其定義為廣泛的計算機、數(shù)據(jù)和儀器的分布式網(wǎng)絡,以及穿過制度上的界限實現(xiàn)共享的協(xié)作環(huán)境。分成四層:分布式異構資源層、虛擬機器層、工具和高水平服務層、應用層。

EuroGrid由歐洲經(jīng)濟共同體共同出資的研究和技術發(fā)展項目(RT

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論