Skip to main content

Some questions about setAutoStart and connectToRendezVous

6 replies [Last post]
deniswsrosa
Offline
Joined: 2006-05-05

Hi all!!

I have some questions about connectToRendezVous and the setAutoStarT(true)

1) If i set the number of max clients to 5 in my single rendezvous and all my peers have the setAutoStart(True),
when the sixth peer connect, will some peer become a rdz? or this just happens when there is no rdz?

2) I have a rdz A and a lot of edge peers, if a peer edge B becomes to a rendezvous, will this RDZs peers able to communicate each other?
Because i think that two rendezvous without multicasting are just able to communicate if both have each other in its seeds list, even indirectly, is it right?

3)If i have a rdz peer A, and start a brand new rdz B, the peer B have A in its seeds list but A dont have B, need i call the method connectToRendezVous of A passing the advertisement of B to enable the communication between them?

ps: In this last case, to enable A and B communication, shall I start the peer B as edge, send a message to A to add B using connectToRendezVous and restart B as rdz? it works?

Tks a Lot!

Message was edited by: deniswsrosa

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
wayke
Offline
Joined: 2007-08-09

I think this is the case.

If the sixth peer(P6) online, and P6 can connet to the first RDV, it can known others 5 EDEG peers,But others are not immediately aware of his presence, so P6
will be auto start RendezVousSevice.If P6 started RendezVousSevice, it will PeerView to first RDV. also he can communicate to others 5 EDEG peers.

yasseen
Offline
Joined: 2009-05-31

Hi,

Sorry , I couldn't understand what are you going to accomplish in Q3.

Do you want to connect two Rdvs to each other ?

Y.

deniswsrosa
Offline
Joined: 2006-05-05

Yeah, but dinamically. I have a rendezvous A and i want start up a new rdz B that knows the IP Address of A, and them must be able to connect each other, but without using multicasting, and without restart A, is it possible?

yasseen
Offline
Joined: 2009-05-31

Yes you can .
do want the two rendezvouses at the same peer group.

1 start a peer (Edge) and check if there a rendezvous
2 if so , become a rendezvous and connect to rendezvous above (this is because you want two rendezvous)
3 if No, become a rendezvous

in the step (1) you need to count the rendezvouses if they 2 or more, remain an Edge peer.

- you don't need to set auto start , because you need check the exist rendezvous firstly.

=============

private void ConnectToRendezvous(PeerGroup peerGroup) throws Exception {
System.out.println("\nAttempting to connect to a RendezVous .. ");
rdv = peerGroup.getRendezVousService();

if (!rdv.isRendezVous() || !rdv.isConnectedToRendezVous()) {
System.out.println("\nIt is not a rendezvous and not connected to a rendezvous.. ");
MyNetworkManager.waitForRendezvousConnection(10000);
if (peerGroup.getRendezVousService().isConnectedToRendezVous()) {
System.out.println("\n\n You have been connected to a rendezvous successfully . ");
} else {
System.out.println("\nAttempting to create new rendezvous .. ");
rdv = peerGroup.getRendezVousService();

rdv.startRendezVous();
System.out.println("\n\nrendezvous has been created successfully . ");
}

System.out.println("\n\n ********* rendezvous *************");
System.out.println("1) Is it connected to a Rendezvous : " + peerGroup.getRendezVousService().isConnectedToRendezVous());
System.out.println("2) Is it a Redezvous : " + peerGroup.getRendezVousService().isRendezVous());
System.out.println("3) RendezVousStatus : " + peerGroup.getRendezVousService().getRendezVousStatus());
System.out.println("3) Has connected peers : " + peerGroup.getRendezVousService().getConnectedPeers().hasMoreElements());
System.out.println("\n********* rendezvous *************");

}

}
============

Just you to count the rendezvouses to be able making two rendezvouses in the same peer group.

Y.

yasseen
Offline
Joined: 2009-05-31

I suggest you to check to launch the the Edge peer and check if there a Rendezvous :
- if so , connect to that Rendezvous .
- if No , become a Rendezvous .

Regards

Y.

deniswsrosa
Offline
Joined: 2006-05-05

And about the question 3 ??? this really works?