Skip to main content

World peergroup or Net peergroup?

2 replies [Last post]
fabiendupre
Offline
Joined: 2008-01-04

Hello everybody,

Something I don't understand in the MultiNetGroupLauncher sample:
As the name says it's suppose to launch multiple NetGroup but is that:

1)One WorldGroup with 4 NetGroup?
2)4 WorldGroup with one NetGroup?
3)Something else?!

I don't understand because in the console it says :

Parent : urn:jxta:jxta-WorldGroup "World PeerGroup"[1] for the WorldGroup
JXTA World Peer Group : urn:jxta:jxta-WorldGroup "World PeerGroup"[1] started!

Parent : urn:jxta:jxta-WorldGroup "World PeerGroup"[2] for cluster1
Peer Group : urn:jxta:uuid-... "NetPeerGroup"[1] / urn:jxta:jxta-WorldGroup "World PeerGroup"[2] started!
...
Parent : urn:jxta:jxta-WorldGroup "World PeerGroup"[5] for cluster4
Peer Group : urn:jxta:uuid-... "NetPeerGroup"[1] / urn:jxta:jxta-WorldGroup "World PeerGroup"[5] started!

But at the same time the code seems to create one WorldGroup divided in 4 parts...

If someone can explain me he'll be very welcome! A scheme or whatever.

PS: I tried to modify the startJXTA function by putting "net" and "Net" instead of "world" and "World" in the functions but the result doesn't help me to understand...

Any idea?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
bondolo
Offline
Joined: 2003-06-11

> Hello everybody,
>
> Something I don't understand in the
> MultiNetGroupLauncher sample:
> As the name says it's suppose to launch multiple
> NetGroup but is that:
>
> 1)One WorldGroup with 4 NetGroup?

It's this option. All 4 of the net group instances share a single World Peer Group instance.

> I don't understand because in the console it says :

> But at the same time the code seems to create one
> WorldGroup divided in 4 parts...

It's actually that WorldPeerGroup is the common parent for all 4. They share the world peer group. The idea behind multiple net peer groups is similar to IP multi-homing. You give one physical network (the world peer group) several separate addresses (net peer groups).

fabiendupre
Offline
Joined: 2008-01-04

Thank you so much for your answer Bondolo, it's perfect.