Presentation is loading. Please wait.

Presentation is loading. Please wait.

2-1 JXTA Concepts. 2-1 Learning Objectives ● This module will help you... – Understand P2P principles – Learn about JXTA virtual network core building.

Similar presentations


Presentation on theme: "2-1 JXTA Concepts. 2-1 Learning Objectives ● This module will help you... – Understand P2P principles – Learn about JXTA virtual network core building."— Presentation transcript:

1 2-1 JXTA Concepts

2 2-1 Learning Objectives ● This module will help you... – Understand P2P principles – Learn about JXTA virtual network core building blocks – Understand the JXTA software architecture – Gain familiarity with the JXTA shell

3 2-1 Peer-to-Peer Principles ● Build complex behaviors by juxtaposing elementary ones ● Replicate information towards consumer peers ● Discover and adapt to new information sources ● Increase performance as system ages and more peers participate ● Protect data by replicating information ● Build reliability from interchangeable peers

4 2-1 Peer-to-Peer Security Principles ● Individual Privacy – No centralized servers mean messages cannot be read or forged on a centralized mail server ● No central point of knowledge – Unconstrained content replication means it is difficult to deny access since nobody knows the exact location of all copies of a content ● Web of trust – Trust based on peer behaviors and other peers' accumulated trust level on that peer ● Localized contamination – Virus only transmitted to peer's neighbors – when a server is contaminated, all its clients are also contaminated ● Age does matter – Older peers are typically more known than newer peers – self-protect against new intruders

5 2-1 Protocols Drive Distributed Computing Peer-to-Peer Web-based Client-Server TCP/IP HTTP JXTA

6 2-1 What is JXTA? ● An open set of XML-based protocols for creating peer-to-peer style network computing applications and services – Protocol based --> language, OS, network, and service agnostic technology – A virtual network overlay – Defines mechanisms, not policies – Open Source project: www.jxta.org

7 2-1 JXTA Protocols ● JXTA defines XML message formats, or protocols, for communication between peers ● Protocols used to discover peers, advertise and discover resources, communicate and route messages, and provide monitoring ● Asynchronous; based on query/response model ● Can be implemented in any language

8 2-1 JXTA Protocol Stack Peer Discovery Protocol Pipe Binding Protocol Peer Info Protocol Peer Resolver Protocol Peer Endpoint Protocol Peer Rendezvous Protocol Core Protocols (Required) Standard Services Protocols (Optional)

9 2-1 JXTA Virtual Network Firewall NAT Virtual Mapping TCP/IP Physical Network HTTP JXTA Virtual Network Peer

10 2-1 UNIX  as a Model ● Provide a simple set of abstractions to build complex systems ● “Virtualized” UNIX over the Internet In JXTA ● Universal IDs ● Everything is represented as an advertisement ● Peergroups as resource scoping mechanism ● Pipes as virtual communication channels ● Resolver as distributed resource locator In UNIX ● IDs ● Everything is represented as a file ● Process as resource scoping mechanism ● Pipes as communication channels ● Filesystem as resource locator

11 2-1 JXTA Virtual Network ● Uniform peer addressing – Peer Ids ● Dynamically configurable peer domains – Peergroups ● Uniform resource representation – Advertisements ● Universal binding – Resolver = searching for advertisements ● Virtual communication channels – Pipes ● Security and Monitoring Building Blocks

12 2-1 JXTA Software Architecture Sample Applications JXTA Services JXTA Applications JXTA Services JXTA Core Peer Groups Peer Pipes Peer Monitoring Peer Advertisements Security Any Connected Device Peer IDs SearchIndexingDiscoverMembership Instant Messaging File Sharing Resource Sharing Collaborative Apps Auctions

13 2-1 JXTA Shell

14 2-1 What is the JXTA Shell? ● Interactive environment for the JXTA platform – Modeled after UNIX Shell – Executes within a network ● Basic commands – Discover peers/peergroups, join and leave peergroups, create pipes, and send messages ● Environment variables – Can bind symbolic names to JXTA objects

15 2-1 JXTA Shell

16 2-1 Starting the JXTA Shell ● Windows – Select Programs -> JXTA -> JXTA Shell from the Start Menu ● Other platforms demo% cd /files/JXTA_Demo/Shell demo% sh shell.sh ● JXTA Configuration Tool – Need to enter peer name and username/password

17 2-1 Shell Commands ● Getting help JXTA> man ● Verify rendezvous peer connection JXTA> rdvstatus ● Access Shell history JXTA> history 0 man 1 rdvstatus – Use up, down arrows to access commands – Use ! to access specific command General Information

18 2-1 Shell Commands ● Display information about current peer JXTA> whoami my Shell urn:jxta:uuid- 59616261646162614A78746150325033EFF0C0B7CD394BD1B91 99E340B4A9E7A03 tcp://192.168.1.102:9701/... Current Peer Information

19 2-1 Peers

20 2-1 Peers ● Any networked device that implements one or more JXTA protocols – PC, server, PDA, cell phone, etc. ● Operate independently, asynchronously ● Spontaneously discover each other on the network – Transient relationships – Persistent relationships (peergroups)

21 2-1 JXTA Network Uniform Addressing ● A Peer is identified by: – A unique Peer ID (UUID) – Example Peer ID: urn:jxta:uuid-59616261646162614A78746150325033EFF0 C0B7CD394BD1B9199E340B4A9E7A03 ● Unique Peer IDs – Enable peers to be addressed independently of their physical location (firewalls and NATs) in the network

22 2-1 Anatomy of a JXTA ID URI JXTA Namespace UUID Format ID Value – urn:jxta:uuid-5961626161503...F825503

23 2-1 Peer Endpoints ● Network interface(s) published by peer ● Example: – TCP/IP (tcp://129.127.29.65:9700) – HTTP (http://JxtaHttpClientuuid-….) ● Used to establish point-to-point connections between two peers ● Direct connection not required – Intermediary peers can route messages

24 2-1 JXTA Peer Types ● Micro peers ● Standard peers ● Super peers – Rendezvous peer – Relay peer – Proxy peer

25 2-1 Shell Commands ● Display a list of all peers JXTA> peers peer0: name = my Shell peer1: name = JXTA.ORG 237... ● Display peer IDs JXTA> peers -l peer0: ID = uuid- 59616261646162614A78746150325033ED194F913EA14 144810D91475606A91203 name = myShell Peers

26 2-1 Shell Commands ● Initiate discovery of other peers JXTA> peers -r peer discovery message sent ● Flush all cached peers JXTA> peers -f Peer Discovery

27 2-1 Relay Peers ● Special peers used to route messages for other peers within the physical network – Support multi-hops message transfers – JXTA messages contain self-routing information – Relay peers maintain dynamic route information – Cache messages to temporarily unavailable, or non-reachable peers ● Any peer can become a Relay peer ● Primarily used for traversing firewalls and NATs ● Enable dynamic route discovery

28 2-1 Relay Peers ● Located outside firewalls and NATs ● Provide fast network connectivity Peer PeerID Relay Peer Firewall NAT TCP/IP Physical Network HTTP

29 2-1 Message Routing via Relay Peers Firewall Peer Super Peer Send Message Receive Message Request Message A B

30 2-1 Message Routing Via Relay Peers Multiple Relay Peers Firewall Peer Super Peer Send Message Receive Message Request Message A B Super Peer Relay Message

31 2-1 Rendezvous Peers ● Rendezvous organize themselves into a “semi-consistent” network ● Rendezvous maintain index of edge peers advertisements ● Queries only propagated within Rendezvous tree structure using different walkers (DHT, multicast, sequential walk) ● Each service in a peergroup may use its own Rendezvous tree for scoping purpose

32 2-1 Request Propagation via Rendezvous Network JXTA Peer (uses R1) JXTA Peer (uses R1) JXTA Peer JXTA Rendezvous JXTA Peer (uses R2) JXTA Peer JXTA Rendezvous (knows R2 and R3) Additional rendezvous peers and other peers JXTA Peer JXTA Rendezvous Internet A B C R1 R2 R3

33 2-1 Shell Commands ● Display rendezvous status JXTA> rdvstatus Rendezvous Connection Status: _____________________________ Is Rendezvous : [false] Rendezvous Connections : Rendezvous name: ensd_1 Rendezvous name: dI_lab1 Rendezvous name: JXTA.ORG 235 Rendezvous Disconnections : [None] Rendezvous Status

34 2-1 Peergroups

35 2-1 Peergroups Virtual Mapping Physical Network JXTA Virtual Network Peer

36 2-1 Peergroups ● Defined by users without requiring network administrators ● Identified by a unique “PeerGroup ID” ● Enable self-organization of peers (dynamic) ● Associate a set of services: PeerGroup services ● Configurable membership policy

37 2-1 Why Peergroups? ● Create secure and protected domains ● Scope peer operations – Discovery, search, communications ● Provide a “group” identity – Group peers sharing a common interest ● Enable monitoring

38 2-1 JXTA Peer JXTA Public Relay/Rendezvous Internet NetPeerGroup Public PeerGroup Private PeerGroup PrivatePeerGroup Peergroup Scoping JXTA Peer Firewall

39 2-1 PrivatePeerGroup Private Peergroups JXTA Peer JXTA Public Relay/Rendezvous Internet JXTA Peer Firewall Private PeerGroup NetPeerGroup

40 2-1 Public and Private Peergroups PrivatePeerGroup JXTA Peer JXTA Public Relay/Rendezvous Internet JXTA Peer Firewall Private PeerGroup NetPeerGroup JXTA Peer Firewall JXTA Private Relay/Rendezvous PrivatePeerGroup Public PeerGroup

41 2-1 Shell Commands ● Initiate discovery JXTA> groups -r group discovery message sent ● Display peergroups JXTA> groups group0: mygroup group1: some_other_group... ● Create a peergroup JXTA> mygroupadv = mkadv -g mygroup JXTA> mkpgrp -d mygroupadv Discovering & Creating Peergroups

42 2-1 Shell Commands ● Joining a new peergroup JXTA> mkpgrp mygroup JXTA> join mygroup ● Changing peergroup context JXTA> chpgrp some_other_group group0: mygroup group1: some_other_group... ● Leaving current groups JXTA> leave Joining Peergroups

43 2-1 Advertisements

44 2-1 Advertisements ● Every resource in the JXTA network is represented by an advertisement – Peer advertisement – PeerGroup advertisement – Pipe advertisement – Endpoint advertisement – Module advertisement – Content advertisement – PeerInfo advertisement

45 2-1 Advertisements are XML Documents PeerGroup Advertisement: urn:jxta: uuid-ABCBCDEABDBBBABEABBBABA0000001234563 urn:jxta:uuid-DEFDBFEFDEDFBABAFRUDBACE000000010206 My Group This group is to be used for my own testing

46 2-1 Peer Advertisement urn:jxta:uuid-59616261646162614A78746150325033 958A35814213467EBC6C88D3C138B43903 urn:jxta:jxta-NetGroup bill http://192.18.190.196:9700 tcp://192.18.190.196:9701

47 2-1 Advertisement Caching ● Peers cache advertisements (not required) ● Peers publish and discover advertisements ● Each advertisement is published with a time-to-live: – Relative expiration date – Advertisements are removed from the system when they have expired – Advertisements can be re-published

48 2-1 Resolver ● All traditional “binding” operations in the JXTA network are implemented as a search for an advertisement ● Examples: – DNS (searching for Peer or PeerGroup advertisements) – Service Location (searching for Module advertisements) – Directory Service (searching for Peer advertisements) – Socket Binding (searching for Pipe advertisements) – File systems (searching for Content advertisements) => No Centralization Required !! Universal Binding Mechanism

49 2-1 Advertisement Discovery & Searching ● Local Neighbor Discovery – TCP/IP multicast (subnet scope) ● Rendezvous Peers – Peers which have agreed to cache a large number of advertisements – Every peer may become a rendezvous peer – Discovery requests are forwarded between rendezvous peers – Each peer group has its own set of rendezvous ● Invitation – JXTA Business card (Peer/PeerGroup Advertisement) ● Distributed Indexes – Shared Resource Distributed Index (SRDI)

50 2-1 Shell Commands ● Make a peergroup advertisement – JXTA> grpadv = mkadv -g newgroup JXTA> env grpadv = PeerGroup Advertisement (class net.jxta.impl.protocol.PeerGroupAdv)... ● Display an advertisement JXTA> cat grpadv urn:jxta:uuid-20810AEF6C2F4711844 DA8C4AE75D32502... Make Advertisements

51 2-1 Shell Commands ● Make an advertisement available to other peers JXTA> share grpadv Publish Advertisements

52 2-1 Shell Commands ● Search for an advertisement – JXTA> search -r JXTA Advertisement search message sent ● Search for a specific advertisement JXTA> search -aName -vChat* JXTA Advertisement adv0 (Search criteria: Attribute="Name" Value="Chat*") JXTA>cat adv0... ChatService... Search for Advertisements

53 2-1 Pipes and Messages

54 2-1 JXTA Pipes ● Non-localized communication channel between two or more peers – Asynchronous and unreliable – Unique “Pipe ID” – Pipe Advertisement – “Data-Typed” stream (XML schemas) – Input and output pipe endpoint (channel access point) – Dynamic peer binding Virtual Communication Channel

55 2-1 Pipe Communication Abstraction Layer Input Pipe Service A JXTA Virtual Network PeerGroup Pipe Pipe Endpoint Physical Network Pipe Binding Peer HTTP Peer NAT Peer PeerID Service A Service C Output Pipe

56 2-1 Pipe Types ● Point-to-Point Pipe – Connects exactly two peer endpoints together ● Propagate Pipe – Connects one output pipe to multiple input pipes Additional pipe types (e.g., secure, streaming, reliable) can be created from the core types. A B A B C D Send Receive Send Receive E Input Pipe Output Pipe

57 2-1 Pipe Communication Model ● Connect services independently of their peer locations ● Dynamic binding (at pipe creation or for every message sent) ● Asynchronous (connect & disconnect mode) ● Build highly-available services (transparent fail-over by reconnecting pipe endpoints) ● Pipeline multiple services to form complex service

58 2-1 Messages ● Object sent between JXTA peers – Message = basic unit of data exchange ● Ordered sequence of named/typed contents called Elements ● Each message contains its own routing information ● XML and binary representations used

59 2-1 Shell Commands ● Create pipe advertisement JXTA> myPipeAdv = mkadv -p ● Create input and output pipes JXTA> myInPipe = mkpipe -i myPipeAdv JXTA> myOutPipe = mkpipe -o myPipeAdv Pipe Commands

60 2-1 Shell Commands ● Create a file (myFile) containing message data – a set of arbitrary XML tags Hello, JXTA ● Import into the JXTA Shell JXTA> importfile -f myFile myData ● Create a message JXTA> myMsg = mkmsg JXTA> put myMsg myTag myData Message Commands

61 2-1 Shell Commands ● Send a message JXTA> send myOutPipe myMsg ● Receive a message JXTA> newMsg = recv myInPipe recv has received a message ● Extract and display the message JXTA> newData = get newMsg myTag JXTA> cat newData Hello, JXTA Message Commands (continued)

62 2-1 Modules and Services

63 2-1 Services ● Set of functions that a provider offers ● Provider peer publishes service advertisement ● Pipes used to communicate with service ● Types of services – Peer Services – Peer Group Services (discovery, membership, etc.)

64 2-1 JXTA “Core” Peergroup Services ● Services to support a peergroup – Discovery Service – PeerInfo Service – Pipe Service – Resolver Service – Membership Service – Rendezvous Service – Endpoint Service

65 2-1 JXTA Modules ● JXTA Heterogeneous network of peers needs a platform-independent service representation: – Module = platform-independent representation of a service – Service agnostic (WSDL, SOAP, RMI, ORB, etc) – Viral effect (joining a group -> instantiating new services)

66 2-1 Module Advertisements ● Module Class – Advertise the existence of a service ● Module Specification – Advertise how to access a service (API, messages) ● Module Implementation – Advertise a platform-specific implementation

67 2-1 Security ● Every peer has its own root certificate ● Public key certificate part of each Peer advertisement ● TLS Endpoint Transport (point-to-point secure pipe) ● Credential certificate embedded in every JXTA protocol messages ● Private Groups (membership policy)

68 2-1 Monitoring and Metering ● Provide generic framework to collect peer monitoring and metering information – Collect network traffic information – Service queue statistics – Accounting and billing ● Show peer info statistics JXTA> peerinfo -l ● Show metering JXTA> monitor

69 2-1 JXTA Concepts ● JXTA virtual network ● JXTA software architecture ● JXTA objects – Peers – Peergroups – Advertisements – Pipes and messages – Services ● Security ● Monitoring and metering Review

70 2-1 End – JXTA Concepts


Download ppt "2-1 JXTA Concepts. 2-1 Learning Objectives ● This module will help you... – Understand P2P principles – Learn about JXTA virtual network core building."

Similar presentations


Ads by Google