Skip to main content

discovery and join

6 replies [Last post]
dit0
Offline
Joined: 2007-12-13
Points: 0

hey All,
I have some question,

I have read the programmers guide 2.3 for example join group, but it just for the peer that create the group it self, how about other peer send discovery request looking a group?? After find a group then that peer try to join it.
Any other command or could someone give some piece of code.

After a peer start the JXTA network and send discovery message to other peer using multicast and to rendezvous that connected to it.And for example find a group then join it, if that peer send discovery message , what kind of scope that discovery messages send ?? multicast to other peer that located in the same subnet and rendezvous or just to the peers that located in same peergroup?

thanks

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
adamman71
Offline
Joined: 2007-01-31
Points: 0

If your peer has found some rendezvous for the group it belongs to, the discovery message will be propagated to these rendezvous, which will propagate it to other peers and rendezvous they know, until the time to live of the query reaches 0.

If you are on your LAN and nobody else is running JXTA, there you will most probably not find anyone else. The solution is to add seeds (there is a thread about this on this site). If your peer is a rendezvous, it will propagate the message to the peers it knows.

Hope it helps,

J.

dit0
Offline
Joined: 2007-12-13
Points: 0

Hi Adammand71,
Thanks for the reply.

Could you explain to me more clearly about :
" If your peer has found some rendezvous for the group it belongs to ", sorry my english is bad.so i don't enough understand it

If the peer being set up to use seeds rendezvous, it will try to connect to that rendezvous define in seeds right??? so the rendezvous peer will store the peer info that connected with it to it local system. So that peer and rendezvous peer know each other??? am i right??

What about join?? do you know how i solve my problem??
How long the default time to live of discovery request??

thanks

adamman71
Offline
Joined: 2007-01-31
Points: 0

When you connect to JXTA, you always do so via a peer group. There is a fundamental peer group called the net peer group. That is the group you will automatically connect to if you don't specify any other before starting the JXTA network.

A rendezvous peer is a facilitator for a given peer group. If you provide seeds rendezvous for the net peer group and you are connected via the net peer group, then yes, your peer will try to connect to one of these rendezvous if you ask him to wait for a rendezvous.

You don't need to worry about joining a peer group, unless some access restrictions have been set. That is not the case with the net peer group.

About TTL, see the javadoc for the getRemoteAdvertisements() method, more specifically, the threshold parameter. If you set the advertisement type to PEER and the threshold to 0, it means that any peer receiving your query should provide an answer.

J.

hamada
Offline
Joined: 2003-06-12
Points: 0

just a general note on the developer guide. You should avoid reading the outdated developer guide and stick with the latest, currently 2.5.

dit0
Offline
Joined: 2007-12-13
Points: 0

Thank you for the attention,

But I think jxta 2.3 guide can explain more details for newbie like me, i am also read the guide 2.5 version too by the way. I read the 2.3 looking for example about join a peer group, it provide in jxta 2.3 guide and i can understand it but the example only explain the peer that create the group it self and join in it,

How about other peer try to join that group after discovery peer group??? the example code in 2.3 guide
:
"private void joinGroup(PeerGroup grp)
{
System.out.println("Joining peer group...");"

using peer group grp for variabel, but the result of discovery is advertisement,

sorry if my question is simple

thanks

dit0
Offline
Joined: 2007-12-13
Points: 0

Hey,
Is there someone can give some light?