Skip to main content

Some JXTA conceptual Questions

1 reply [Last post]
newaz_polimi
Offline
Joined: 2008-12-22

Hi, I have some clarification in these topics.

1) Do I need to have a RDV peer for communication(MultiCast) inside a LAN ?

2) Here is a scenario:
a) I need to have multiple groups inside a LAN .
b) A user connects to JXTA network and search for existing group. He can join or create his own group.

Since the task is to multicast msg inside each group , Do I need to centralize the group with a RDV peer or just join a group and multicast msg.

and, in order to keep track of all the groups I have the following code:

PeerGroup newGroup = netPeerGroup.newGroup(myID,adv,"Drawing Pictures","");
PeerGroup newGroup2 = netPeerGroup.newGroup(myID2,adv,"Drawing Shapes","");

newGroup.startApp(new String[0]);
newGroup2.startApp(new String[0]);

//and to get all the peer groups:

DiscoveryService discovery = netPeerGroup.getDiscoveryService();
Enumeration enumeration =null;

enumeration = discovery.getLocalAdvertisements(discovery.GROUP, null, null );

while(enumeration.hasMoreElements()) {
System.out.println("Peer group ID retrieved is : " + ((PeerGroupAdv) enumeration.nextElement()).getPeerGroupID() );

}

But, I need have all the PeerGroup Objects under NetPeerGroup. How Can I get all the PeerGroup Objects so that i can identify them with name and object ?

May be i need those PeerGroups to make seperate Multicast socket server for each group.

please, teach me some solutions. 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

1. IP Multicasting communication on a LAN does not require a RDV.

2. I believe you are talking about JXTA Socket Multicasting. In theory, RDV are used to propagate JSM messages beyond the LAN. Now since you are working on the LAN only and that peers can see each other on that LAN, you might be able to get rid of the RDV (this would have to be tested, because I am sure that developers have not implement JXTA/JXSE in order to operate that way; if it works, this is an accident). I would not recommend such practice. Let your peers become RDV automatically if necessary.

3. Yes, if and only if your new peergroups have the netpeergroup as a parent.

4. "But, I need have all the PeerGroup Objects under NetPeerGroup. How Can I get all the PeerGroup Objects so that i can identify them with name and object ?" -> PeerGroup advertisements have a 'name' field. This is where you could set/find your peergroup name.

Cheers,

J.