Package net.zortrium.p2proto

P2Proto is a Java RPC library built on top of Protocol Buffers, designed with peer-to-peer (P2P) systems in mind.

See:
          Description

Class Summary
Connection A connection to send messages to a remote peer.
Msg The main class representing a message to be sent over the network.
MsgCallback Base class for specifying how to handle the responses of asynchronous messages.
MsgResponder Class to facilitate sending a response message to a host who previously sent the local host a query message.
PeerListener Listens on for connections from other hosts, then spawns a thread to handle communication with each connecting host.
 

Exception Summary
PeerErrorException Exception indicating that a peer encountered an error while processing a request message.
PeerException Base class for exceptions resulting from requests sent to remote peers.
PeerTimeoutException Exception indicating that a response message was not received in under the specified time limit.
 

Package net.zortrium.p2proto Description

P2Proto is a Java RPC library built on top of Protocol Buffers, designed with peer-to-peer (P2P) systems in mind. P2Proto is lighter, faster and more efficient than heavyweight frameworks like RMI, and presents a very simple interface while still providing useful features such as asynchronous message passing and convenient request-response functionality.

P2Proto is message-oriented: each communication between peers is a message, which is comprised of a user-defined numeric type and arbitrary binary content. While this binary content can be encoded in any way, the most convenient use case is encapsulating other protocol buffer messages within the binary content. The type of the encapsulated content can be conveyed via the numeric type.

Communication in a P2Proto application has two primary components:

  1. A PeerListener class, which listens for peer connections and handles incoming messages.
  2. Use of the Connection class to send messages to remote PeerListener instances.

Author:
Sean Barker - www.zortrium.net