Sei sulla pagina 1di 2

Locating Mobile Entities in distributed systems

Locating Mobile Entities:


Problem with the traditional naming service traditional naming services maintain a direct mapping between human firendly names and the addresses of entities. Each time a name or an address changes, the mapping needs to change as well.A solution to this problem is to separate naming from locating entities by introducing identifiers. When looking up an entity by means of a naming service, that service returns an identifier. Locating an entity is handled by means of a separate location service. A location service accepts an identifer as input, and returns the current address of the identified entity. 1. Broadcasting and Multicasting Broadcasting a message containing the identifier of the entity is broadcast to each machine and each machine is requested to check whether it has that entity. Only the machines that can offer an access point for the entity send a reply message containing the address of that access point. Advantage efficient method on small local area networks in which all machines are connected to a single cable. Disadvantage inefficient when network grows. Network bandwidth is wasted by request messages and too many hosts are interrupted by requests which they cannot answer. Multicasting only a restricted group of hosts receives the request message. Hosts can join a multicast group. Each multicast group is identified by a multicast address. 2. Forwarding Pointers When an entity moves from A to B, it leaves behind a reference to its new location at B. As soon as an entity has been locatedby using a traditional naming service, a client can look up the current address by following a chain of forwarding pointers. Advantage Simple to implement. Disadvantages 1. the chain can become so long that locating an entity is expensive. 2. all intermediate locations in chain will have to maintain their part of the chain of forwarding pointers as long as needed. 3. vulnerability to broken links. Example of Forwarding Pointers In case of distributed objects, each forwarding pointer is implemented as a (proxy, skeleton) pair.

A skeleton (i.e., the server-side stub) contains either a local reference to the actual object or a local reference to a proxy (i.e.,the client-side stub) for that object.Whenever an object moves from address space A to B, it leaves behind a proxy in its place in A and install a skeleton that refers to it in B.

The principle of forwarding pointers using (client stub, server stub) pairs.

3. Home-Based Approaches Another approach to supporting mobile entities in large-scale networks is to introduce a home location, which keeps track of the current location of an entity. Generally, the home location is often chosen to be the place where an entity was created. Example Mobile IP Each mobile host uses a fixed IP address. All communication to that IP address is initially directed to the mobile host's home agent, which is located on the same LAN. Whenever the mobile host moves to another network, it requests a temporary address that it can use for communication. Thiscare-of-address is registered at the home agent. Disadvantages 1. To communicate with a mobile entity, a client first has to contact the home, which may be at a completely different location than the entity itself. The result is an increase in communication latency. 2. Another drawback is this scheme uses a fixed home location.Hence it must be ensured that the home location always exists.Otherwise contacting the entity will become impossible.The home based approach can be seen as a two-tiered scheme. When setting up a connection to a mobile entity, a client firstchecks a local registry to see whether the mobile entity is available locally. If not, the entity's home location is contacted to find the current location.