Skip to main content

changing edge to RDV if there are no peer groups

2 replies [Last post]
synf
Offline
Joined: 2007-07-20
Points: 0

Hello,
I have written a small peer application which can either create a peer group or join a peer group. I have been trying to make it so that it starts as an edge peer and if the specified peer group does not exist, then it becomes the RVD peer and creates a peer group.

How do I use myDiscoveryService.getRemoteAdvertisements() to check to see if there are ANY remote advertisements of which mach the name I am searching for ?. When I call this it just seems to hang when I do not have a peer group already set up to join.
I want to be able to turn my edge peer into a RDV peer if there are no peer groups to connect to.
Is this done using DiscoveryService? If not, then what is the best way to do this?
Any help would be appreciated.

Thanks

Col'

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
dangar27
Offline
Joined: 2008-01-18
Points: 0

Hi synf.

As far as I understood JXTA, a node is not an EDGE or a RDV "in general", but associated to an specifig peergroup. I mean, the same node can be an EDGE in one group, and a RDV in another group.

In your case, if there are no peer groups to join, it means that you are only joined to the default peer group (called "NetPeerGroup" if I remember well). If you choose to become an RDV then, you will be a RDV of this group...

About DiscoveryService, it is associated to a peer group.

I hope I have helped a bit! Have a nice day!

synf
Offline
Joined: 2007-07-20
Points: 0

Hi dangar,
Thanks for taking the time to reply to my post.. I understand what you said fully, however it's not quite what I'm getting at.

Lets say I have a peer group called "myPeerGroup". It is created by my RDV peer in this case, then all of a sudden this peer group is killed, or shut down. Then some peer comes along to try and connect to "myPeerGroup" but it can't, because this peer group does not exist. I know I would join "NetPeerGroup" but that is not going to provide me with a service that "myPeerGroup" does.. so:

Does anyone know roughly how to make it so that when my peer sees that there is no group called "myPeerGroup", it creates a peer group called "myPeerGroup"?

Any help on this at all would be greatly appreciated.. even if there is a method I am missing somewhere that does this for me.

Thanks

Col'