Skip to main content

what mode to use for peers in a custom jxta netgroup

3 replies [Last post]
leben_leben
Offline
Joined: 2007-06-11

hi,

i'm working on a audio/video streaming project with some friends and the basic network communication will be done using jxta. we set up our own jxta netgroup and will provide our own public rendezvous server. so far so good :)

the server will run using rdv_server (and maybe relay_server).

but i'm still thinking about the other peers running our application. so i got a few questions:

1) what will be the best mode/configuration for the maximum of discovery results?
i thought about setting them all as .setMode(EDGE_NODE + RDV_SERVER);
but in that case they'll ignore our public rdv.. won't they?

2) what about setAutoStart(true)? or just checking if in a predefined time interval if a peer is connected to a rendezvous.. and if not.. become one itself.

3) and how do rendezvous peers interconnect? is this done automatically?

4) is there a way to determine whether there's a rendezvous on a local subnet or not?
so that if there's already a rendezvous peer on a local subnet the other peers on this subnet just start as e.a. edge peer and connect to the public rdv and the one on their local net.

i attached a jpeg showing the network architecture i thought of.... so maybe someone can tell me what modes should be set for the peers. best would be one configuration for all peers that will work in every scenario. and each peer for sure knows the public rdv-server by setting addRdvSeedingURI and providing the public servers address.

any help would be really great. thanks a lot.

best wishes,
.gert

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
asghar
Offline
Joined: 2005-07-26

Hi leben-leben,

Wie geht´s?

Each JXTA network has at last [b]ONE[/b] rendezvous. It’s a requirement of JXSE Specification. This means: When a (JXSE driven) peer starts, it looks if it’s peer group already has a rendezvous. If not, itself becomes auto. a rendezvous.

We should know, that not only rendezvous points to network resource. Also each peer does it for other peers, belonging to it’s peer group.

[b]Note[/b]: Discovered adverts are cached and cache is used, when seeking for network resource (I think before sending [b]ANY[/b] QuesryMessage to the net)

… maybe better, if you use the JXSE 2.4.1….

Grüße aus Bonn,
Asghar

leben_leben
Offline
Joined: 2007-06-11

hey asghar,
and thanks a lot for the reply..
by the way.. i'm fine.. :)

regarding that rendezvous thing... what i didn't understand so far is the following:

i will provide one seed rendezvous server. if another rdv-node goes online that also knows the "central" rdv.. do i need to register that node manually in the central (seed) rdv or is this done automatically?

and in succession to this.. when an edge node that also know the seed rdv is looking for an advertisment that is not cached in the seed rdv will the seed rdv automatically forward the request to other rdv nodes that are on the same network?

maybe someone can give me some more information on that peerview or better rendezvous peerview thing. is this this some internal implementation for managing this message and request propagation and forwarding or do i need to get my hands on that to make it work?

during testing with one edge peer and von rendezvous server if recognized that the rdv got an rdvadvertisement what seems to be created when calling startRendezvous() from the rendezvouservice. but i can't discover it on the edge peer unless it is connected to the rendezvous peer. even if both peers are on the same subnet.

and one more thing :)... any hints what to do with the RdvConfigAdv or finding out if there is a rendezvous node on the [i]local[/i] subnet?

thanks a lot.

cheers,
.gert

leben_leben
Offline
Joined: 2007-06-11

i decided to start all my peers as edge-peers in the default configuration providing our public rdv-server using [i]config.addRdvSeedingURI(..)[/i]

now each per should check if there already is a rdv-peer on the local subnet. so each per is looking for a RdvAdvertisement. If it can't find one.. be the rdv-peer itself and publish RdvAdvertisment:

RdvAdv rdvAdv = (RdvAdv)AdvertisementFactory.newAdvertisement(RdvAdv.getAdvertisementType());
rdvAdv.setGroupID(netPeerGroup.getPeerGroupID());
rdvAdv.setPeerID(netPeerGroup.getPeerID());
rdvAdv.setName("RendevouzPeer:"+netPeerGroup.getPeerID().toString());
rdvAdv.setRouteAdv(EndpointUtils.extractRouteAdv(netPeerGroup.getPeerAdvertisement())); rdvAdv.setServiceName("RendevouzService:"+netPeerGroup.getPeerID().toString());
try {
discovery.publish(rdvAdv);
} catch (IOException e) {
e.printStackTrace();
}

so.. discovering an already published rdvadv isn't the problem... but what to do if a peer found one? what is the right way to connect to a RDV-Peer whose advertisement another peer has discovered?

using the "connectToRendezVous(..) is deprecated with the hint to use the mechanisms provided by rdvconfigadv... but i don't know how...

i do really hope that someone can give me any hints about this topic.
maybe important.. i'm using jxta 2.5 rc1

best wishes,
.gert