Question

I don't quite understand about the Dynamic Discovery of hosts concept. Should I understand as client applications can contact any available host without keeping their ip addresses? It sounds weird to me. And does Java RMI support that technique? and How?
Can anyone please explain it to me ? I'm confused about the definitions I got from google.
Thank you very much.

Was it helpful?

Solution

Here is some scenario:

Hosts: A, B, C, D, E, F, G

Your application knows only node (server) A.

So your application asks A to join the net. And after A verifies your application to be allowed to and able to join the net tells your application all about B, C, D, E, F, G.

Also the server A tells all the other nodes about your application joining the net.

After this simple routine all hosts know about your application and your application knows about all the hosts.

Now lets say Bobs application is also joinging the network asking sever E to join. Bobs application learns all about the other hosts A, B, C, D, F, G. And E tells Bobs application about your application.

But then there is this message (or event) distribution system your application listens to and E just publish a message that Bobs application joined. Since your application listens to this kind of messages your application learns that Bobs application has also joined.

After some time server D crashed. Since the hosts A, B, C, E, F, G constantly listens to messages of D they notice that D is not sending any messages any more. So they send messages telling everyone listening that D has left the network.

After a short periode D recovered and rejoined the network... .

Thats basically all that is important about dynamic discovery of hosts.

There are a bunch (at least one) of servers, you only know one or more (at least 3 are mostly recommanded if one has crashed and is recovering) and asks to join and to get some more information about other hosts. Then your application listens to status informations or is requesting one of the server to keep your application informed about the events of joining and leaving of servers from the logical network.

The original RMI concept did not support this back in the old days, but their should be solutions about this around these days.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top