Re: Individual Members of PeerGroup
Mohamed Abdelaziz <[email protected]> Thu, 08 Sep 2005 16:49:58 -0700
| Newsgroups | gmane.comp.java.jxta.user |
|---|---|
| Message-ID | <[email protected]> |
Paul, Creating an OutputPipe object with the desired set of peers should provide the functionality you seek. Using rendezvous propagation may work given the correct service name and param, however, we advise against it, mainly due to the potential flood everywhere, and as a result it has become more restrictive in the upcoming release 2.3.5. Is this a static set of peers, or you looking for suggestions on how to dynamically create one? if it is the latter, perhaps a ping message over the propagate pipe results into a unicast response over the same propagate pipe. Mohamed -- http://blogs.sun.com/roller/page/hamada http://weblogs.java.net/blog/hamada Poole, Paul P1 wrote: > Hi all… > > I was wondering if some of you could enlighten me on the best way to > send a message to only a few members of a peer group. I don't want to > propagate the message to every member of a group, just a few of them. > I know that RendezVousService has a couple of methods that could work… > > One possibility is to use propagateInGroup() with a low TTL (like 1), > but that will probably send to more peers than desired. > > Another possibility, is to get an enumeration of the peerIDs currently > connected to the rendezvous and then use a subset of that with the > RendezvousService method propagate(Enumeration destPeerIds, Message > msg, String serviceName, String serviceParam, int ttl). However, the > API states that this method is very expensive. Is it still expensive > if I only use 2 or 3 peers? > > Are there are any better solutions? > > Thanks in advance for your insight! > > *Paul Poole* > Software Engineer > Lockheed Martin > >