* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download The Peer Resolver Protocol
Survey
Document related concepts
Distributed firewall wikipedia , lookup
Cracking of wireless networks wikipedia , lookup
Extensible Authentication Protocol wikipedia , lookup
Deep packet inspection wikipedia , lookup
Airborne Networking wikipedia , lookup
Computer network wikipedia , lookup
SIP extensions for the IP Multimedia Subsystem wikipedia , lookup
Recursive InterNetwork Architecture (RINA) wikipedia , lookup
Zero-configuration networking wikipedia , lookup
Internet protocol suite wikipedia , lookup
Transcript
Department of Communications, Optics & Materials Technical University of Denmark JXTA protocols Colin Chaballier [email protected] 34352-Advanced Protocols 18/04/2006 JXTA Peer-to-Peer Networking ? a well-known subject (File Exchange, Instant Messaging ….) Peer-to-peer networks are dedicated to their application … a lack of inter-operability … a lack of independence with platforms - Transport Networks - Operating System & programming language A real need for an independent, adhoc, pervasive p2p network >> JXTA ! JXTA Agenda 1. Context & Overview - What Jxta is - Jxta’s philosophy - An overlay network 2. Protocols - Protocol stack overview - Protocols description - Peer Discovery Protocol - Peer Resolver Protocol - Rendez Vous Protocol - Endpoint Routing Protocol - Pipe Binding Protocol - Peer Information Protocol - Jxta 2 improvements 3. Discussion - Jxta’s issues - Implementations, applications and future JXTA 1. Context & Overview - What Jxta is - JXTA’s philosophy - An overlay network 2. Protocols 3. Discussion What Jxta is 34352-Advanced Protocols A set of specifications by Sun Microsystems Version 1 in June 2001 Version 2 in June 2003 Still improving … Objective: to define protocols for generic peer-to-peer networking Implementations proposed by Sun Microsystems on the Java platforms 18/04/2006 Colin Chaballier, [email protected] 5 34352-Advanced Protocols JXTA’s philosophy (1/2) Jxta enables to build p2p applications on a common platform (JXTA) with the following characteristics: > scalability > Robustness & fault-resistance > Dynamic behavior & spontaneity > self-organization >> Creation of a new set of applications 18/04/2006 Colin Chaballier, [email protected] 6 34352-Advanced Protocols JXTA’s philosophy (2/2) Organization of these applications: > Services offered within peergroups > Each peer is able to “provide” or “consume” a service 18/04/2006 Colin Chaballier, [email protected] 7 34352-Advanced Protocols An overlay network (1/2) Illustration copied from the paper “Project JXTA: A Loosely-Consistent DHT Rendezvous Walker”, B.Traversat and al., Sun Microsystems. 18/04/2006 Colin Chaballier, [email protected] 8 34352-Advanced Protocols An overlay network (2/2) The basics elements of a JXTA network: > Peer The basic element, could be a PC, a cluster, a sensor … > Peergroup A group of peers with a common interest. Peers must be part of the same peergroup to communicate. > Service Peers can proposes services within their peergroups. > Endpoint Abstraction of peers’ network interfaces. An endpoint can matches with more than one peer (broadcast). > Pipe High level mean of transport between endpoints. > Advertisement Way to provide descriptions of every resources in the network. 18/04/2006 Colin Chaballier, [email protected] 9 JXTA 1. Context & Overview 2. Protocols - Protocol stack overview - Protocols description - Peer Discovery Protocol - Peer Resolver Protocol - Rendez Vous Protocol - Endpoint Routing Protocol - Pipe Binding Protocol - Peer Information Protocol - Jxta 2 enhancements 3. Discussion 34352-Advanced Protocols The Jxta protocol stack (1/2) 6 defined protocols for adhoc and p2p networking to : • Route • Discover • Organize • Monitor • and communicate … between peers Without any assumptions on the underlying transport network 18/04/2006 Colin Chaballier, [email protected] 11 34352-Advanced Protocols The Jxta protocol stack (2/2) 1 2 5 6 3 4 18/04/2006 Colin Chaballier, [email protected] 12 34352-Advanced Protocols The Peer Discovery Protocol (1/2) Description Publish and discover ressources using advertisements • Every network resources represented by an advertisement (peer, peergroup, pipe, module …) • A very simple and generic mechanism • 2 messages types : Discovery Query Message lookup for a keyword for example Discovery Response Message reply matching advertisements • No guarantee of response to a query 18/04/2006 Colin Chaballier, [email protected] 13 34352-Advanced Protocols The Peer Discovery Protocol (2/2) Messages <?xml version=“1.0” encoding=“UTF-8”?> <jxta:DiscoveryQuery> <Type> . . . </Type> The Discovery Query Message structure : <Threshold> . . . </Threshold> <PeerAdv> . . .</PeerAdv> <Attr> Name </Attr> <Value> *sidus* </Value> </jxta:DiscoveryQuery> <jxta:DiscoveryResponse> <Type> . . . </Type> <Count> . . . </Count> The Discovery Response Message structure : <PeerAdv> . . .</PeerAdv> <Attr> Name. </Attr> <Value> *sidus*</Value> <Response Expiration= ‘’expiration time’’> <!-- pipe adv., containing the string “sidus” in its name> </Response> </jxta:DiscoveryResponse> 18/04/2006 Colin Chaballier, [email protected] 14 34352-Advanced Protocols The Peer Discovery Protocol - Summary • How to publish and discover network resources with advertisements > Next step: Peer Resolver Protocol 1 2 18/04/2006 Colin Chaballier, [email protected] 15 34352-Advanced Protocols The Peer Resolver Protocol (1/2) Description • Spread generic queries to one or more peer inside a peergroup • And matches responses to them • 2 messages types : Resolver Query Message Resolver Response Message • A unique ID for each query • Best effort behaviour … any guarantee to get a response to a query 18/04/2006 Colin Chaballier, [email protected] 16 34352-Advanced Protocols The Peer Resolver Protocol (2/2) Messages <?xml version=“1.0” encoding=“UTF-8”?> <jxta:ResolverQuery> <Credential> . . . </ Credential> <SrcPeerID> . . . </ SrcPeerID> The Resolver Query Message structure : <HandlerName> . . .</HandlerName> <QueryID> . . . </ QueryID > <Query> <!-- ex: Discovery Query Message --> </Query> </jxta:ResolverQuery> <?xml version=“1.0” encoding=“UTF-8”?> <jxta:ResolverResponse> <Credential> . . . </ Credential> The Resolver Response Message structure : <HandlerName> . . .</HandlerName> <QueryID> . . . </ QueryID > <Response> <!-- ex: Discovery Response Message --> </Response> </jxta:ResolverResponse> 18/04/2006 Colin Chaballier, [email protected] 17 34352-Advanced Protocols The Peer Resolver Protocol - Summary • How to send query-based messages through the network > Next step: Rendez Vous Protocol 1 2 18/04/2006 Colin Chaballier, [email protected] 3 18 34352-Advanced Protocols The RendezVous Protocol (1/3) Description • Propagation of messages within a peergroup • And control of propagation (TTL, loopback detection) • Notion of rendezvous peers Explicit connection between a simple peer and a rendezvous peer • 3 types of messages : LeaseRequest LeaseGranted LeaseCancelRequest LeaseCancelled 18/04/2006 Colin Chaballier, [email protected] 19 34352-Advanced Protocols The RendezVous Protocol (2/3) XML element The rendezvous Propagate Message element: <jxta:RendezVousPropagateMessage> <MessageId> … </MessageId> <DestSName> . . . </DestSName> <DestSParam> . . . </DestSParam> <TTL> … </TTL> <Path> . . . </Path> </jxta:RendezVousPropagateMessage> MessageId : time in ms since propagation start DestSName & DestSParam : name & parameters of the destination service TTL : current TTL of the propagated message Path: peer Ids of peer already visited 18/04/2006 Colin Chaballier, [email protected] 20 34352-Advanced Protocols The RendezVous Protocol (3/3) Propagation Control Loops: With the path element, messages already processed on a peer are discarded. Expiration: With the TTL element, messages are propagated until the TTL reach zero. Duplication: With the unique identifier, duplicated messages can be detected on peers. > modification with version 2 18/04/2006 Colin Chaballier, [email protected] 21 34352-Advanced Protocols Partial summary: how to discover resources ? Using the Peer Discovery Protocol, Peer Resolver Protocol, and Rendez Vous Protocol 1. Prepare the Discovery query <jxta:ResolverResponse> <jxta:ResolverQuery> <jxta:DiscoveryResponse> <jxta:DiscoveryQuery> <Credential> . . . </ Credential> . . . </ Credential> <Type> <Type>. .. .. </Type> .<Credential> </Type> 2. Pack it with a Resolver Query 3. Send query <HandlerName> . .</HandlerName> . . . </ SrcPeerID> <Count> . . . <SrcPeerID> </Count> <Threshold> . . .. </Threshold> <QueryID> </ QueryID > . . .</HandlerName> <PeerAdv> ....</PeerAdv> <PeerAdv>..<HandlerName> .. .</PeerAdv> 4. Propagate query with RVP 5. Peers look for the asked resource 6. Positive replies are sent back 7. Unpack the Resolver Response 8. Get Discovery Response <Response> <QueryID> <Attr> </Attr> <Attr>Name. Name </Attr> . . . </ QueryID > <!-- Discovery Response Message --> <Query> <Value> *sidus*</Value> <Value> *sidus* </Value> </Response> <!-- Discovery Query Message --> <Response Expiration= ‘’expiration time’’> </jxta:DiscoveryQuery> </jxta:ResolverResponse> </Query> <!-- pipe adv., containing the string “sidus” in its name> </jxta:ResolverQuery> </Response> </jxta:DiscoveryResponse> No Peer 2 Yes Peer 3 Peer 1 No RendezVous Peer No Peer 4 Animation inspired from the book “JXTA” page 127, Brendon Wilson, New Riders Edition. 18/04/2006 Colin Chaballier, [email protected] 22 34352-Advanced Protocols > Next step: Endpoint Routing Protocol 1 2 18/04/2006 Colin Chaballier, [email protected] 3 4 23 34352-Advanced Protocols The EndPoint Routing Protocol (1/4) Description Any assumption on the underlying transport network (even TCP/IP) … … need to define a own routing protocol. > A routing protocol > A transport protocol 18/04/2006 Colin Chaballier, [email protected] 24 34352-Advanced Protocols The EndPoint Routing Protocol (2/4) A Routing Protocol • Route Query/Response Messages to find routes • Best path decision: dependent of the application, not specified in JXTA. • Allow NAT traversal (use of HTTP for transport) <jxta:EndpointRouter> The Route Query Message: <Type> RouteQuery </Type> <DestPeer> . . . </ DestPeer> </jxta:EndpointRouter> <jxta:EndpointRouter> <Type> RouteResponse </Type> <DestPeerIdTag> . . . </ DestPeerIdTag> The Route Response Message: <RoutingPeerIdTag> . . . </RoutingPeerIdTag> <RoutingPeerAdvTag> . . . </RoutingPeerAdvTag> <NbOfHops> … </NbOfHops> <GatewayForward> @gw1 </GatewayForward> <GatewayForward> @gw2 </GatewayForward> … </jxta:EndpointRouter> 18/04/2006 Colin Chaballier, [email protected] 25 34352-Advanced Protocols The EndPoint Routing Protocol (3/4) A Transport Protocol • Add routers path (as an XML element) to the sent message The Endpoint Router Message element: <jxta:JxtaEndpointRouter> <jxta:Src> … </jxta:Src> <jxta:Dest> … </jxta:Dest> <jxta:Last> … </jxta:Last> <jxta:NBOH>… </jxta:NBOH> <jxta:GatewayForward> @gwForward1 </jxta:GatewayForward > <jxta:GatewayForward> @gwForward2 </jxta:GatewayForward > … <jxta:GatewayReverse> @gwReverse1 </jxta:GatewayReverse > <jxta:GatewayReverse> @gwReverse2 </jxta:GatewayReverse > … </jxta:EndpointRouter> 18/04/2006 Colin Chaballier, [email protected] 26 34352-Advanced Protocols The Endpoint Routing Protocol (4/4) Message exchanges No Peer 2 Route Query Message No Route Response Message Message to sent Peer 3 + Endpoint Router Message Yes Peer Router Peer 1 Peer 4 private network Peer Router http transport Within the same PeerGroup Animation inspired from the book “JXTA” page 278, Brendon Wilson, New Riders Edition. 18/04/2006 Colin Chaballier, [email protected] 27 34352-Advanced Protocols The EndPoint Routing Protocol - Summary • How to reach a peer in the network > Next step: Pipe Binding Protocol 1 5 2 18/04/2006 Colin Chaballier, [email protected] 3 4 28 34352-Advanced Protocols The Pipe Binding Protocol (1/2) Description • Used to bind network Endpoint and pipes input/output • Pipes: abstraction to allow easy communication between endpoints 3 types of pipes: unicast, broadcast, and secure Only mandatory support of unicast & asynchronous pipe type Peer 2 broadcast pipe Peer 1 Unicast pipe Peer 3 Peer 4 18/04/2006 Colin Chaballier, [email protected] 29 34352-Advanced Protocols The Pipe Binding Protocol (2/2) <jxta:PipeResolver> • Pipe Binding Query: <MsgType>Query</MsgType> To discover listening peer endpoints to a particular pipe advertisement <PipeId> … </PipeId> <Type> … </Type> <Cached> … </Cached> <Peer> … </Peer> </jxta:PipeResolver> <jxta:PipeResolver> • Pipe Binding Response: Optional response to a Pipe Binding Query <MsgType>Answer</MsgType> <PipeId> … </PipeId> <Type> … </Type> <Cached> … </Cached> <Peer> … </Peer> <Found> … </Found> <PeerAdv> … </PeerAdv> </jxta:PipeResolver> 18/04/2006 Colin Chaballier, [email protected] 30 34352-Advanced Protocols The Pipe Binding Protocol - Summary • How to realize a high-level abstraction communication between endpoints > Next step: Pipe Binding Protocol 1 5 2 18/04/2006 Colin Chaballier, [email protected] 6 3 4 31 34352-Advanced Protocols The Peer Information Protocol • A generic protocol to obtain peer status and monitoring information > help load balancing in the network • A simple Query/Answer mechanism Peer Info Query and Peer Info Response Messages • PeerInfoResponse Message fields: • • • • • • 18/04/2006 Peer uptime Information timestamp Response string (unspecified format) Timestamp of last incoming and outgoing messages Details on inbound and outbound traffic seen Number of processed bytes Colin Chaballier, [email protected] 32 34352-Advanced Protocols Protocols description - Summary (1/2) • How to Publish and discover network resources with advertisements • How to send query-based messages through the network • How to propagate messages within a peergroup • How to reach a peer wherever in the network • How to realize a high-level abstraction communication between endpoints • How to monitor peers status 1 2 5 6 3 4 18/04/2006 Colin Chaballier, [email protected] 33 34352-Advanced Protocols Protocols description - Summary (2/2) The “service” view 18/04/2006 Colin Chaballier, [email protected] 34 34352-Advanced Protocols Jxta 2 improvements Version 1 since June 2001 Version 2 since February 2003 (now v2.3.5) Improvement of overall performance and scalability with: • New mechanisms for advertisement discovery (Rendezvous Super-peers) • New mechanisms for NAT traversal (Relay Super-peers) • Specification of a binary message format •… 18/04/2006 Colin Chaballier, [email protected] 35 34352-Advanced Protocols Jxta 2 improvements Advertisement discovery with Rendezvous Super-peers • Loosely-consistent Distributed Hash Table • Rendezvous Peer View Illustration copied from the paper “Project JXTA 2.0 Super-Peer Virtual Network“, B.Traversat and al., Sun Microsystems, 2003. 18/04/2006 Colin Chaballier, [email protected] 36 JXTA 1. Context & Overview 2. Protocols 3. Discussion - Jxta’s issues - Implementations, applications and future 34352-Advanced Protocols Jxta’s issues + Abstraction: generic, multi-platform, multi-language … + Use of XML: - easy understand & debug for developers - flexibility - No definition for services invocation - Not optimized for application oriented: cost of the XML overhead - Not optimized if usage of a reliable transport network (TCP/IP) Trade-off: Performance vs. Flexibility -> Not suitable for a short-term particular p2p application -> But provide the flexibility for a long-term solution requiring scalability 18/04/2006 Colin Chaballier, [email protected] 38 34352-Advanced Protocols Implementations, applications and future And now, what to do with JXTA protocols ? 1/ Developing a new application based on JXTA > Choose an existing implementation of the JXTA specifications: J2SE, J2ME, C, Perl, PocketPC … or do your proper implementation > And fit the implementation to your application Which components are useless ? What services to deploy ? Topology of rendez-vous peers … etc. 2/ Contribute to the Project JXTA > an open-source intiative still needing contributions … 3/ Or simply use a current application based on JXTA • from the Jxta community: myJXTA, Gnougat, … • more and more adopted by companies (Boeing, Verizon …) 18/04/2006 Colin Chaballier, [email protected] 39 Summary 34352-Advanced Protocols • Specifications for a generic p2p network A global adhoc overlay network Peer group organization Any assumption on underlying transport network 6 key protocols XML based Performance/flexibility trade-off Still in improvement - open source community 18/04/2006 Colin Chaballier, [email protected] 40 References 34352-Advanced Protocols > Official web site for project JXTA: www.jxta.org > Books: • "JXTA in a nutshell", S. Oaks, B.Traversat and L.Gong, O'reilly. • "JXTA", Brendon J. Wilson, New Riders Edition. Freely available online at http://www.brendonwilson.com/projects/jxta-book/ > Articles and reports: • "JXTA Technology Brings the Internet Back to Its Origin”. Available at http://java.sun.com/developer/technicalArticles/JXTA/ • "Project JXTA Virtual Network", B. Traversat et al., Sun Microsystems, 2002. • "Project JXTA 2.0 Super-Peer Virtual Network", B. Traversat et al., Sun Microsystems, 2003. • "Project JXTA: A Loosely-Consistent DHT Rendezvous Walker ", B. Traversat et al., Sun Microsystems. • "The JXTA performance model and evaluation", Emir Halepovic and Ralph Deters, Department of Computer Science, University of Saskatchewan, Canada, published in the Elsevier database "Future Generation Computer Systems", 2004. 18/04/2006 Colin Chaballier, [email protected] 41 34352-Advanced Protocols Thank you for your attention … Questions ? 18/04/2006 Colin Chaballier, [email protected] 42