Transcript 投影片 1

JXTA Protocol
Introduction
Student : Jia-Hui Huang
Adviser : Kai-Wei Ke
Date : 2005/11/22
Outline
P2P Introduction
JXTA Introduction
JXTA Assumptions
JXTA Concept
JXTA Protocols
JXTA Connection Scenario
Demo
Summary
P2P Introduction (1/2)
The term “ Peer-to-Peer ” refers to a class of
system/networks that :


Distributed resources
Perform function in a decentralized manner
Each node potentially has the same
responsibility & capability.
Sharing can be in many ways :


CPU Cycle : share workload
Storage space : Napster, Gnutella, Freenet … etc
P2P Introduction (2/2)
Why attractive ?


Scalability
Reliability
Client – Server
Ex. FTP
Peer-to-Peer
Ex. Bit Torrent
Outline
P2P Introduction
JXTA Introduction
JXTA Assumptions
JXTA Concept
JXTA Protocols
JXTA Connection Scenario
Demo
Summary
JXTA Introduction(1/3)
What is JXTA Protocol ?




Developed by Sun Microsystems, Inc. 2001 v 1.0
Provide the basic P2P infrastructure
Each resource are published as advertisement
Some characteristic of JXTA network
Discover each other
Self-organize into peer group
Advertise and discover network resource
Communicate with each other
Monitor each other
JXTA Introduction(2/3)
JXTA Protocol are composed six Protocols
the following six protocol cooperate with other, and form JXTA
protocol






Peer Resolver Protocol ( PRP )
Peer Discovery Protocol ( PDP )
Peer Information Protocol ( PIP )
Pipe Binding Protocol ( PBP )
Endpoint Routing Protocol ( ERP )
Rendezvous Protocol ( RVP )
JXTA Introduction(3/3)
Not all protocol are necessary

JXTA core Protocol – required
PRP
ERP

JXTA standard protocol – not required
Remaining JXTA Protocols ( PDP …etc )
More standard protocol increase
interoperability
Outline
P2P Introduction
JXTA Introduction
JXTA Assumptions
JXTA Concept
JXTA Protocols
JXTA Connection Scenario
Demo
Summary
JXTA Assumptions (1/2)
Peer not assume run time environments
and programming languages
Peers may appear, disappear and migrate
at any time
Communication between two peers is unidirectional at same time
Data delivery is unreliable
Protocol messages and advertisements
are defined using XML messages
JXTA Assumptions (2/2)
Message is give up delivery if destination
is not available
Each peer must be a member of the Net
PeerGroups
Peers must be members of the same peer
group in order to exchange messages
The published content is not guarantee
can be received from JXTA network
Outline
P2P Introduction
JXTA Introduction
JXTA Assumptions
JXTA Concept
JXTA Protocols
JXTA Connection Scenario
Demo
Summary
JXTA Concept (1/7)
Peers




Any network device that implement JXTA Core Protocol
Identify by a unique ID
Distribute resources and services using advertisement
mechanism
May advertisement multiple network interface - endpoint
PeerGroups



A common set of peer self-organized into a peer
group
Identify by a unique PeerGroup ID
Peer group provide a set of service
JXTA Concept (2/7)
Discovery service

Used by member to discovery resources ( pipe ….etc )
Membership service

Used by member to accept of reject new peer join
request
Access service

Used to validate requests made by one peer to another
Pipe service

Manage and create pipe between different group
members
Monitoring service

Allow peer monitor each other in same group
JXTA Concept (3/7)
Two level of network service

Peer service
Accessible only one the peer that is publishing the service

Peer group service
Running on multiple members of the peer group
pipes


A virtual communication channel for peer exchange
message, many type of pipe can establish
Two mode of pipe transfer
Point to Point Pipe
Propagate Pipe
JXTA Concept (4/7)
IDs


Each JXTA resource has a unique ID to
identify an entity
These resource include Peers, PeerGroups,
content, pipes, module classes/spec.
codats

Combination of content and its associated
JXTA ID
JXTA Concept (5/7)
Module

Module indicates the “service” provided by
peer or PeerGroup
Module class

Define the service type, have a unique id
Module specification

Define the service specification, have a
unique id
JXTA Concept (6/7)
All resource on the JXTA network are
publish as advertisement
Peer advertisement

Describe a peer ID, name and other resource
Peer group advertisement

Describe a peer group specific resource
Module class advertisement

Describe a particular module class id stand
for what type service
JXTA Concept (7/7)
Module specification advertisement

Describe what particular module spec. ID
stand for which spec.
Module implementation advertisement

Describe one of implementation of a specific
spec. it also provide necessary parameter of
use this implementation
Outline
P2P Introduction
JXTA Introduction
JXTA Assumptions
JXTA Concept
JXTA Protocols
JXTA Connection Scenario
Demo
Summary
JXTA Protocols
Two types of JXTA Protocol


JXTA Core Protocol – required
JXTA Standard Protocol – optional
JXTA Core Protocol
Protocol is a set of message format (XML)
that exchange between peers
JXTA Core Specification define:


Peer Resolver Protocol
Endpoint Routing Protocol
Peer resolver protocol (PRP)
Provide a resolution service, used to send
query and receive response
Each query and response is addressed
with a handler
Handler is a demultiplexing key that
specifies how, by which higher-level
protocol to be processed
Endpoint routing protocol (ERP)(1/3)
ERP is used for routing
When a peer wants to issue a message, it
process is as follows:



Peer lookup his local cache
If exist route information then directly use
If no exist route information then find available
peer router for asking (send route resolver
query message)
Endpoint routing protocol (ERP)(2/3)
When peer router receive a route query



If it know route information it will return as an
enumeration of hop
If it don’t know then peer will asking other peer router
until no peer router
Finally, if no peer router knows then give up routing
this message
note:routing information may obsolete at any hop
Shared Resource Distributed Index (SRDI)

Utilize the set of rendezvous peer as resource index
to help message direction
Endpoint routing protocol (ERP)(3/3)
At each hop the peer will extra a peer id
information in the message header use for


Loop detect
New route discovery
Message is a basic unit of data exchange
and the process is like packet in protocol
stack
JXTA Standard Protocols
Rendezvous Protocol (RVP)
Peer Discovery Protocol (PDP)
Peer Information Protocol (PIP)
Pipe Binding Protocol (PBP)
Rendezvous protocol (RVP) (1/3)
RVP is used to propagate message within a peer group
A peergroup may contains more than one rendezvous
peer.
The set of rendezvous peer perform a peer view

The PeerView is a list of the peers which are currently acting as
Rendezvous Peers.
The RVP can divided into three parts

Management protocol (peer view protocol)
An optional protocol used by Rendezvous Peers to organize
themselves
Each Rendezvous Peer maintains its own local list of active
PeerView members
Rendezvous Peer exchange message with each other
Rendezvous protocol (RVP)(2/3)

Connection registration protocol (rendezvous
lease protocol)
An optional protocol enables non-Rendezvous
Peers to subscribe to receive propagated
messages. ( act as a rendezvous peer )
Leases are of fixed duration.
Rendezvous Peers offer lease its ability to
distribute message.
Both rendezvous peer and subscriber can
terminate the lease at any time.
Rendezvous protocol (RVP) (3/3)

Propagated message (rendezvous
propagation protocol)
A required protocol, enable peers to manage the
propagation of individual message.
Propagation stop condition:


Loop/Duplicate ( detected by unique id )
TTL
Rendezvous advertisement is used for
describe a peer become a rendezvous
peer
Peer discovery protocol (PDP) (1/2)
PDP is used to discover resource within a
group
Discovery peers behavior
Use the field attribute and threshold to
match query
PDP message is not guarantee response
Peer discovery protocol (PDP)(2/2)
Five Scenario of discovery





Local Cache
Local Discovery
Using Rendezvous Peer w/o Propagation
Using Rendezvous Peer over Firewall
Using Rendezvous Peer and Propagation
Peer information protocol (PIP)
An optional protocol, Used to obtain a peer
status information.
No guarantee response.
Information include :


Timestamp
Traffic
LastInCommingMessageAt
LastOutgoingAt … etc


SourcePid
TargetPid … etc
Pipe binding protocol (PBP)
PBP is used to create a pipe between two
peer (virtual communication channel)
The underlying transport can use JXTA
HTTP, JXTA TCP/IP or secure JXTA TLS
Transport
The pipe can viewed as a message queue
that support create, bind, close, delete,
send, and receive operation
Pipe advertisement
Used to describe a local binded pipe information
Each advertisement has a pipe type field
Currently three type has defined

JXTAUnicast
Unicast, unsecure, unreliable pipe.

JXTAUnicastSecure
Unicast, secure ( using TLS ) pipe.

JXTAPropagate Diffusion pipes
Diffusion pipes, used to send one-to-many messages.
Outline
P2P Introduction
JXTA Introduction
JXTA Assumptions
JXTA Concept
JXTA Protocols
JXTA Connection Scenario
Demo
Summary
JXTA message transports
Three Scenario of message transports



Communication across Firewall (outside to
inside)
Message to Peer across one Firewall (inside
to outside )
Message to Peer across two Firewalls
Outline
P2P Introduction
JXTA Introduction
JXTA Assumptions
JXTA Concept
JXTA Protocols
JXTA Connection Scenario
Demo
Summary
Demo
Messaging

P2PAVConference
File sharing

Peer1

Peer2
Outline
P2P Introduction
JXTA Introduction
JXTA Assumptions
JXTA Concept
JXTA Protocols
JXTA Connection Scenario
Demo
Summary
Summary
Project JXTA establish a virtual network overlay
on top of existing networks.
JXTA provide a P2P systems, it achieve :



Interoperability
Platform independence
Ubiquity
It allow application developers build P2P
application without take underlying network into
account.
P2P system become more easy to develop.
Reference
Sun Microsystems Inc. “ JXTA v2.0 Protocols
Specification ”, 2004
Li Gong Sun Microsystems, Inc “ Project JXTA :
A Technology Overview ”, October 29 2002
Bernard Traversat, Ahkil Arora, Mohamed
Abdelaziz, Mike Duigou, Carl Haywood, JeanChristophe Hugly, Eric Pouyoul, Bill Yeager,
“ Project JXTA 2.0 Super-Peer Virtual Network ”,
May 25 2003
www.jxta.org
Discovery Scenario (1/5)
lookup
communicate
Discovery Scenario (2/5)
multicast
response
Discovery Scenario (3/5)
Response message
Discovery message
Discovery Scenario (4/5)
response
discovery
cache
Discovery Scenario (5/5)
Connection Scenario (1/3)
Msg queue
By Propagate message
HTTP connection
Connection Scenario (2/3)
Regular connection
Connection Scenario (3/3)
message
HTTP
HTTP