Skip to main content

JXME - how to address certain peers?

1 reply [Last post]
afriflo
Offline
Joined: 2007-03-03
Points: 0

Hi everybody,

currently I have to write a JXME application (I`m completely new to JXTA). I have to implement a breath first search algorithm. This algorithm should run over several iterations. The request messages from the source peer should take the same way through the network every time. Therefore each peer has to maintain a list with all the PeerIDs to which peers he has forwarded the messages in the previous iteration to be able to address the same peers in the current iteration.

My question is if it is possible (and if yes how) to send messages to other peers by using the PeerIDs to address those peers?
Or do I have to use the PipeIDs instead? If yes my question would be if a certain PipeID corresponds to a certain peer for lifetime?

Another question is if it is possible to use the JXTA Shell as a relay peer to run my application.

Thanks a lot & best regards,
Florian

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
hamada
Offline
Joined: 2003-06-12
Points: 0

Q: it is possible (and if yes how) to send messages to other peers by using the PeerIDs to address those peers? Or do I have to use the PipeIDs instead? If yes my question would be if a certain PipeID corresponds to a certain peer for lifetime?

A: The simplest analogy is to think of the PipeID as a 128bit UUID representation of a port on a node. Any node listen on a port. JXTA provides the ability to bind a pipe to specific node, or in case where no PeerID is specified, it will attempt to bind to any of the nodes listening. Therefore it is completely up to the applicaiton.

Q: is it possible to use the JXTA Shell as a relay peer to run my application?
A: Sure, it's good debugging tool.