Re: question about pipe advertisements
Mohamed Abdelaziz <[email protected]> Sat, 10 Sep 2005 10:58:44 -0700
| Newsgroups | gmane.comp.java.jxta.user |
|---|---|
| Message-ID | <[email protected]> |
John D. Blair wrote: > OK, so just to be perfectly clear. Every peer in my peergroup that > is implementing the same pipe must use the same pipe id. yes > Followup question: if every peer in my peergroup implements the > same InputPipe, can I still use the PeerID field in the OutputPipe > constructor to request binding to a specific peer? yes > > -j. > > On Sep 10, 2005, at 8:21 AM, Mohamed Abdelaziz wrote: > >> The most significant element described in a pipe advertisement is >> the PipeID, all other information is simply metadata. The pipe >> advertisement can be generated at runtime using either a pre baked >> pipe id's, etc. So long as every peer can generate the same pipe >> id, that's all that matters for binding to a pipe. >> The JXME proxyless project offer a simple propagated pipe tutorial >> which maybe of interest to you, keep in mind that it generates the >> same pipe id used by instantp2p, shell, and MyJXTA2. >> >> http://jxme.jxta.org/source/browse/jxme/proxyless/proto/demo/chat/ >> ChatDemo.java?rev=1.9&view=auto&content-type=text/vnd.viewcvs-markup >> >> We'll probably refactor it for inclusion into the Guide tutorials >> >> Mohamed >> >> John D. Blair wrote: >> >>> The commentary in the JXTA Programmer's Guide explains that pipe >>> advertisements should keep the same unique id. It demonstrates >>> this by using a pipe advertisement stored in an XML file. >>> >>> It is unclear to me if the pipe advertisement unique id should be >>> the same across my entire JXTA network (that is, the same pipe >>> advertisement file on each peer), or if they should be different >>> for each peer but stay the same each time a peer is executed. >>> >>> Stated concretely, which of these should I do: >>> 1) Generate a pipe advertisement file while developing my >>> application, and include that in the app's distribution so every >>> peer has the same advertisement file, or >>> 2) Generate a pipe advertisement file the first time the app is >>> started up, and re-use that on that peer. >>> >>> thanks! >>> -john. >>> >>> -- http://blogs.sun.com/roller/page/hamada http://weblogs.java.net/blog/hamada