DS Lecture Chapter 5
DS Lecture Chapter 5
Chapter 5: Naming
March 14, 2020
Fuad Yimer
Naming Entities Names, Identifiers, and Addresses
2 / 52
Naming Entities Names, Identifiers, and Addresses
we discuss how
human friendly names are organized and implemented; e.g., those for file
systems and the WWW
classes on naming systems
Flat naming
Structured naming, and
Attribute-based naming
3 / 52
Naming Entities Names, Identifiers, and Addresses
4 / 52
Naming Entities Names, Identifiers, and Addresses
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 can have more than one access point (similar to accessing an
individual through different telephone numbers)
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)
5 / 52
Naming Entities Names, Identifiers, and Addresses
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
7 / 52
Flat Naming Introduction
Introduction
8 / 52
Flat Naming Simple Solutions
Simple solutions
Two solutions for LANs: Broadcasting and Multicasting, and Forwarding
Pointers
Broadcasting and Multicasting
A computer that wants to access another computer for which it knows its IP
address broadcasts this address
The owner responds by sending its Ethernet address
Used by ARP (Address Resolution Protocol) in the Internet to find the data link
address (MAC address) of a machine
Broadcasting is inefficient when the network grows (wastage of bandwidth and
too much interruption to other machines)
Multicasting is better when the network grows - send only to a restricted group
of hosts
Multicasting can also be used to locate the nearest replica - choose the one
whose reply comes in first
9 / 52
Flat Naming Simple Solutions
Simple solutions
Forwarding Pointers
How to look 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 sure that chains are short and that forwarding pointers are robust
is an important issue.
10 / 52
Flat Naming Home-Based Approaches
Home-based approaches
Broadcasting and multicasting have scalability problems; performance
problems 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 hosts
home agent located on the LAN corresponding to the network address
contained in the mobile hosts 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
When the home agent receives a message for the mobile host it forwards it
to its new address and also informs the sender the hosts current location
for sending other packets
11 / 52
Flat Naming Home-Based Approaches
Home-based approaches
Host's home
location 1. Send packet to host at its home
2. Return address
of current location
Client's
location
3. Tunnel packet to
current location
Problem
Creates communication latency
The host is unreachable if the home does no more exist (permanently changed); the
solution is to register the home at a traditional name service 12 / 52
Flat Naming Hierarchical Location Services
13 / 52
Flat Naming Hierarchical Location Services
Directory node
dir(S) of domain S
A subdomain S
of top-level domain T
(S is contained in T)
Location record
with only one field,
containing an address
Domain D1
Domain D2
15 / 52
Flat Naming Hierarchical Location Services
Basic principles
Start lookup at local leaf node
Node knows about E ⇒ follow downward pointer, else go up
Upward lookup always stops at root
Node knows
about E, so request
Node has no is forwarded to child
record for E, so
that request is M
forwarded to
parent
Look-up
Domain D
request
16 / 52
Flat Naming Hierarchical Location Services
Consider an entity E that has created a replica in leaf domain D for which it
needs to insert its address.
- (a) An insert request is forwarded to the first node that knows about entity E.
- (b) A chain of forwarding pointers to the leaf node is created.
Node knows
Node has no about E, so request
record for E, is no longer forwarded
so request is Node creates record
forwarded and stores pointer
to parent M
M
Node creates
record and
stores address
Domain D
Insert
request
(a) (b)
17 / 52
Flat Naming Hierarchical Location Services
Another solution is Distributed Hash Tables (DHT) read pages 188 - 191
18 / 52
Structured Naming Name space
Name Spaces
Name space
Name Graph
Names may have an internal structure that represents their position in a hierarchical
name space.
A (hierarchical) name space can be represented as a labeled, directed graph (naming
graph) with two types of nodes.
A leaf node represents a (named) entity.
A directory node an entity that refers to other nodes; it stores a directory table of
(edge label, node identifier) pairs.
Data stored in n1 n0
n2: "elke" home keys
n3: "max"
n4: "steen" "/keys"
n1 n5
"/home/steen/keys"
elke steen
max
n2 n3 n4 keys
Leaf node
.twmrc mbox
Directory node
"/home/steen/mbox"
Name space
Path Names
Each path in a naming graph can be referred to by the sequence of labels corresponding
to the edges in that path, such as
N: <label-1, label-2, , label-n>
where N refers to the first node in the path.
The sequence of labels is called path name.
If the first node in a path name is the root of the naming graph, it is called absolute
path name.
Otherwise, it is called relative path name.
Attributes
We can easily store all kinds of attributes in a node, describing aspects of the entity the
node represents:
type of the entity
An identifier for that entity
Address of the entitys location, etc.
Directory nodes can also have attributes, besides just storing a directory table with (edge
label, node identifier) pairs.
21 / 52
Structured Naming Name resolution
Name resolution
A closure mechanism may also determine how name resolution should proceed.
22 / 52
Structured Naming Name resolution
Hard Link
A name that is resolved by following a specific path in a naming graph from one node to
another.
Allow Multiple absolute path names refer to the same node in a naming graph.
e.g., there are two different path names for node n5: /keys and /home/steen/keys
23 / 52
Structured Naming Name resolution
elke steen
max
n2 n3 n4
Data stored in n6
Leaf node
.twmrc mbox keys "/keys"
Directory node
n6 "/home/steen/keys"
When first resolving an absolute path name stored in a node (e.g., /home/steen/keys in
node n6), name resolution will return the path name stored in the node (/keys), at which
point it can continue with resolving that new path name 24 / 52
Structured Naming Name Space Implementation
Name-space implementation
25 / 52
Structured Naming Name Space Implementation
26 / 52
Structured Naming Name Space Implementation
Global
layer gov mil org net
com edu jp us
nl
pc24
robot pub
globe
Mana-
gerial
layer Zone
index.txt
27 / 52
Structured Naming Name Space Implementation
28 / 52
Structured Naming Name Space Implementation
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
Assume that the (absolute) path name
root: <nl, vu, cs, ftp, pub, globe, index.txt> is to be resolved.
Using URL notation, this path would correspond to
ftp://ftp.cs.vu.nl/pub/globe/index.txt
29 / 52
Structured Naming Name Space Implementation
Resolution
Mapping a name to an address or an address to a name is called
name-address resolution
Resolver
A host that needs to map an address to a name or a name to an address
calls a DNS client named a resolver
The resolver accesses the closest DNS server with a mapping request
If the server has the information it satisfies the resolver; otherwise, it either
refers the resolver to other servers (called Iterative Resolution) or asks
other servers to provide the information (called Recursive Resolution)
30 / 52
Structured Naming Name Space Implementation
ftp
<nl,vu,cs,ftp> #<nl,vu,cs,ftp>
Nodes are
managed by
the same server
31 / 52
Structured Naming Name Space Implementation
ftp
<nl,vu,cs,ftp> #<nl,vu,cs,ftp>
Nodes are
managed by
the same server
32 / 52
Structured Naming Name Space Implementation
1. <nl,vu,cs,ftp>
Root
8. #<nl,vu,cs,ftp> name server 2. <vu,cs,ftp>
<nl,vu,cs,ftp> #<nl,vu,cs,ftp>
33 / 52
Structured Naming Name Space Implementation
<nl,vu,cs,ftp> #<nl,vu,cs,ftp>
34 / 52
Structured Naming Name Space Implementation
35 / 52
Structured Naming Name Space Implementation
recursive name resolution of <nl, vu, cs, ftp>; name servers cache
intermediate results for subsequent lookups
36 / 52
Structured Naming Name Space Implementation
Long-distance communication
The comparison between recursive and iterative name resolution with respect to
communication costs
Method Advantage(s)
Recursive Less Communication cost; Caching is more effective)
Iterative Less performance demand on name servers ) 37 / 52
Structured Naming The Domain Name System (DNS)
38 / 52
Structured Naming The Domain Name System (DNS)
40 / 52
Structured Naming The Domain Name System (DNS)
Domain
A domain is a subtree of the domain name space
The name of the domain is the domain name of the node at the top of the
subtree
The Internet is divided into over 200 top-level domains; each partitioned
into subdomains, ... ; the leaves represent domains that have no
subdomains; a leaf domain may contain a single host or represent a
company and contain thousands of hosts
41 / 52
Structured Naming The Domain Name System (DNS)
42 / 52
Structured Naming The Domain Name System (DNS)
Zones
What a server is responsible for, or has authority over, is called a zone;
zones are nonoverlapping
The server makes a database called a zone file and keeps all the
information for every node under that domain
It can divide its domain into subdomains and delegate part of its authority
to other servers
43 / 52
Structured Naming The Domain Name System (DNS)
Attribute-Based Naming
47 / 52
Attribute-Based Naming Attribute-Based Naming
Attribute-Based Naming
49 / 52
Attribute-Based Naming X.500 Directory Service
50 / 52
Attribute-Based Naming X.500 Directory Service
Any Question ?
51 / 52