JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based...

60
JXTA Overview and Demo M. Ranganathan ITG/ANTD/NIST

Transcript of JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based...

Page 1: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

JXTA Overview and Demo

M. Ranganathan

ITG/ANTD/NIST

Page 2: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Peer-peer networking

Focus at the application level

Create an overlay network : Separation between physical and logical structure using

one layer of indirection.

Page 3: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

P2P Applications

• Application Characteristics:– Centralization not possible or desired.

– Massive Scalability

– Relationships are transient or ad hoc

– Resources are distributed– Resources are distributed

– Resilience is desired

• Examples– File sharing.

– Collaborative Applications

– Distributed/Grid Computing.

– Distributed Storage.

– Distributed Caches.

Page 4: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

P2P Applications

• Search the entire web and all its connected devices (not just servers) for needed information

• Save files and information to distributed locations on the network

• Connect game systems so that multiple people in multiple locationsmultiple locations

• Participate in auctions among selected groups of individuals

• Collaborate on projects from anywhere using any connected device

• Share compute services, such as processor cycles or storage systems, regardless of where the systems or the users are located

• Wireless tic-tac-toe / picture sharing.

Page 5: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

JXTA Overview

JXTA is a set of open XML-based protocols

to build Peer to Peer Applications.

API bindings for the protocols are defined for

J2SE, J2ME, C++ etc.

Project JXTA is sponsored by SUN.

JXTA open source community hosted at

http://www.jxta.org.

Page 6: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Goal/Purpose

• Enable a wide range of distributed computing applications by developing a common set of general purpose P2P protocols

• Platform independence - any language, any OS, any hardware. JXTA is a set of protocols.

• Minimal Hardware assumptions: enable new applications to run on any device that has a digitalheartbeat (desktop computers, servers, PDAs, cell phones, and other connected devices)

• Security / monitoring features to enable commercial deployment.

Page 7: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

JXTA is based on Protocols

• Defines XML message formats or protocols for communication between peers.

• Protocols are used to discover peers, • Protocols are used to discover peers, advertise or discover resources communicate, route messages and provide monitoring.

• Protocols can be implemented in any language.

Page 8: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

JXTA Protocol Abstractions

• Peer - A JXTA speaking process.

– Peer Service – A Fragment of code specific to a peer

• Peer Groups - Peers providing a common service

– Peer Group Service – A fragment of code that is common to

the peer group.the peer group.

• Advertisements – XML Document that publishes

existence of resources

• Pipes – uni-directional, asynchronous, virtual

channels for point-point and point-multi-point

communication.

• Messages – XML envelopes

Page 9: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

JXTA Abstractions

• Each JXTA resource is identified by a

UUID.

• Six types of JXTA entities with unique IDs:

– Peers, Peer groups, pipes, message – Peers, Peer groups, pipes, message

contents, module classes and module

specifications.

Page 10: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

JXTA Services

JXTA Applications

Structure

JXTA Community ServicesSun

JXTA Services

JXTA Community Applications Sun Applications

JXTAShell

Peer

Commands

JXTA Core

JXTA Services

Any Peer on the Web

Security

Peer Groups Peer Pipes Peer Monitoring

JXTA Services Commands

Page 11: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

The Layers

• Platform Layer, also known as the JXTA core, encapsulates the minimal and essential primitives that are common to all P2P environments. These include the creation of peers, peer groups and security primitives.

• Service Layer. The Service layer includes the services that are not completely necessary for P2P networking, that are not completely necessary for P2P networking, but are often used to make some tasks easier.

• Application Layer. Implementations of integrated applications: i P2P instant messaging, document and resource sharing and P2P email systems.

Page 12: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Peers

• Peer is any networked device that implements

one or more of the JXTA protocols.

• Each peer operates independently and

asynchronously from all other peers.asynchronously from all other peers.

• Uniquely identified with a Peer ID.

• Peers publish one or more network interfaces for

use with the JXTA protocols.

• Intermediate peers may be used to route

messages.

Page 13: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Peer Groups

• Collection of Peers that have agreed upon

a common set of services.

• Each Peer group is identified using a

unique peer group ID.unique peer group ID.

• Peers may belong to more than one peer

group simultaneously.

• All peers belong to the NetPeerGroup.

Page 14: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Motivations for Peer Groups

• To Create a Secure Environment:

– Local domain of control in which a specific

security policy can be enforced. Peer group

boundaries permit members to access/publish boundaries permit members to access/publish

protected contents.

• To Create a Scoping Environment:

– Allow the establishment of a local domain of

specialization.

Page 15: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Peer Group Services

• A set of services that are replicated through the whole peer group.

• Root peer group has the following services:– Discovery Service: search for peer group resources.

– Membership Service: Accept/deny new members.– Membership Service: Accept/deny new members.

– Access Service: Validate requests

– Pipe Service: Create / Manage pipe connections

– Resolver Service: Send generic queries to other peers.

– Monitoring Service: Allow one peer to monitor the other members of the same peer group.

Page 16: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Network Services

• Peer Service: Accessible only on the peer

that is publishing the service:

– Multiple instances of the service can be run

on different peers.on different peers.

• Peer Group Service: A collection of

instances of the service (potentially

collaborating with each other).

– Peer group services are published as part of

the peer group advertisement.

Page 17: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Modules

• Modules: Abstraction to represent a piece

of Code.

• Can be java class, DLL a set of XML

messages or a script.messages or a script.

• Generic Abstraction to allow a peer to

instantiate new behavior.

• JXTA platform uses module

advertisements to describe itself.

Page 18: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Modules

• Module Class : identified by unique class id.

• Module Spec: Contains all the information

necessary to access a module. Module Spec

implies network compatibility:implies network compatibility:

– For a service module spec may contain pipe

advertisement.

• Module Implementation – can be multiple

module implementations for a given module

spec.

Page 19: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Pipes

• Virtual communication channel that may connect peers that do not have a direct physical link.

• JXTA peers use PIPES to send messages to each other.

• Pipes are an asynchronous and unidirectional • Pipes are an asynchronous and unidirectional message transfer mechanism used for service communication.

• Pipes support transfer of binary/text.

• JXTA pipes may have endpoints that are connected to different peers at different times or not connected at all.

Page 20: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Pipes Hide Plumbing Details

Page 21: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Pipes

• Point-to-point Pipes:

– Connect exactly two endpoints together

• Propagate Pipes:

– Connect one output pipe to multiple input pipes.– Connect one output pipe to multiple input pipes.

– All propagation is done in the scope of a peer group.

That is, the output pipe and all input pipes must

belong to the same peer group.

• Secure Unicast Pipe:

– Point-to-point secure communication channel.

Page 22: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Advertisements

• All network resources are represented by

advertisements.

• JXTA protocols use advertisements to describe

and publish the existence of peer resources.and publish the existence of peer resources.

• Peers discover resources by searching for

corresponding advertisements.

• Advertisement is published with a lifetime that

specifies the availability of associated resources.

Page 23: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

JXTA Advertisement

<?xml version="1.0"?>

<!DOCTYPE jxta:PipeAdvertisement>

<jxta:PipeAdvertisement xmlns:jxta="http://jxta.org">

<Id>

urn:jxta:uuid-59616261646162614E5047205CFDF904urn:jxta:uuid-59616261646162614E5047205CFDF904

</Id>

<Type>

JxtaUnicast

</Type>

<Name>

foo

</Name>

</jxta:PipeAdvertisement>

Page 24: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Advertisements

• Peer Advertisement:

– Describes Peer Resources

• Peer Group Advertisement:

– Describes Peer group specific resources.– Describes Peer group specific resources.

• Pipe Advertisement:

– Describes a Pipe Communication channel.

• Module Class Advertisement:

– Describes a Module Class.

– Formally documents the existence of a module class.

Page 25: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Advertisements

• Module Spec Advertisement

– Defines a Module Specification

– Provides references to the documentation needed to

create a conforming implementations of that

specification.specification.

• Module Impl Advertisement

– Defines an implementation of a module spec.

– Includes name, module spec Id , code, package and

parameter fields which enable the peer to retrieve the

data necessary to execute the advertisement.

Page 26: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Advertisements

• Rendezvous Advertisement

– Describes a peer that acts as a rendezvous.

• Peer Info Advertisement

– Describes peer info resources.– Describes peer info resources.

– Holds information about the current state of a

peer.

Page 27: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Quick JXTA Demo

• Demo will do the following:

– Make advertisements.

– Publish the Advertisements.

– Discover the advertisement.– Discover the advertisement.

– Use the advertised pipe to send a file from

peer to peer.

Page 28: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Demo

• Start 3 jxta shells on the same machine.

– Make one jxta shell the rendezvous peer.

– Make the other two use the rdv peer.

– Test peer discovery.– Test peer discovery.

– Examine the peer advertisement.

• Make a Pipe advertisement (from sh2)

– p = mkadv –p pipename

– publish –d p

– inpipe = mkpipe –i p

Page 29: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Demo

• From shell 3 discover the pipe

– search –r #send out discovery request

– search #see what arrived in cache

– cat advxx #Examine the pipe advertisement– cat advxx #Examine the pipe advertisement

– outpipe = mkpipe –o advxx # make outpipe

• Make a message to send

– importfile –f data mydata #Create data object

– put mymsg mytag mydata #assign data tag

– cat mymsg #examine the message

Page 30: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Demo

• Send message through pipe (sh3):

– send outpipe mymsg

• Read from other end of pipe (sh2):

– newmsg = recv inpipe #blocking read– newmsg = recv inpipe #blocking read

– cat newmsg #see what you got

– newdata = get newmsg mytag #extract data

– cat newdata #see what you got

Page 31: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Note

• Asynchronous programming model

– Results are cached and cache is queried.

• Mailbox like message delivery

• Advertisements are persistent. • Advertisements are persistent.

• Some amount of configuration necessary.

• You can extend the shell and add new

commands to it.

• Conversely, you can imbed jxta into another

shell (tcl/tk).

Page 32: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

JXTA Protocols

• Allow Peers to dynamically route messages to any other peer in the network, potentially traversing firewalls.

• Allow Peers advertise their resources and discover resources. discover resources.

• Peers can co-operate to form self-organized and self configured peer-groups independent of their positions in the network ( edges, firewalls, NATS, Public vs. Private Addresses), without the need for a centralized management infrastructure.

Page 33: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Protocols

• Peer Discovery Protocol - find peers, groups, advertisements

• Peer Information Protocol - learn peers’ status/properties

• Peer Membership Protocol - sign in, sign out, authentication

• Pipe Binding Protocol - pipe advertisement to pipe endpoint

• Peer Resolver Protocol - send/receive search queries

• Endpoint Routing Protocol - available routes to destination

Page 34: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

JXTA Protocol Stack

Peer Disc

Peer Info

Pipe Bind Pipe Bind

Peer Info

Peer DiscVia Peer Rslv

Via Peer Rslv

Via Peer Rslv

Network Transport Network Transport

Rendezvous

Peer Rslv

Rendezvous

Peer Rslv

Peer Endpt Routing Peer Endpt Routing

Via Peer Rslv

Via Endpt. Routing

Via Network Transport

Page 35: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Animation of Scenarios

http://platform.jxta.org/graphics/adv.swf

Advertisement Animation

http://platform.jxta.org/graphics/adv.swf

http://platform.jxta.org/TutorialGraphics.html

Connection Scenarios

Page 36: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Peer Discovery Protocol (PDP)

• Peers publish advertisements and

discover about resources using

advertisements.

• Every peer resource is described and • Every peer resource is described and

published using an advertisement.

• Advertisements are XML meta data that

describe resources.

Page 37: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Peer Information Protocol

• Once a peer is located, its capabilities and

status may be queried.

• PIP ping sent to a peer to check if the peer

is alive and to get info about the peer.is alive and to get info about the peer.

– Peer Info message used to respond to a ping

Page 38: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Peer Resolver Protocol (PRP)

• Enables Peer to send generic query

requests to other peers and identify

matching responses.

• Query requests can be sent to specific • Query requests can be sent to specific

peer or can be propagated via rendezvous

service within the scope of a peer group.

– PIP and PDP built using PRP.

Page 39: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Pipe Binding Protocol (PBP)

• Used by peer group members to bind a

pipe advertisement to a pipe endpoint.

• Pipe is an abstract named message queue

supporting open/resolve (bind), close supporting open/resolve (bind), close

(unbind), delete, send and receive.

• Pipe IDs are unique.

• PBP message sent to find a pipe endpoint

bound to the same pipe advertisement.

Page 40: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Endpoint Routing Protocol

• A protocol that allows an endpoint to

discover a route (sequence of hops) used

to send a message to another peer.

• If there is no direct route then the peer • If there is no direct route then the peer

needs to find an intermediate peer or set

of peers to route the message.

Page 41: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Rendezvous Protocol (RVP)

• A mechanism by which peers can

subscribe to a propagation service.

• Within a peer group peers can be

Rendezvous peers or listening to RDV Rendezvous peers or listening to RDV

peers.

• RVP is used by PRP and PBP in order to

propagate messages.

Page 42: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Network Architecture

• JXTA Peers have different capabilities:

– Micro Peer, Standard Peer, Super Peer, Rendezvous peer.

• Minimal Edge Peer: • Minimal Edge Peer:

– Device with minimal capability. Must implement the Peer Resolver Protocol and Endpoint Routing Protocol.

• Full Featured Edge Peer

– Will Cache advertisements.

Page 43: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Network Architecture

• Rendezvous Peer:

– RDV peer forwards advertisements. Peers seek RDV peers in their peer groups. Discovery requests are forwarded through RDV peersRDV peers

• Relay Peer:

– Maintains information about routes to other peers and routes messages to them.

– Forward messages on behalf of peers that cannot directly access another peer.

Page 44: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Discovery Service

• Retrieve Remote / Local Advertisements– Application can dispatch queries using getLocal/Remote Advertisements to fetch advertisements.

• Publish Advertisements Locally• Publish Advertisements Locally

• Publish Advertisements remotely

• Flush local advertisements.

• Informs the application through an asynchronous Listener Interface.– Delivers discovery event when a query is processed.

Page 45: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Resolver Service

• Encapsulates the Resolver Protocol and hides its complexity.– Discovery Service uses the resolver service.

• Resolver Service needs two types of messages:– Resolver query message and Response message.– Resolver query message and Response message.

• Developer can create a Resolver Query message at any time and send query to a specific Resolver handler on a remote peer.

• Developer can register a query handler for a resolver query for a given handler name.

Page 46: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Shared Distributed Index (SRDI)

• Optimization to reduce the number of

messages for search.

• When edge peers publish new

advertisements, they use the SRDI service advertisements, they use the SRDI service

to push advertisement indexes to the

Rendezvous peer.

– Queries are only propagated to RDV peers.

Page 47: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Firewalls and NATs

• Firewalls offend and defend the nation’s IT

infrastructure.

• Firewall traversal depends upon the existence of

a RDV peer that both communicating parties can a RDV peer that both communicating parties can

contact.

• Assumption – Firewall allows HTTP through.

– Use polling to pipeline the message through the

firewall.

– Ugly but effective solution.

Page 48: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Security Requirements

• Confidentiality – contents of a message are not divulged.

• Authentication – guarantees a sender is who he claims to bewho he claims to be

• Authorization – Sender is authorized to send the message.

• Integrity- Message was not modified in transit.

• Refutability – guard against replay attack.

Page 49: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

JXTA Security

• Peer group is a “web of trust”– Group can have an authentication method for allowing peers to

join the group.

• Authentication method using X.509v3 certificates:– Peer must have X509 root cert of any peer with which it wishes

to communicate securely

– When peer joins the PG, it receives PG creator’s Root cert under TLS

– Certificate Service Request is used to acquire group membership cert.

– Peers can authenticate each other using the group membership certificate.

Page 50: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Virtual TLS

• JXTA pipe might span multiple relays.

• When a JXTA secure pipe is created and the associated endpoints are resolved, an end to end TLS channel is created. Independent of the relays and underlying physical transport.relays and underlying physical transport.

• Peer certificates are exchanged and verified during initialization of the secure pipe.

• Peer certificates are digitally signed by the JXTA platform.– JXTA creates a self signed root certificate and issues a peer certificate based on that root certificate.

Page 51: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Security

• XML meta data in advertisements provide

Credentials, Certificates, Digests and Public

Keys.

– Credential – token that can be used to identify the

sender.sender.

– Credentials are used for authorization and

authentication.

• Message can be encrypted/decrypted using

private/public key pairs.

• Certificates are distributed using TLS.

Page 52: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

JXTA Security API

• API are based on the JAVA Smart Card

API.

• JXTA API does not provide support for key

distribution.distribution.

• Provides support for cypher / decypher,

hash computation and digital signature.

Page 53: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

JXTA based Grid Broker Service

broker

Broker – matches jobs to available resources

Res. Avail Adv

Job AdvResource Adv

Resource or User Registration –

Peer Advertisements

User wants to submit the job to broker –

Job Advertisement

Broker matches jobs and resource –

Pipe Message sent back to User

Job Submission –

Using Pipe to send the job to resource

http://www.unix.globus.org/cog/projects/jxa/?Projects=&

JOB Resource

Job Adv

User Adv

Resource Adv

Discover

Pipe

Publish

Page 54: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

JXTA XML RPC and JXTA SOAP

• SOAP – Simple Object Access Protocol.

• Tunnel XML RPC (lightweight SOAP) or SOAP

on JXTA Pipes.

• Allow users to build and publish web services in • Allow users to build and publish web services in

a firewall-controlled environment.

– Free the web from the tyranny of system

administrators.

– Everybody can run a web server like in the good old

days!

Page 55: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Voice Over P2P

• Try to stream voice over JXTA pipes.

• Why? Firewalls.

• Advantages – Instant deployment

– No need for complex protocol (RADIUS/DIAMETER whatnot).

• Disadvantages:– Voice quality will likely be bad.

– People will tolerate bad quality for convenience.

http://vop2p.jxta.org/

Page 56: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Project Ideas (discussion)

• Measurements of peer to peer protocol

performance.

• A simulation of JXTA vs other P2P protocols:

– Decentralization and timeouts means inconsistencies – Decentralization and timeouts means inconsistencies

in application state are possible.

– How to tune cache advertisement timeouts.

– The variation of responsiveness and peer discovery

with group size (what is the latency of finding a pipe

or advertisement as a function of network

parameters).

Page 57: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Project Ideas (discussion)

• Firewalls are here to stay:

– Firewalls are a huge barrier for IP Telephony.

– Effective FW solution is a huge win (see

www.skype.com over 300000 downloads of www.skype.com over 300000 downloads of

the beta client in a single day).

Page 58: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Project Ideas (discussion)

• JXTA allows P2P interaction through firewalls:

– What bandwidth/delay characteristics can we expect.

– How can we bridge between SIP/SDP (which

specifies RTP parameters) and JXTA?

– Can we build a gateway which will allow you to do – Can we build a gateway which will allow you to do

voice calls through a SIP phone using JXTA as a

transport for everything (signaling and voice)?

– If so you can use your MSN messenger or SIP phone

through a FW and deployment would be easy (could

be an applet). What performance can you expect?

Page 59: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

JXTA vs. JINI

• Language dependence

– JXTA is XML based.

– JINI relies on java object serialization.

– JXTA protocols are language independent.– JXTA protocols are language independent.

• Centralization

– JXTA assumes no centralization (well, except for the RDV peers??).

– JINI uses a centralized service location broker.

Page 60: JXTA Overview and Demo - 123seminarsonly.com...JXTA Overview JXTA is a set of open XML-based protocols to build Peer to Peer Applications. API bindings for the protocols are defined

Material for this talk

• JXTA Protocol Specification– http://spec.jxta.org

• JXTA Programmers Reference– http://www.jxta.org

• JXTA in a Nutshell by Scott Oaks, Bernard • JXTA in a Nutshell by Scott Oaks, Bernard Travesat and Li Gong – O’Reilly publishing

• JXTA by Brendon Wilson – New Riders Publishing ( Free PDF available from http://www.brendonwilson.com )