Skip to main content

a few rendezvous questions

2 replies [Last post]
crabpot8
Offline
Joined: 2009-02-07

Hi all,

Getting started with jxta development, i have a few questions about rendezvous.

when i say
NetworkManager manager;
manager.waitForRendezvousConnection(12000);

what is actually goin on under the hood? I am confused why there is a need to 'connect' to an ad hoc service?

is there a rendezvous advertisement browser out there for windows? Seems like it is easy to find one for a mac, but I have been unsuccessful in finding one for windows.

Thanks,
crab

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
enygma2002
Offline
Joined: 2008-12-22

Hi.

When you create a network manager instance, a RendezVousEventListener is also registered automatically.

The seeds are added and the network manager class tries to contact a RDV (network-entry-point) from those seeds or from LAN (if you have multicast on). When a connection with a RDV is established, the rdvEventListener notifies any waiting threads for such an event.

When you call manager.waitForRendezvousConnection(12000); your current thread will block until it is notified by a rdvEventListener that catches a RDV_CONNECT event or until the timeout expires.

Note: There currently is a bug in the manager.waitForRendezvousConnection() method http://forums.java.net/jive/thread.jspa?threadID=57182&tstart=0 that makes it always and immediately return false after restarting the jxta platform (manager.stopNetwork(); manager.startNetwork()). Use a custom method for this behavior to be safe. Read my forum link.

RendezVous peers bootstrap the network and handle advertisements (peer/pipe/other advertisements).

Normally you need RDVs in Infrastructure mode (EDGE) and when your communication goes outside a LAN.

I don`t un destand what you mean by "advertisement browser". An application that joins the jxta network and monitors available advertisements published in the group? Or a local, offline, tool that enables browsing of the local cache of advertisements?

In any of the two cases, I can not help you with that because I did not need such a tool.

Good luck with your jxta experience and feel free to ask.

crabpot8
Offline
Joined: 2009-02-07

enygma,

Thanks for the answer on the first question, that makes more sense now. I guess i was confused because I just finished reading the JXTA docs, and I never picked up how to determine what network configuration you need. It seems simple to configure your peer with a certain mode, but how do you know if you want that peer to be a relay peer, or an edge peer, etc seems to be something that I missed entirely.

As for the browser, I meant online browser. I cannot seem to find one, so if I get decent at JXTA over the course of this project I may just make a simple one.

I am going to mark this as answered, because the bit I mentioned about how you know what to configure each peer as seems to be another topic. I would love to hear any advice you have on that, or check out any decent hyperlinks you may have.

Thanks,
crabpot