Endpoint and Pipes:端點和管道 一個同位體可能含有多個端點-因為實現(xiàn)了多種協(xié)議。比如,我們可以用tcp進(jìn)行連接,也可以用http進(jìn)行連接-當(dāng)有firewall的時候。 假如覺得一個pear實現(xiàn)多種協(xié)議很麻煩,也可以只用一種協(xié)議:http。
3. 同位體和組(peer and group) 為什么使用組? 安全,隱私,更加高效的數(shù)據(jù)共享。
4. 廣告(Advertisements) 同位組廣告: 定義這個同位組的識別標(biāo)志和服務(wù): Name DESC GID(Peer group id) MSID SVC(Service)-list of the service denoted by MCID and Parmeters
Peer Advertisements 同位體廣告: Name DESC PID(Peergroup id) Debug Flag(Dbg)-optional tag for debugging Service(SVC)
模塊-Modules 模塊是定義了一個同位體或者一個同位體組所提供的服務(wù)。
模塊類廣告-Module Class Advertisement 定義了一種行為。 格式: MCID(Module class id)-Module唯一的識別標(biāo)志 Name-模塊名稱,用來進(jìn)行search和識別,不保證唯一 DESC(Descripition)-描述:供搜索和識別用。
模塊規(guī)范描述廣告-Module Specification Advertisement 比較具體的描述模塊的規(guī)范定義。 Module Spec ID(MSID)-定義一個模塊-和MCID有和區(qū)別? Compatibility(COMP)兼容性-定義代碼的兼容性,跨語言和跨平臺。 Name Desc Sprcification URI document.定義URI Vers-the version Parm-定義參數(shù)-供Implementation使用 Proxy-ModuleSpecID of a proxy if one exists Authenticator-ModuleSpecID of an authenticator module if required
模塊執(zhí)行廣告 Name DESC MSID COMP PURI(Package URI)-Download the special code Code-a reference code,for a java module,this is a classname Prov(Provider)
管道廣告-Pipe Advertisements Name ID TYPE-Related to a protocol, unicasttype,unicastsecuretype,propagatetype
管道綁定協(xié)議-Pipe Binding Protocol 要建立管道,一個peer必須憲發(fā)布一個管道廣告,表示自己在request。接收方會回應(yīng)并同時發(fā)布廣告。 Request Adv: Msgtype-Query or Respond PopeId-Pipe id being resolved Type-the type of pope resolution requested Cached-cache里是否有答案 Peer-指定鏈接的peer Response Adv: Msgtype Pipeid Type Found
Resolver-解釋器 用來發(fā)現(xiàn)來自對等組內(nèi)其它對等機(jī)的廣告;有助于發(fā)現(xiàn)對等機(jī)、對等組、管道和服務(wù) 解釋器的ResolverQuery message的schema: credential-信任證書 of the peer sending the query HandlerName QueryID Query
Rendezvous Protocol: 描述了消息是怎么在組里面廣播的。 使用端點協(xié)議來定位同位體和路由以及傳輸 使用Rendezvous Protocol來傳輸消息。 Rendezvous ADV: Name Rdvgroupid-peergroup uuid Rdvpeerid-peer id of the Rendezvous peer