1 / 44

JXTA

JXTA. Acknowledgements. Bernard Traversat Project JXTA Sun Microsystems Santa Clara, CA. Gabriel Antoniu IRISA/INRIA Rennes Projet Paris. Sun's Interest in Peer-to-Peer. P2P is an instance of our vision — “The Network Is the Computer™” Advance Sun products' readiness for P2P.

zev
Télécharger la présentation

JXTA

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. JXTA

  2. Acknowledgements Bernard Traversat Project JXTA Sun Microsystems Santa Clara, CA Gabriel Antoniu IRISA/INRIA Rennes Projet Paris

  3. Sun's Interest in Peer-to-Peer • P2P is an instance of our vision — “The Network Is the Computer™” • Advance Sun products' readiness for P2P

  4. JXTA: a Generic Framework for P2P Computing • Open platform for P2P programming • Common functionalities • Language, OS, network agnostic • Set of interoperable protocols (XML) • Open source project: http://www.jxta.org

  5. JXTA Interoperability:Any Platform, Any Network JXTA Chat (MIDP) JXTA Virtual Network MyJXTA (J2SE on Windows) JXTA-C Shell (C on Solaris)

  6. Project JXTA: Technical Goal • Build a small, lightweight platform as the foundation for peer to-peer massively scalable network computing jux·ta·pose - v. tr. • To place side by side, especially for comparison or contrast.

  7. JXTA Services and Applications • Distributed storage and data sharing • Search, indexing and file sharing • Large scale distributed computing • P2P messaging and collaboration tools

  8. JXTA Virtual Network Project JXTA Virtual Network Peer Peer Peer Peer Peer Peer Peer Peer Virtual Mapping TCP/IP Physical Network NAT HTTP Firewall Physical Network

  9. Peers • A peer • Unique identifier (UUID) • Addressable independently of its location (firewalls, NAT) • Multiple Peer “endpoint” address (TCP, HTTP, etc.) • Peer types • Minimal edge : send/receive • Full edge : + cache • Rendezvous : + fwd requests • Relay : +routing cache +firewall support

  10. Peer Groups • Why Peer Groups? • Provide a “group” identity (common interest) • Create secure & protected domains • Scope peer operations (discovery, search, communications) • Enable monitoring NetPeerGroup PeerGroupA Peer ID Peer ID Peer ID Peer ID Peer ID Peer ID Peer ID Peer ID PeerGroupB

  11. Every resource is represented by an advertisement Peer Peer group Pipe Service Content Peer status PeerGroup Advertisement: <?xml version="1.0"?> <!DOCTYPE jxta:PGA> <jxta:PGA> <GID> urn:jxta: uuid- BCBCDEABDBBBABEABBBABA000000 </GID> <MSID> urn:jxta:uuid- BFEFDEDFBABAFRUDBACE00000001 </MSID> <Name> My Group </Name> <Desc> This group is to be used for my own testing </Desc> </jxta:PGA> Advertisements

  12. Input Pipe Output Pipe Peer Propagate Peer Propagate Pipe Receive Point-to-Point Pipe Peer Peer Send PeerGroup B Peer Group A Pipe: Virtual Communication Channel • Non-localized communication channel between two or more peers • Uni-directional • Asynchronous • Unreliable

  13. Pipe Communication Model • Connect to services independently of their peer locations • Dynamic binding • At pipe creation or for every message sent • Build highly-available services • Transparent fail-over by reconnecting pipe endpoints • Pipeline multiple services to form complex service

  14. Network Services • Peer Services • PeerGroup Services • Can be dynamically loaded

  15. JXTA Protocol Stack Pipe Binding Protocol Peer Discovery Protocol Peer Info Protocol Peer Resolver Protocol Peer Endpoint Protocol Peer Rendezvous Protocol

  16. JXTA Shell Peer Commands P2P Software Architecture Sun JXTAApplications JXTA Applications Community JXTA Applications Sun JXTA Services Indexing Searching File sharing Core JXTA Services Indexing Searching JXTAServices Community JXTA Services Peer Monitoring Peer Groups Peer Pipes JXTA Core Security Security Any Peer on the Expanded Web

  17. JXTA: Core Services • Discovery Service • PeerInfo Service • Pipe Service • Resolver Service • Membership Service • Access Service

  18. Query Propagation • Queries only propagated among rendezvous peers • Edge peers only receive direct queries for their own advertisements • Rendezvous peers self organize

  19. DHT-based Resource Discovery • Edge peers publish indices of advertisements across Rdv network using Distributed Hash Tables (DHT) • DHTs are maintained by Rendezvous peers • Queries are directed to appropriate Rdv • If not found, a walk of the Rdv web is performed • Hash functions are pluggable

  20. Loosely-Consistent DHT • Peers have high churn rate • Maintaining a consistent distributed index outweight the advantages of having one • Network crawling is expensive but does not have any maintenance cost

  21. Rendezvous Peer View (RPV) • Each rendezvous peer maintains an ordered list of known rendezvous peer in the peergroup by their peer IDs • No strong consistency mechanism is used to enforce the consistency of the RPV across all rendezvous • Rendezvous periodically select random number of rendezvous from their RPV, and send them a random list of their known rendezvous

  22. Publish advertisement

  23. Search advertisement

  24. Inconsistent view

  25. Limited-range walker

  26. Finding Rendezvous Peers • Edge peers maintain lists of rendezvous peers • Dynamic fail-over when connection fails • Edge peers discover and cache Rdv advertisements • Seeding Rdvs are used to bootstrap • Auto-promotion to Rdv if none can be found in PeerGroup

  27. JXTA Implementation Platforms • JXTA-J2SE Implementation (J2SE 1.4.1) • Full Implementation of JXTA Protocols • Tutorials and Programmer Guide • JXTA-C – recent results • JXTA 2.0 compliant • TCP transport • Others: Objective-C, Perl, Ruby, .Net

  28. JXTA Community • Over 2,700,000 downloads • 120+ active projects • 18,000+ members • Active discussion groups • Community actively contributing and integrating technology WWW.JXTA.ORG

  29. JXTA Bookshelf • JXTA: P2P Computing with Java, Sing Li, 2002 • JXTA, Brendon J. Wilson, 2002 • JXTA: Java P2P Programming, Daniel Brookshire et al, 2002 • Mastering JXTA Development, Joe Gradecki, 2002 • Java P2P Unleashed, Robert Flenner et al, 2002 • JXTA in a Nutshell, Scott Oaks et al, 2002 http://www.jxta.org/bookshelf.html

  30. JXTA Technology Today • Enhanced Network and J2SE Platform • Mature, stable, secure, scalable platform. • 2.0 spec, code, demos, docs, and tutorials on-line • Public virtual network in place • Mix of large and small companies, government and education using technology for internal apps and product development • JXTA-C and JXME implementations available • Community Projects

  31. JXTA Technology Tomorrow • Focus on stability, scalability and security • Integration with web services • New P2P services

  32. Let's get started! • Hello JXTA ! • Resource discovery • Pipe communication • Discover and use a service Note: the following examples do not necessarily follow the exact API of the most recent version of JXTA. They are simply meant to illustrate the main concepts involved.

  33. Hello JXTA ! import … public class SimpleJxtaApp { public static void main(String args[]) { try { // Create, and Start the default jxta NetPeerGroup PeerGroup netPeerGroup = PeerGroupFactory.newNetPeerGroup(); // Obtain the peer advertisement PeerAdvertisement myPeerAdv = netPeerGroup.getPeerAdvertisement(); //Get the discovery service DiscoveryService discovery = netPeerGroup.getDiscoveryService(); //Publish the peer advertisement discovery.publish(myPeerAdv); } catch (PeerGroupException pge) { pge.printStackTrace(); } }

  34. Resource discovery • Discovery Listener • interface discoveryListener • discovery.addDiscoveryListener(this) • discovery.getRemoteAdvertisments • discoveryEvent (DiscoveryEvent ev)

  35. Pipe communication • Receiver • interface: PipeMsgListener • pipeService.createInputPipe • pipeMsgEvent • Sender • interface: OuputPipeListener • pipeService.createOutputPipe • outputPipeEvent

  36. JXTA Services • Server • Create a ModuleSpecAdvertisement • Include a pipe advertisement • Create the input pipe • Publish the advertisement • Read messages on the pipe (waitForMessage) • Client • Discover the ModuleSpecAdvertisement • Extract the pipe advertisement • Resolve the pipe advertisement and create an output pipe • Send a message on the pipe

  37. juxmem group Data group cluster A group cluster B group JuxMem cluster C group Logical architecture Physical architecture

  38. Goals ? • Ensure data availability even in presence of failure • Ensure data consistency JuxMem core (Mathieu Jan) • JuxMem core • ID • Communications (send / receive) • Publish / search (local and global)

  39. Example: Building a Fault-Tolerant Consistency Protocol • Starting point: a home-based protocol for entry consistency • Relaxed consistency model • Explicit association of data to locks • MRSW : Multiple Reader Single Writer • acquire(L) • acquireRead(L) • Home-based protocol Home Home node Client

  40. A Home-Based Protocol Scheme Home

  41. Problem: Inter-cluster Latency Higher than Intra-cluster Latency Home

  42. Next Step: a Hierarchical Consistency Protocol • Inspired by CLRC[LIP6] and H2BRC[PARIS] Global home Local home Local home Client Local home

  43. Problem: Critical Entities May Crash Question: how to support home crashes on a grid infrastructure ? Global home Local home Local home Client Local home

  44. Solution: Replicate Critical EntitiesUsing Fault-Tolerant Components GDG : Global Data Group LDG : Local Data Group • Rely on replication techniques and group communication protocols used in fault-tolerant distributed systems GDG LDG LDG LDG Client

More Related