Same PeerGroup, different networks
I've been trying to familiarize myself with JXTA for quite a time already, and I'm still not too sure how to "share" a group over different subnets.
The scenario is 3 machines (RDV, A, B) on different subnets, the RDV function is self-explanatory, I think (I just start it as rendezVous).
The other two machines connect to RDV, and successfully exchange basic information (no network boundaries issues).
What I want to do:
- Allow Peers to join the same PeerGroup from different subnets.
- I don't want to "create" a group if it's been already created, how can I guarantee that the group does not exist over the net with JXTA? Or at least, how can I guarantee that without knowledge I'll join the group if it exists, and if it doesn't, I'll just create it. The thing is I am trying to create a network where a Peer doesn't know if a group exists; if it exists it will join it, but if it doesn't, it will have to create (start) it.
What I wonder:
- I assume the NetPeerGroup is the same for any node in the world.
- I tried creating the same group independently in A and in B (same name, different PeerGroupID), the groups were created but it looks as if the result was two different PeerGroups (with the same name).
- I create the group in A, then discover and join it with B; however B doesn't seem to discover a cumstom advertisement from A. Do I have to propagate the adv thru the RDV manually? I thought the RDVs shared the PeerGroup advertisements among their members automatically.
- From what I read, for my application I won't be needing special group services (just a basic communication), so I've ignored the whole decent-group-joining parts (I don't create the peerGroups from scratch, but use the newGroup() method. I also ignored the authentication and credentials ways of joining a group, and also use the newGroup() method).
I think I'm lacking some basic concepts :)