240-322 Cli/Serv.: JXTA/15 1
Client/Server Distributed SystemsClient/Server Distributed Systems
ObjectiveObjective– explain JXTA, a support environment for explain JXTA, a support environment for
P2P services and applicationsP2P services and applications
240-322, Semester 1, 2005-2006
15. JXTA (Juxtapose)
240-322 Cli/Serv.: JXTA/15 2
ContentsContents
1.1. Principle AimsPrinciple Aims
2.2. JXTA Main ComponentsJXTA Main Components
3.3. JXTA ConceptsJXTA Concepts
4.4. Example Services and Apps.Example Services and Apps.
5.5. JXTA Compared to JiniJXTA Compared to Jini
6.6. More InformationMore Information
240-322 Cli/Serv.: JXTA/15 3
1. Principle Aims1. Principle Aims
JXTA provides core functionality so that deJXTA provides core functionality so that developers can build P2Pvelopers can build P2P services and applicaservices and applications.tions.
JXTA can be implemented with any prograJXTA can be implemented with any programming language and run on any softwaremming language and run on any software aand hardware platform/device.nd hardware platform/device.
continued
240-322 Cli/Serv.: JXTA/15 4
It can be implemented on top of TCP/IP, HTIt can be implemented on top of TCP/IP, HTTP, Bluetooth, and many other protocols.TP, Bluetooth, and many other protocols.
Currently requires a platform that supports thCurrently requires a platform that supports the JRE or JDK 1.3.1 or later.e JRE or JDK 1.3.1 or later.
Available on Windows, Solaris, Linux, and Available on Windows, Solaris, Linux, and Macintosh.Macintosh.
240-322 Cli/Serv.: JXTA/15 5
2. JXTA2. JXTA Main Components Main Components
JXTA supports a three layer view of P2P deJXTA supports a three layer view of P2P development:velopment:
– a core layera core layer
– a middle services layera middle services layer
– an application layeran application layer
240-322 Cli/Serv.: JXTA/15 6
DiagramDiagram
240-322 Cli/Serv.: JXTA/15 7
2.1. The Core Layer2.1. The Core Layer
The core layer includes protocols and buildiThe core layer includes protocols and building blocks to enable key mechanisms for P2ng blocks to enable key mechanisms for P2P networkingP networking– these include discovery, transport (e.g. firewall these include discovery, transport (e.g. firewall
handling and limited security), and the creation handling and limited security), and the creation of peers and peer groupsof peers and peer groups
– the protocols use XML-encoded messagesthe protocols use XML-encoded messages
240-322 Cli/Serv.: JXTA/15 8
2.2. The Services Layer2.2. The Services Layer
The services layer provides P2P services, toThe services layer provides P2P services, tools, and commands ols, and commands – e.g. searching, sharing and added securitye.g. searching, sharing and added security
– e.g. the JXTA Shell, the JXTA Search e.g. the JXTA Shell, the JXTA Search (see below)(see below)
240-322 Cli/Serv.: JXTA/15 9
2.3. The Application Layer2.3. The Application Layer
The application layer supports the implemeThe application layer supports the implementation of integrated applicationsntation of integrated applications– e.g. file sharing, resource sharing, monetary syse.g. file sharing, resource sharing, monetary sys
tems, distributed storage tems, distributed storage – reimplementations of programs like Gnutella, Nreimplementations of programs like Gnutella, N
apster, Groove, Instantapster, Groove, Instant MessengerMessenger– e.g. InstantP2P (see below)e.g. InstantP2P (see below)
240-322 Cli/Serv.: JXTA/15 10
3. JXTA Concepts3. JXTA Concepts
What is a Peer?What is a Peer? What are Peer Groups?What are Peer Groups? JXTA PipesJXTA Pipes Peer MonitoringPeer Monitoring The Main JXTA ProtocolsThe Main JXTA Protocols
240-322 Cli/Serv.: JXTA/15 11
A JXTA SystemA JXTA System
peer group
monitor
join
leave
ask to join
or query group
dynamicpipes
peer groupcomms.
240-322 Cli/Serv.: JXTA/15 12
3.1. What is a Peer?3.1. What is a Peer?
A peer is any device that runs some/all of the JXA peer is any device that runs some/all of the JXTA protocols.TA protocols.
The peer needs to be connected to some kind of The peer needs to be connected to some kind of network, such as IP, Bluetooth.network, such as IP, Bluetooth.
Peers can be servers, PCs, PDAs, manufacturing Peers can be servers, PCs, PDAs, manufacturing and medical equipment, and medical equipment, cellular phones, etc.cellular phones, etc.
240-322 Cli/Serv.: JXTA/15 13
3.2. What are Peer Groups?3.2. What are Peer Groups?
A peer group is a collection of peers that have aA peer group is a collection of peers that have agreed upon a common set of rules to publish, shgreed upon a common set of rules to publish, share and access their data, and communicate betare and access their data, and communicate between themselves. ween themselves.
Each peer group can establish its own membersEach peer group can establish its own membership policyhip policy– e.g. from open (anybody can join) to highly secure e.g. from open (anybody can join) to highly secure
and protectedand protected
240-322 Cli/Serv.: JXTA/15 14
3.3. JXTA pipes3.3. JXTA pipes
JXTA pipes are inter-peer communication cJXTA pipes are inter-peer communication channelshannels– similar to the UNIX idea of piping the output of similar to the UNIX idea of piping the output of
oneone command to the input of another command to the input of another
Pipes are unidirectional and mayPipes are unidirectional and may be dynamibe dynamically coupled and uncoupled for flexible cocally coupled and uncoupled for flexible connection ofnnection of peers. peers.
continued
240-322 Cli/Serv.: JXTA/15 15
Piped messages are XML documents and so Piped messages are XML documents and so are platform, language, and protocolare platform, language, and protocol indepeindependent.ndent.
The contents of messages can be binary codThe contents of messages can be binary code, data strings, Java technology-based objece, data strings, Java technology-based objects, and/or applets. ts, and/or applets.
240-322 Cli/Serv.: JXTA/15 16
3.4. Peer Monitoring3.4. Peer Monitoring
Peer monitoring is the Peer monitoring is the policemanpoliceman of the of the corecore– handles authentication/authorization, meterhandles authentication/authorization, meter
ing, etc.ing, etc.
240-322 Cli/Serv.: JXTA/15 17
3.5. The Main JXTA Protocols3.5. The Main JXTA Protocols
NetPeerGroup ProtocolNetPeerGroup Protocol Peer/PeerGroup Discovery ProtocolPeer/PeerGroup Discovery Protocol Peer Information and Management ProtocolPeer Information and Management Protocol PeerGroup Membership ProtocolPeerGroup Membership Protocol PeerGroup Resolver ProtocolPeerGroup Resolver Protocol
– send and receive generic queries to find or search for pesend and receive generic queries to find or search for peers,ers, peer groups, pipes, and other information.peer groups, pipes, and other information.
PeerGroup Sharing ProtocolPeerGroup Sharing Protocol
240-322 Cli/Serv.: JXTA/15 18
4. Example Services and Apps.4. Example Services and Apps.
Service examples:Service examples:– JXTA ShellJXTA Shell– JXTA SearchJXTA Search
Application:Application:– InstantP2PInstantP2P
240-322 Cli/Serv.: JXTA/15 19
4.1. JXTA Shell4.1. JXTA Shell Enables users to interact with the JXTA core thrEnables users to interact with the JXTA core thr
ough a command-line interpreter. ough a command-line interpreter.
Useful for:Useful for:– accessing and managing core platform objects (peersaccessing and managing core platform objects (peers
, groups, pipes), groups, pipes)– setting up pipessetting up pipes– debugging communicationsdebugging communications– checking the status of peers and/or peer groupschecking the status of peers and/or peer groups
240-322 Cli/Serv.: JXTA/15 20
4.2. JXTA Search4.2. JXTA Search
Searches for content and services on JXTA Searches for content and services on JXTA nodes and the Web.nodes and the Web.
Uses a new XML search protocol for descriUses a new XML search protocol for describingbing queries and responses.queries and responses.
240-322 Cli/Serv.: JXTA/15 21
4.3. InstantP2P4.3. InstantP2P InstantP2P implements a set of common P2P appInstantP2P implements a set of common P2P app
licationslications– includes peer-to-peer messaging (secure and plain teincludes peer-to-peer messaging (secure and plain te
xt), peer group chat, and file sharingxt), peer group chat, and file sharing
It provides a simple graphical user interface to crIt provides a simple graphical user interface to create and join groups.eate and join groups.
The source code is available.The source code is available.
240-322 Cli/Serv.: JXTA/15 22
5. JXTA Compared to Jini5. JXTA Compared to Jini
JiniJini connects distributed services within a J connects distributed services within a Java network using an object model and a ceava network using an object model and a centralized service location broker. ntralized service location broker.
JXTA connects distributed services in a P2PJXTA connects distributed services in a P2P-style network,-style network, using a loosely-coupled data using a loosely-coupled data model.model.
240-322 Cli/Serv.: JXTA/15 23
A Jini SystemA Jini System
locationbroker
printer
databasedynamicnetworkof services
mobiledevice
1.enquire
2. report
3. connect
240-322 Cli/Serv.: JXTA/15 24
6. More Information6. More Information
Project JXTAProject JXTA– http://www.jxta.orghttp://www.jxta.org
– JXTA software, documents, etc.JXTA software, documents, etc.