The JXTA network is an ad hoc, multi-hops, adaptive network by nature. Connections in the network may be transient, and message routing is nondeterministic. Routes may be unidirectional and change rapidly. Peers may appear and leave frequently.
A peer behind a firewall can send a message directly to a peer outside a firewall. But a peer outside the firewall cannot establish a connection directly with a peer within the firewall.
The Endpoint Routing Protocol (ERP) defines a set of request/query messages that is processed by a routing service for routing a message to its destination. When a peer is asked to send a message to a given peer endpoint address, it looks in its local cache to see if it has a route to this peer. If it does not find a route, it sends a route resolver query message to available peer routers, asking for route information.
A peer can have as many peer routers as it can find. Peers will typically have a preconfigured list of routers. Preconfigured routers are optional.
The peer routers provide low-level infrastructures for routing a message between two peers in the network. Any number of peers in a peergroup may elect themselves to become peer routers. Peer routers offer the ability to cache route information, as well as bridge different physical transports (TCP/IP, HTTP) or logical networks (firewalls and NAT).
A peer may dynamically find router peers via a qualified discovery search. A peer can find out if a peer ...