JXTA%20Concepts - PowerPoint PPT Presentation

About This Presentation
Title:

JXTA%20Concepts

Description:

Build complex behaviors by ... Discover and adapt to new information sources ... tree structure using different walkers (DHT, multicast, sequential walk) ... – PowerPoint PPT presentation

Number of Views:233
Avg rating:3.0/5.0
Slides: 71
Provided by: scsCar
Category:

less

Transcript and Presenter's Notes

Title: JXTA%20Concepts


1
JXTA Concepts
2
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
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
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
Protocols Drive Distributed Computing
TCP/IP
HTTP
JXTA
Client-Server
Web-based
Peer-to-Peer
6
What is JXTA?
  • An open set of XML-based protocols for creating
    peer-to-peer style network computing applications
    and services
  • Protocol based --gt language, OS, network, and
    service agnostic technology
  • A virtual network overlay
  • Defines mechanisms, not policies
  • Open Source project www.jxta.org

7
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
JXTA Protocol Stack
Standard Services Protocols (Optional)
Peer DiscoveryProtocol
Pipe BindingProtocol
Peer InfoProtocol
Peer RendezvousProtocol
Peer Resolver Protocol
Core Protocols (Required)
Peer Endpoint Protocol
9
JXTA Virtual Network
JXTA Virtual Network
Peer
Peer
Peer
Peer
Peer
Peer
Peer
Peer
Virtual Mapping
TCP/IP

Physical Network

Firewall
NAT
HTTP
10
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
JXTA Virtual Network
Building Blocks
  • 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

12
JXTA Software Architecture
Sample Applications
JXTA Applications
Instant Messaging
File Sharing
Resource Sharing
Collaborative Apps
Auctions
JXTA Services
JXTA Services
Search
Indexing
Discover
Membership
JXTA Core
Peer Groups
Peer Pipes
Peer Monitoring
Peer Advertisements
Security
Peer IDs
Any Connected Device
13
  • JXTA Shell

14
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
JXTA Shell
16
Starting the JXTA Shell
  • Windows
  • Select Programs -gt JXTA -gt 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
Shell Commands
General Information
  • Getting help
  • JXTAgt man
  • Verify rendezvous peer connection
  • JXTAgt rdvstatus
  • Access Shell history
  • JXTAgt history0 man1 rdvstatus
  • Use up, down arrows to access commands
  • Use !ltnumbergt to access specific command

18
Shell Commands
Current Peer Information
  • Display information about current peer
  • JXTAgt whoamiltPeergtmy Shelllt/PeergtltPeerIdgturnjxt
    auuid-59616261646162614A78746150325033EFF0C0B7CD3
    94BD1B9199E340B4A9E7A03lt/PeerIdgtltTransportAddress
    gttcp//192.168.1.1029701/lt/TransportAddressgt...

19
  • Peers

20
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
JXTA Network Uniform Addressing
  • A Peer is identified by
  • A unique Peer ID (UUID)
  • Example Peer ID urnjxtauuid-59616261646162614A
    78746150325033EFF0 C0B7CD394BD1B9199E340B4A9E7A03
  • Unique Peer IDs
  • Enable peers to be addressed independently of
    their physical location (firewalls and NATs) in
    the network

22
Anatomy of a JXTA ID
URI
UUID Format
  • urnjxtauuid-5961626161503...F825503

JXTA Namespace
ID Value
23
Peer Endpoints
  • Network interface(s) published by peer
  • Example
  • TCP/IP (tcp//129.127.29.659700)
  • HTTP (http//JxtaHttpClientuuid-.)
  • Used to establish point-to-point connections
    between two peers
  • Direct connection not required
  • Intermediary peers can route messages

24
JXTA Peer Types
  • Micro peers
  • Standard peers
  • Super peers
  • Rendezvous peer
  • Relay peer
  • Proxy peer

25
Shell Commands
Peers
  • Display a list of all peers
  • JXTAgt peerspeer0 name my Shellpeer1 name
    JXTA.ORG 237...
  • Display peer IDs
  • JXTAgt peers -lpeer0 ID uuid-59616261646162614A
    78746150325033ED194F913EA14144810D91475606A91203
    name myShell

26
Shell Commands
Peer Discovery
  • Initiate discovery of other peers
  • JXTAgt peers -rpeer discovery message sent
  • Flush all cached peers
  • JXTAgt peers -f

27
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
Relay Peers
  • Located outside firewalls and NATs
  • Provide fast network connectivity

PeerID
PeerID
Relay Peer
PeerID
PeerID
PeerID
PeerID
Relay Peer
TCP/IP
Peer
Peer
Peer
Peer
Peer
NAT
Firewall
Peer
Peer
Peer
HTTP
Physical Network
29
Message Routing via Relay Peers
Firewall
Firewall
Request Message
A
B
Super Peer
Peer
Peer
Peer
Send Message
Receive Message
30
Message Routing Via Relay Peers
Multiple Relay Peers
Firewall
Firewall
Request Message
B
A
Super Peer
Peer
Peer
Peer
Receive Message
Relay Message
Send Message
Super Peer
31
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
Request Propagation via Rendezvous Network
Additionalrendezvouspeers andother peers
Internet
JXTA Peer JXTA Rendezvous
JXTA Peer (uses R2)
C
JXTA Peer (uses R1)
JXTA Peer JXTA Rendezvous(knows R2 and R3)
A
Additionalrendezvouspeers andother peers
JXTA Peer (uses R1)
JXTA Peer JXTA Rendezvous
B
33
Shell Commands
Rendezvous Status
  • Display rendezvous status
  • JXTAgt rdvstatusRendezvous Connection
    Status_____________________________Is
    Rendezvous falseRendezvous Connections
  • Rendezvous name ensd_1 Rendezvous name
    dI_lab1 Rendezvous name JXTA.ORG
    235Rendezvous Disconnections None

34
  • Peergroups

35
Peergroups
JXTA Virtual Network
Peer
Peer
Peer
Peer
Peer
Peer
Peer
Peer
Virtual Mapping

Physical Network

36
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
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
Peergroup Scoping
Internet
Firewall
Private PeerGroup
Private PeerGroup
JXTA Peer
JXTA Peer
Public PeerGroup
JXTA Peer
NetPeerGroup
39
Private Peergroups
Firewall
Internet
Private PeerGroup
JXTA Peer
JXTA Peer
JXTA Peer
Private PeerGroup
NetPeerGroup
40
Public and Private Peergroups
Public PeerGroup
Firewall
Internet
Firewall
Private PeerGroup
Private PeerGroup
JXTA Peer
JXTA Peer
JXTA Peer
Private PeerGroup
Private PeerGroup
NetPeerGroup
JXTA Peer
JXTA Peer
41
Shell Commands
Discovering Creating Peergroups
  • Initiate discovery
  • JXTAgt groups -rgroup discovery message sent
  • Display peergroups
  • JXTAgt groupsgroup0 mygroupgroup1
    some_other_group...
  • Create a peergroup
  • JXTAgt mygroupadv mkadv -g mygroupJXTAgt mkpgrp
    -d mygroupadv

42
Shell Commands
Joining Peergroups
  • Joining a new peergroup
  • JXTAgt mkpgrp mygroup
  • JXTAgt join mygroup
  • Changing peergroup context
  • JXTAgt chpgrp some_other_group
  • group0 mygroupgroup1 some_other_group...
  • Leaving current groups
  • JXTAgt leave

43
  • Advertisements

44
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
Advertisements are XML Documents
PeerGroup Advertisement lt?xml
version"1.0"?gt lt!DOCTYPE jxtaPGAgt ltjxtaPGAgt ltG
IDgt urnjxta uuid-ABCBCDEABDBBBABEABBBABA000
0001234563 lt/GIDgt ltMSIDgt
urnjxtauuid-DEFDBFEFDEDFBABAFRUDBACE000000010206
lt/MSIDgt ltNamegt My Group lt/Namegt ltDescgt
This group is to be used for my own
testing lt/Descgt lt/jxtaPGAgt
46
Peer Advertisement
lt?xml version"1.0"?gt lt!DOCTYPE jxtaPAgtltjxtaPA
xmlnsjxta"http//jxta.org"gt ltPIDgt urnjxtauu
id-59616261646162614A78746150325033 958A35814213
467EBC6C88D3C138B43903 lt/PIDgt ltGIDgt urnjxtaj
xta-NetGroup lt/GIDgt ltNamegt bill lt/Namegt ltSvc
gt ltParmgt ltjxtaRA xmlnsjxta"http//jxta.org
gt ltjxtaAPA xmlnsjxta"http//jxt
a.org"gt ltEAgt
http//192.18.190.1969700 lt/EAgt
ltEAgt
tcp//192.18.190.1969701 lt/EAgt
lt/jxtaAPAgt lt/Dstgt
lt/jxtaRAgt lt/Parmgt lt/Svcgtlt/jxtaPAgt
47
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
Resolver
Universal Binding Mechanism
  • 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)
  • gt No Centralization Required !!

49
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
Shell Commands
Make Advertisements
  • Make a peergroup advertisement
  • JXTAgt grpadv mkadv -g newgroupJXTAgt envgrpadv
    PeerGroup Advertisement (class
    net.jxta.impl.protocol.PeerGroupAdv)...
  • Display an advertisement
  • JXTAgt cat grpadvlt?xml version"1.0"?gtlt!DOCTYPE
    jxtaPGAgtltjxtaPGA xmlnsjxta"http//jxta.org"gt
    ltGIDgt urnjxtauuid-20810AEF6C2F4711844 DA8C4
    AE75D32502 lt/GIDgt...

51
Shell Commands
Publish Advertisements
  • Make an advertisement available to other peers
  • JXTAgt share grpadv

52
Shell Commands
Search for Advertisements
  • Search for an advertisement
  • JXTAgt search -rJXTA Advertisement search message
    sent
  • Search for a specific advertisement
  • JXTAgt search -aName -vChatJXTA Advertisement
    adv0 (Search criteria Attribute"Name"
    Value"Chat")JXTAgtcat adv0lt?xml
    version"1.0"?gtlt!DOCTYPE jxtaMCAgtltjxtaMCA
    xmlnsjxta"http//jxta.org"gt ... ltNamegt ChatS
    ervice lt/Namegt
  • ...

53
  • Pipes and Messages

54
JXTA Pipes
Virtual Communication Channel
  • 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

55
Pipe Communication Abstraction Layer
Input Pipe
ServiceA
ServiceA
Output Pipe
Pipe
Output Pipe
ServiceC
Input Pipe

PipeEndpoint
PeerGroup
Pipe Binding
PeerID
PeerID
PeerID
PeerID
PeerID
PeerID
PeerID
PeerID
JXTA Virtual Network
Physical Network
Peer
Peer
Peer
Peer
Peer
Peer
Peer
Peer
NAT
HTTP
56
Pipe Types
Input Pipe
Output Pipe
  • Point-to-Point Pipe
  • Connects exactly two peer endpoints together
  • Propagate Pipe
  • Connects one output pipe to multiple input pipes

Receive
A
B
Send
Receive
B
Receive
Receive
A
C
E
Send
Receive
D
Additional pipe types (e.g., secure, streaming,
reliable) can be created from the core types.
57
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
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
Shell Commands
Pipe Commands
  • Create pipe advertisement
  • JXTAgt myPipeAdv mkadv -p
  • Create input and output pipes
  • JXTAgt myInPipe mkpipe -i myPipeAdvJXTAgt
    myOutPipe mkpipe -o myPipeAdv

60
Shell Commands
Message Commands
  • Create a file (myFile) containing message data
    a set of arbitrary XML tags
  • ltDatagt Hello, JXTAlt/Datagt
  • Import into the JXTA Shell
  • JXTAgt importfile -f myFile myData
  • Create a message
  • JXTAgt myMsg mkmsgJXTAgt put myMsg myTag myData

61
Shell Commands
Message Commands (continued)
  • Send a message
  • JXTAgt send myOutPipe myMsg
  • Receive a message
  • JXTAgt newMsg recv myInPiperecv has received a
    message
  • Extract and display the message
  • JXTAgt newData get newMsg myTagJXTAgt cat
    newDatalt?xml version1.0?gtltShellDocgt ltItemgt
    ltDatagtHello, JXTAlt/Datagt lt/Itemgtlt/ShellDocgt

62
  • Modules and Services

63
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
JXTA Core Peergroup Services
  • Services to support a peergroup
  • Discovery Service
  • PeerInfo Service
  • Pipe Service
  • Resolver Service
  • Membership Service
  • Rendezvous Service
  • Endpoint Service

65
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 -gt instantiating
    new services)

66
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
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
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
  • JXTAgt peerinfo -l
  • Show metering
  • JXTAgt monitor

69
JXTA Concepts
Review
  • JXTA virtual network
  • JXTA software architecture
  • JXTA objects
  • Peers
  • Peergroups
  • Advertisements
  • Pipes and messages
  • Services
  • Security
  • Monitoring and metering

70
End JXTA Concepts
Write a Comment
User Comments (0)
About PowerShow.com