PDF Ebook Mastering JXTA : Building Java Peer-to-Peer Applications
Many of us tend to think of the Internet, and most other networks, as inherently client-server systems. Web developers spend a lot of time building powerful sites that serve information and services to the thousands of browser clients that visit them. But peer-to-peer (P2P) applications like KaZaA, Napster, and SETI have demonstrated the true power of the Internet: the millions of information stores—common PCs—sitting idle on desks around the world. Peer-to-peer technologies harness the CPUs and storage devices of these PCs to produce huge data stores, communications systems, and processing engines.
Due to a lack of standards and toolkits, early P2P application developers spent much of their time reinventing the wheel building the same system “plumbing” for each new app they wrote. Developers at Sun created the JXTA specification to solve this problem. The specification is a basic building block from which developers can produce applications that.
- Allow sharing of resources between peers without a central server
- Use idle cycles of desktop machines for solving complex problems
- Expose Web services to be used by other peers
Content
Chapter 8
Peer Information Protocol
- An Overview of the PIP
PIP Query Messages
PIP Response Messages
Java Binding of the PIP
Requesting Peer Information
Building a Listener
Viewing the Information Returned
Summary
Chapter 9
Peer Endpoint Protocol
- An Overview of the Peer Endpoint Protocol
Endpoint Service
Sending a Message
Endpoint Protocols
Java Binding of the Peer Endpoint Protocol
Summary
Chapter 10
Pipe Binding Protocol
- Overview of the Pipe Binding Protocol
Pipe Advertisements
Pipe Binding Query Messages
Java Binding
Creating a Pipe
Receiving Information
Building the Pipe
Advertising the Pipe
Discovering an Input Pipe
Summary
Chapter 11
Rendezvous Protocol
- Rendezvous Advertisements
Message Propagation
The Java Binding
Dynamic Rendezvous Service Implementation
Finding Rendezvous Peers Dynamically
Connecting to Rendezvous Peers
Disconnecting from a Rendezvous Peer
Summary
Chapter 12
Developing a JXTA Application
- The Basic Structure for JXTA Applications
Connecting to the JXTA Network
Viewing Peer Group Information
Viewing Peer Group Advertisement
Building a Peer to Offer Services
Obtaining Group Services
Building and Publishing the Module Class Advertisement
Building the Pipe Advertisement
Building and Publishing the Module Specification Advertisement
Waiting for Messages
Putting It All Together
Building a Peer for Using Services
Code for the Receiver Peer
Getting Services
Finding the Advertisement through Discovery
Building an Output Pipe
Sending a Message through a Pipe
Application Basics
Creating a New Peer Group
Creating a Peer Group ID
Creating a Module Implementation Advertisement
Creating a Group Advertisement
Creating a New Peer Group
A Peer that Discovers and Joins a New Peer Group
Creating a Secure Peer Group
Using a Membership Service Implementation
Changing the Default Class Implementation Advertisement
Code for a Secure Peer Group
A Secure Peer Group Advertisement
Becoming Authenticated
New Class Implementation Advertisement Details
Peer Group Advertisement Details
authenticateMe() Method Details
Client for the Secure Peer Group
Summary
Chapter 13
JXTA Pipes
- Publishing and Discovering Pipes
Publishing
Discovery
Unicast Pipes
Unicast Pipes on a Local Peer
Remote Peers
UnicastSecure Pipes
Propagate Pipes
Bidirectional Pipes
The Bidirectional Pipe Code
The Bidirectional Pipe Discovery Code
Reliable Pipes
Sender Code
The Receiver Code
Summary
Part III JXTA Implementation
Chapter 14
- Content Sharing and the Content Management Service (CMS) 243
Overview of the CMS
Implementing the CMS in Peers
Initializing the CMS
Sharing Content
Viewing the Shared Content List
Searching For and Getting Content
Summary
Chapter 15
- Implementing Security
JXTA Security Toolkit
Building Keys
Secure Membership Service
Building a New Membership Service
Changing the Peer Group Creator Code
Secure Transport
JxtaUnicastSecure Pipes
Separately Encrypted Data
Summary
Chapter 16
- Peer Monitoring and Metering
Finding Peers in a Group
Building the Peer Discovery Listener
Interpreting Events
The Discovery Code
Local Peers versus Remote Peers
Obtaining Information about a Peer
A Sample Application for Discovering Peers
Explaining the Code
Code Output
Summary
Chapter 17
- Configuring NAT and Firewall Peers
The JXTA Network Topology
Running a Peer Behind a Firewall/NAT
Communication Peer Configuration
Gateway Configuration
The Discovery Peer Configuration
Using the Configurator’s Debug Option
Building a Router/Rendezvous Peer
Summary
Chapter 18
- Using Endpoints for Low-Level Communication
The Endpoint Service
Code for the Endpoint Receiving Peer
Code for the Endpoint Sending Peer
Summary
Chapter 19
- Building a Generic Framework for Distributed Computing
Master Code
Worker Code
Setup
Work
Computational Code
Summary
Chapter 20
- Building an Encrypted, Highly Available Storage System
System Architecture
Our Example
Database Schema
Message Schema
Executing the System
DatabasePeer
DatabasePeer Connectivity
Setup
Publishing a Data Input Pipe
Publishing a Query Bidirectional Pipe
Processing Input
BusinessPeer
Setup
Discovery
Processing Input
GatheringPeers
ClientPeer
Setup
Pipe Discovery
The Query Request
The Image Request
Summary
Part IV JXTA Reference
Appendix A
Installing JXTA and Compiling JXTA Applications
- Installing JXTA
Easy Install
Installing on a Windows System
Installing on a Linux System
JXTA Libraries
Stable Builds
Daily Builds
Compiling the Examples
Windows
Linux
Running the Examples
Windows
Linux
JBuilder Compiling and Execution
Adding a New JBuilder Project
Appendix B
JXTA API
- Class Advertisement
Field Summary
Constructor Summary
Method Summary
Example
Class AdvertisementFactory
Method Summary
Class AuthenticationCredential
Constructor Summary
Method Summary
Example
Class Codat
Field Summary
Constructor Summary
Method Summary
Example
Class CodatID
Constructor Summary
Method Summary
Example
Interface Credential
Method Summary
Class DiscoveryEvent
Constructor Summary
Method Summary
Example
Interface DiscoveryListener
Method Summary
Example
Class DiscoveryQueryMsg
Field Summary
Constructor Summary
Method Summary
Class DiscoveryResponseMsg
Field Summary
Constructor Summary
Method Summary
Example
Interface DiscoveryService
Field Summary
Method Summary
Example
Interface Document
Method Summary
Example
Interface Element
Method Summary
Example
Interface EndpointAddress
Method Summary
Example
Class EndpointAdvertisement
Constructor Summary
Method Summary
Interface EndpointFilterListener
Method Summary
Interface EndpointProtocol
Method Summary
Example
Interface EndpointService
Method Summary
Example
Interface GenericResolver
Method Summary
Class ID
Field Summary
Constructor Summary
Method Summary
Class IDFactory
Method Summary
Example
Interface InputPipe
Method Summary
Example
Class JxtaError
Field Summary
Constructor Summary
Method Summary
Class MembershipService
Constructor Summary
Method Summary
Example
Interface Message
Method Summary
Example
Class MessageElement
Constructor Summary
Method Summary
Example
Class MimeMediaType
Constructor Summary
Method Summary
Example
Class ModuleClassAdvertisement
Constructor Summary
Method Summary
Example
Class ModuleClassID
Constructor Summary
Method Summary
Class ModuleImplAdvertisment
Constructor Summary
Method Summary
Example
Class ModuleSpecAdvertisement
Constructor Summary
Method Summary
Example
Class ModuleSpecID
Constructor Summary
Method Summary
Example
Interface OutputPipe
Method Summary
Example
Class PeerAdvertisement
Constructor Summary
Method Summary
Example
Interface PeerGroup
Constructor Summary
Method Summary
Example
Class PeerGroupAdvertisement
Constructor Summary
Method Summary
Example
Class PeerGroupFactory
Constructor Summary
Method Summary
Example
Class PeerGroupID
Field Summary
Constructor Summary
Example
Class PeerID
Constructor Summary
Method Summary
Example
Class PeerInfoEvent
Constructor Summary
Method Summary
Example
Interface PeerInfoListener
Method Summary
Class PeerInfoQueryMessage
Constructor Summary
Method Summary
Example
Class PeerInfoResponseMessage
Constructor Summary
Method Summary
Class PipeAdvertisement
Field Summary
Constructor Summary
Method Summary
Example
Class PipeID
Constructor Summary
Method Summary
Example
Class PipeMsgEvent
Constructor Summary
Method Summary
Example
Interface PipeMsgListener
Example
Interface PipeService
Field Summary
Method Summary
Example
Interface QueryHandler
Method Summary
Interface RendezvousListener
Method Summary
Interface RendezVousService
Method Summary
Class ResolverResponseMsg
Field Summary
Constructor Summary
Method Summary
Interface ResolverService
Method Summary
Interface StructuredDocument
Method Summary
Class StructuredDocumentFactory
Method Summary
Example
Interface StructuredTextDocument
Method Summary
Example
Interface TextDocument
Method Summary
Interface TextElement
Method Summary
Example
Appendix C
- Current Add-on JXTA Services
Appendix D
- Latest JXTA Projects
Appendix E
- JXTA Resources
Mailing Lists
Discuss Mailing List
Announce Mailing List
Dev Mailing List
User Mailing List
JXTA Tutorials
OpenP2P
Sun.com
Appendix F
- JXTA Bindings
Java
Java ME (JXME)
jxta-c
jxtaPerl
jxtapy
jxtaruby
pocketJXTA
Appendix G
- Other Peer-to-Peer Implementations and Toolkits
IBM BabbleNet
Intel
Microsoft .NET and P2P
The Peer-to-Peer Trusted Library
The Bluetooth P2P Toolkit
Other Tools
Index
Download
PDF Ebook Mastering JXTA : Building Java Peer-to-Peer Applications
Posted in :