Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 23

DISTRIBUTED SYSTEMS

Principles and Paradigms


Second Edition
ANDREW S. TANENBAUM
MAARTEN VAN STEEN

Chapter 5
Naming

Dr. Saeed Mahmud Ullah


Professor
EEE, DU
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Some Definitions
 Entity – just about any resource.
 Name – a string (often human-friendly) that refers
to an entity.
 Address – an entities “access-point”.
 A name for an entity that is independent of an
address is referred to as “location independent”.
 Identifier – a reference to an entity that is often
unique and never reused.
Names, Identifiers, and Addresses
Properties of a true identifier:
– An identifier refers to at most one entity.
– Each entity is referred to by at most one identifier.
– An identifier always refers to the same entity.
Locating Mobile Entities
 Tricky …
 Traditional naming services (DNS, X.500) are not
suited to environments where entities change location
(i.e., move).
 The assumption is that moves occur rarely at the
Global and Administrative layers, and when moves
occur at the Managerial layer, the entity stays within the
same domain.
 But, what happens if ftp.cs.vu.nl moves to
ftp.cs.unisa.edu.au?
Possible Solutions
 A record of the new address of the entity is stored in the
cs.vu.nl name server.
 A record of the name of the new entity is stored in the
cs.vu.nl name server (i.e., a symbolic link is created).
 Both “solutions” seem OK, until you consider what
happens when the entity moves again, then again, then
again …
 Consequently, both “solutions” can be shown to be
inefficient and unscalable.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Forwarding Pointers (1)

Figure 5-1. The principle of forwarding pointers


using (client stub, server stub) pairs.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Forwarding Pointers (2)

Figure 5-2. Redirecting a forwarding pointer by


storing a shortcut in a client stub.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Forwarding Pointers (3)

Figure 5-2. Redirecting a forwarding pointer by


storing a shortcut in a client stub.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Disadvantages of Forwarding Pointers
1. A chain can become very long, and the “lookup”
eventually becomes prohibitively expensive.
2. All the “intermediate locations” must maintain their
chains for “as long as needed” (however long that
is).
3. Big vulnerability: broken links. Break a link and a
forwarded entity is lost …
Home-Based Approaches

Figure 5-3. The principle of Mobile IP.


Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Problems with home-based
approach
 A drawback of the home-based approach is the use of a
fixed home location. So it must be ensured that the
home location always exists. Otherwise, contacting the
entity will become impossible.
 Problems are aggravated when a long-lived entity
decides to move permanently to a completely different
part of the network than where its home is located. In
that case, it would have been better if the home could
have moved along with the host.

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Distributed Hash Tables
General Mechanism

Figure 5-4.
Resolving key
26 from node 1
and key 12 from
node 28 in a
Chord system.

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Hierarchical Approaches
 In a hierarchical scheme, a network is divided into a
collection of domains.
 There is a single top-level domain that spans the entire
network.
 Each domain can be subdivided into multiple, smaller
subdomains.
 A lowest-level domain, called a leaf domain, typically
corresponds to a local-area network in a computer network
or a cell in a mobile telephone network.
 Each domain D has an associated directory node dir(D) that
keeps track of the entities in that domain.
 This leads to a tree of directory nodes.
 The directory node of the top-level domain, called the root
(directory) node, knows about all entities.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Hierarchical Approaches (1)

Figure 5-5. Hierarchical organization of a location service into


domains, each having an associated directory node.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Hierarchical Approaches (Looking up entity)

Figure 5-7. Looking up a location in a hierarchically


organized location service.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
 As is shown in Fig. 5-7, a client wishing to locate an entity E, issues a
lookup request to the directory node of the leaf domain D in which the
client resides.
 If the directory node does not store a location record for the entity, then the
entity is currently not located in D.
 Consequently, the node forwards the request to its parent. Note that the
parent node represents a larger domain than its child.
 If the parent also has no location record for E, the lookup request is
forwarded to a next level higher, and so on.
 As soon as the request reaches a directory node M that stores a location
record for entity E, we know that E is somewhere in the domain dom(M)
represented by node M.
 The lookup request is then forwarded to the directory node of that
subdomain, which in tum forwards it further down the tree, until the request
finally reaches a leaf node. The location record stored in the leaf node will
contain the address of E in that leaf domain. This address can then be
returned to the client that initially requested the lookup to take place.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

You might also like