Chapter 4 Naming
Chapter 4 Naming
4.1 Introduction
a name in a distributed system is a string of bits or characters
that is used to refer to an entity
an entity is anything; e.g., resources such as hosts, printers,
disks, files, objects, processes, users, Web pages,
newsgroups, mailboxes, network connections, ...
entities can be operated on
e.g., a resource such as a printer offers an interface
containing operations for printing a document, requesting
the status of a job, etc.
a network connection may provide operations for sending
and receiving data, setting quality of service parameters, etc.
to operate on an entity, it is necessary to access it through its
access point, itself an entity (special)
2
access point
the name of an access point is called an address
(such as IP address and port number as used by the
transport layer)
the address of the access point of an entity is also
referred to as the address of the entity
an entity may change its access point in the course of
time (e.g., a mobile computer getting a new IP
address as it moves)
an address is a special kind of name
it refers to at most one entity
each entity is referred by at most one address; even
when replicated such as in Web pages
separating the name of an entity and its address
makes it easier and more flexible; such a name is
called location independent
3
a true identifier is a name with
at most one entity
each entity is referred by at most one identifier
it always refers to the same entity (never reused)
identifiers allow us to unambiguously refer to an entity
examples
name of an FTP server (entity)
URL of the FTP server
address of the FTP server
IP number:port number
the address of the FTP
server may change
there are three classes on naming systems: flat naming,
structured naming, and attribute-based naming
4
4.2 Flat Naming
a name is a sequence of characters without structure; like
human names?
difficult to be used in a large system since it must be centrally
controlled to avoid duplication
moreover, it does not contain any information on how to
locate the access point of its associated entity
how are flat names resolved (or how to locate an entity when
a flat name is given)
name resolution: mapping a name to an address or an
address to a name is called name-address resolution
possible solutions: simple solutions, home-based
approaches, and hierarchical approaches
5
1. Simple Solutions
two solutions (for LANs only): Broadcasting and
b. Forwarding Pointers
how to look for mobile entities
when an entity moves from A to B, it leaves behind a
reference to its new location
advantage
simple: as soon as the first name is located using
traditional naming service, the chain of forwarding
pointers can be used to find the current address
drawbacks
the chain can be too long - locating becomes
expensive
all the intermediary locations in a chain have to maintain
their pointers
vulnerability if links are broken
hence, making
forwarding sure that
pointers chainsisare
are robust anshort and that
important issue 1
2. Home-Based Approaches
broadcasting and multicasting have scalability problems;
performance and broken links are problems in
forwarding pointers
a home location keeps track of the current location of an
entity; often it is the place where an entity was created
it is a two-tiered approach
an example where it is used in Mobile IP
each mobile host uses a fixed IP address
all communication to that IP address is initially directly
sent to the host’s home agent located on the LAN
corresponding to the network address contained in the
mobile host’s IP address
whenever the mobile host moves to another network, it
requests a temporary address in the new network
(called care-of-address) and informs the new address
to the home agent
11
when the home agent receives a message for the mobile host
(from a correspondent agent) it forwards it to its new
address (if it has moved) and also informs the sender the
host’s current location for sending other packets
10
3. Hierarchical Approaches
a generalization of the two-tiered approach into multiple
layers
a network is divided into a collection of domains, similar
to DNS
a single top-level domain spans the entire network
each domain can be subdivided into multiple, smaller
domains
the lowest-level domain is called a leaf domain; typically a
LAN
each domain D has an associated directory node dir(D)
that keeps track of the entities in that domain leading to a
tree of directory nodes
the root (directory) node knows about all entities
11
hierarchical organization of a location service into domains, each having an
associated directory node
12
each entity is represented by a location record in the
directory node dir(D) to keep track of its whereabouts
a location record for an entity in a leaf domain contains the
entity’s current address; all other high-level domains will
have only pointers to this address; this means the root node
will store only pointers to all entities
an entity may have multiple addresses, for instance, if it is
replicated; a higher level domain containing the two
subdomains where the entity has addresses will have two
pointers
13
an example of storing information of an entity having two addresses in
different leaf domains D1 and D2
14
example of a look up operation
a client (in Domain D) would like to locate an entity E
18
e.g., file naming in UNIX file system
a directory node represents a directory and a leaf node
represents a file
there is a single root directory, represented in the naming
graph by the root node
we have a contiguous series of blocks from a logical disk
the boot block is used to load the operating system
the superblock contains information on the entire file
system such as its size, etc.
inodes are referred to by an index number, starting at
number zero, which is for the inode representing the root
directory
given the index number of an inode, it is possible to access
its associated file
19
Name Resolution
given a path name, the process of looking up a name
stored in the node is referred to as name resolution; it
consists of finding the address when the name is given (by
following the path)
knowing how and where to start name resolution is referred
to as closure mechanism; e.g., UNIX file system
Linking
Linking: giving another name for the same entity (an alias)
e.g., environment variables in UNIX such as HOME that
refer to the home directory of a user
two types of links (or two ways to implement an alias):
hard link and symbolic link
hard link: to allow multiple absolute path names to
refer to the same node in a naming graph
e.g., in the previous graph, there are two different path
names for node n5: /keys and /home/steen/keys
20
symbolic link: representing an entity by a leaf node and
instead of storing the address or state of the entity, the
node stores an absolute path name
25
Item Global Administrational Managerial
26
Implementation of Name Resolution
recall that name resolution consists of finding the address
when the name is given
assume that name servers are not replicated and that no
client-side caches are allowed
each client has access to a local name resolver, responsible
for ensuring that the name resolution process is carried out
e.g., assume the path name
root:<nl, vu, cs, ftp, pub, globe, index.txt>
is to be resolved
or using a URL notation, this path name would correspond
to ftp://ftp.cs.vu.nl/pub/globe/index.txt
27
4.4 Attribute-Based Naming
flat naming: provides a unique and location-independent way
of referring to entities
structured naming: also provides a unique and location-
independent way of referring to entities as well as human-
friendly names
but both do not allow searching entities by giving a
description of an entity
in attribute-based naming, each entity is assumed to have a
collection of attributes that say something about the entity
then a user can search an entity by specifying (attribute, value)
pairs known as attribute-based naming
Directory Services
attribute-based naming systems are also called directory
services whereas systems that support structured naming
are called naming systems
28
how are resources described? one possibility is to use RDF
(Resource Description Framework) that uses triplets
consisting of a subject, a predicate, and an object
e.g., (person, name, Alice) to describe a resource Person
whose Name is Alice
or in e-mail systems, we can use sender, recipient, subject,
etc. for searching