Re: best way to send messages to many peers
"John D. Blair" <[email protected]> Sat, 10 Sep 2005 09:43:44 -0700
| Newsgroups | gmane.comp.java.jxta.user |
|---|---|
| Message-ID | <[email protected]> |
On Sep 10, 2005, at 5:11 AM, Christoph Mueller wrote: > 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? No, the messages are unique to each peer. > 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 Yes, I am suspecting this is the answer. I was hoping there was a shortcut where I could avoid managing all of the open pipe resources in my app. -j.