Transcript jxta15

Client/Server Distributed Systems
240-322, Semester 1, 2005-2006
15. JXTA
(Juxtapose)
 Objective
– explain JXTA, a support environment for
P2P services and applications
240-322 Cli/Serv.: JXTA/15
1
Contents
1. Principle Aims
2. JXTA Main Components
3. JXTA Concepts
4. Example Services and Apps.
5. JXTA Compared to Jini
6. More Information
240-322 Cli/Serv.: JXTA/15
2
1. Principle Aims
 JXTA provides
core functionality so that
developers can build P2P services and
applications.
 JXTA can
be implemented with any
programming language and run on any
software and hardware platform/device.
240-322 Cli/Serv.: JXTA/15
continued
3
 It
can be implemented on top of TCP/IP,
HTTP, Bluetooth, and many other protocols.
 Currently
requires a platform that supports
the JRE or JDK 1.3.1 or later.
 Available on Windows, Solaris, Linux, and
Macintosh.
240-322 Cli/Serv.: JXTA/15
4
2. JXTA Main Components
 JXTA supports
a three layer view of P2P
development:
– a core layer
– a middle services layer
– an application layer
240-322 Cli/Serv.: JXTA/15
5
Diagram
240-322 Cli/Serv.: JXTA/15
6
2.1. The Core Layer
 The
core layer includes protocols and
building blocks to enable key mechanisms
for P2P networking
– these include discovery, transport (e.g. firewall
handling and limited security), and the creation
of peers and peer groups
– the protocols use XML-encoded messages
240-322 Cli/Serv.: JXTA/15
7
2.2. The Services Layer
 The
services layer provides P2P services,
tools, and commands
– e.g. searching, sharing and added security
– e.g. the JXTA Shell, the JXTA Search
(see below)
240-322 Cli/Serv.: JXTA/15
8
2.3. The Application Layer
 The
application layer supports the
implementation of integrated applications
– e.g. file sharing, resource sharing, monetary
systems, distributed storage
– reimplementations of programs like Gnutella,
Napster, Groove, Instant Messenger
– e.g. InstantP2P (see below)
240-322 Cli/Serv.: JXTA/15
9
3. JXTA Concepts
 What
is a Peer?
 What are Peer Groups?
 JXTA Pipes
 Peer Monitoring
 The Main JXTA Protocols
240-322 Cli/Serv.: JXTA/15
10
A JXTA System
peer group
comms.
ask to join
or query
group
monitor
dynamic
pipes
join
leave
240-322 Cli/Serv.: JXTA/15
peer group
11
3.1. What is a Peer?
 A peer
is any device that runs some/all of
the JXTA protocols.
 The
peer needs to be connected to some
kind of network, such as IP, Bluetooth.
 Peers
can be servers, PCs, PDAs,
manufacturing and medical equipment,
cellular phones, etc.
240-322 Cli/Serv.: JXTA/15
12
3.2. What are Peer Groups?
 A peer
group is a collection of peers that
have agreed upon a common set of rules to
publish, share and access their data, and
communicate between themselves.
 Each
peer group can establish its own
membership policy
– e.g. from open (anybody can join) to highly
secure and protected
240-322 Cli/Serv.: JXTA/15
13
3.3. JXTA pipes
 JXTA pipes
are inter-peer communication
channels
– similar to the UNIX idea of piping the output of
one command to the input of another
 Pipes
are unidirectional and may be
dynamically coupled and uncoupled for
flexible connection of peers.
240-322 Cli/Serv.: JXTA/15
continued
14
 Piped
messages are XML documents and so
are platform, language, and protocol
independent.
 The
contents of messages can be binary
code, data strings, Java technology-based
objects, and/or applets.
240-322 Cli/Serv.: JXTA/15
15
3.4. Peer Monitoring
 Peer
monitoring is the policeman of the
core
– handles authentication/authorization,
metering, etc.
240-322 Cli/Serv.: JXTA/15
16
3.5. The Main JXTA Protocols
NetPeerGroup Protocol
 Peer/PeerGroup Discovery Protocol
 Peer Information and Management Protocol
 PeerGroup Membership Protocol
 PeerGroup Resolver Protocol

– send and receive generic queries to find or search for
peers, peer groups, pipes, and other information.

PeerGroup Sharing Protocol
240-322 Cli/Serv.: JXTA/15
17
4. Example Services and Apps.
 Service
examples:
– JXTA Shell
– JXTA Search
 Application:
– InstantP2P
240-322 Cli/Serv.: JXTA/15
18
4.1. JXTA Shell
 Enables
users to interact with the JXTA core
through a command-line interpreter.
 Useful
for:
– accessing and managing core platform objects
(peers, groups, pipes)
– setting up pipes
– debugging communications
– checking the status of peers and/or peer groups
240-322 Cli/Serv.: JXTA/15
19
4.2. JXTA Search
 Searches
for content and services on JXTA
nodes and the Web.
 Uses
a new XML search protocol for
describing queries and responses.
240-322 Cli/Serv.: JXTA/15
20
4.3. InstantP2P
 InstantP2P implements
a set of common
P2P applications
– includes peer-to-peer messaging (secure and
plain text), peer group chat, and file sharing
 It
provides a simple graphical user interface
to create and join groups.
 The
source code is available.
240-322 Cli/Serv.: JXTA/15
21
5. JXTA Compared to Jini
 Jini
connects distributed services within a
Java network using an object model and a
centralized service location broker.
 JXTA connects
distributed services in a
P2P-style network, using a loosely-coupled
data model.
240-322 Cli/Serv.: JXTA/15
22
A Jini System
1.enquire
location
broker
2. report
mobile
device
3. connect
database
printer
240-322 Cli/Serv.: JXTA/15
dynamic
network
of services
23
6. More Information
 Project JXTA
– http://www.jxta.org
– JXTA software, documents, etc.
240-322 Cli/Serv.: JXTA/15
24