Re: best way to send messages to many peers

Christoph Mueller <[email protected]> Sat, 10 Sep 2005 14:11:29 +0200
Newsgroups gmane.comp.java.jxta.user
Message-ID <[email protected]>
John D. Blair wrote:
> I am expecting to send a message to a large number of peers (100 to 
> 1000) approximately once a minute over a unicast pipe.
> 
> I would like to avoid creating each pipe and then tearing it down for 
> each message-- this doesn't seem very efficient.  Should I maintain an 
> OutputPipe for each of these peers, storing them in a data structure so 
> I can look them up when I need to deliver a message?  Is there a way I 
> can offload this work onto JXTA so my app doesn't have to do this work 
> itself?

I might missunderstand the problem, but if you are sending the same 
message at the same time to several peers, why don't you use a broadcast 
pipe instead of a unicast pipe?

Also see the reply from Mohamed Abdelaziz "Re: [JXTA user] resource 
consumption for an open pipe" which to me indicates that keeping the 
pipe open and storing it would be the most efficient way in this case