5

There is an important issue that is not clear when someone search information about how the peers find each other in JXTA. Let´s assume that we have got two peers one in Berlin and the another one in London, which is a rendezvous. My question is how can the peer in Berlin find the peer in London?

  1. What methods in JXTA to solve this ?
  2. Can you post an example?
Prof. Falken
  • 24,226
  • 19
  • 100
  • 173
Alex
  • 75
  • 1
  • 9
  • 3
    If there are only those two peers, and they have no knowledge about each other, they will just not find each other. – Niklas B. Apr 21 '12 at 17:35
  • Thanks for your replay. Is there any way that I can make them to know each other? – Alex Apr 21 '12 at 18:03

2 Answers2

1

Googling jxta Peer Discovery Protocol we find http://java.sun.com/developer/Books/networking/Wilson/wilson_ch04.pdf.

Zecas
  • 647
  • 4
  • 23
1

You need to know the URI of a public Rendezvous peer which is a pre-existing Peer visible to both your peer in London and Berlin. When you start your peers, you seed the NetworkConfigurator with this rendezvous peer's URI, something like this:

NetworkManager manager = new NetworkManager(...)
NetworkConfigurator config = manager.getConfigurator();
config.addRdvSeedingURI("tcp://123.123.123.123:1234");

I think @JVerstry says something similar here: https://stackoverflow.com/a/4953034/1240660

Community
  • 1
  • 1
yeeking
  • 958
  • 8
  • 11