Recent optimization in propagated pipes
By hamada on May 23, 2007
There has been many performance enhancements introduced in the upcoming release of JXTA for JSE 2.5, which I will try to cover in a series of blogs detailing the enhancements and the expected benefits. Starting with the most recent, the propagated pipe. To give a little background on how propagated pipes work, a propagated pipe utilizes a pipe service named WirePipe which deals with duplicate message filtering and TTL on the network. The WirePipe service then relies on the rendezvous service for network topology and message distribution. A less frequently publicized feature of propagated pipes, is the ability to specify a set of recipients, which eventually end up as individual messengers (1-1 connections) to recipients. The performance enhancement was introduced as a new class, BlockingWireOuputPipe, in 2.5, which is automatically constructed when the specified set of nodes contains a singleton. BlockingWireOuputPipe then binds directly the destinations propagated pipe endpoint bypassing two layers of indirection (WirePipe and the RendezvousService), thus eliminating two message elements (wire, and propagation header), resulting in smaller message overhead, and faster delivery, also since it is bound directly to the endpoint, it provides reliable feedback on message delivery.
It is highly recommended that such object is cached and reused, for an example, see the PropagatedPipeServer tutorial.