Ch05 Naming
Ch05 Naming
Naming
Distributed Systems
(3rd Edition)
Essence
Names are used to denote entities in a distributed system. To operate on an
entity, we need to access it at an access point. Access points are entities that
Maarten van Steen Andrew S. Tanenbaum are named by means of an address.
Note
Chapter 05: Naming A location-independent name for an entity E, is independent from the
addresses of the access points offered by E.
Edited by: Hicham G. Elmongui
2 / 35
Naming: Names, identifiers, and addresses Naming: Flat naming Simple solutions
Identifiers Broadcasting
Pure name
A name that has no meaning at all; it is just a random string. Pure names can
be used for comparison only. Broadcast the ID, requesting the entity to return its current address
Can never scale beyond local-area networks
Identifier: A name having some specific properties Requires all processes to listen to incoming location requests
3 / 35 Broadcasting 4 / 35
Naming: Flat naming Simple solutions Naming: Flat naming Home-based approaches
Forwarding pointers 5 / 35 6 / 35
Naming: Flat naming Home-based approaches Naming: Flat naming Home-based approaches
3. Tunnel packet to
current location Note
Permanent moves may be tackled with another level of naming (DNS)
4. Send successive packets
to current location
Host's current location
7 / 35 8 / 35
Naming: Flat naming Distributed hash tables Naming: Flat naming Distributed hash tables
25 7
Nonsolution 24 8 1 11
Let each node keep track of its neighbor and start linear search along the ring.
2 11
23 3 14
Resolve k = 26 9 4 18
from node 1 5 28
22 10
1 28
Main Issue in DHT-based Systems 2
3
28
28
21 11 1
2
14
14
4 1
20 12 3 18
5 9
To Efficiently resolve a key k to the address of succ(k). 1 21 19 13
4
5
20
28
2 28 18 14
3 28 17 16 15 1 18
4 28 2 18
5 4 1 20 3 18
2 20 4 28
3 28 5 1
4 28
5 4
Naming: Flat naming Hierarchical approaches Naming: Flat naming Hierarchical approaches
Principle Storing information of an entity having two addresses in different leaf domains
The root directory Field with no data
Top-level
node dir(T) Field for domain
domain T Location record
dom(N) with
pointer to N for E at node M
Directory node M
dir(S) of domain S
A subdomain S
N
of top-level domain T
(S is contained in T)
Location record
with only one field,
containing an address
11 / 35 12 / 35
Naming: Flat naming Hierarchical approaches Naming: Flat naming Hierarchical approaches
Domain D
Insert
request
(a) (b)
Look-up
Domain D
request
13 / 35 14 / 35
Naming: Structured naming Name spaces Naming: Structured naming Name spaces
Note
A directory node contains a table of (node identifier, edge label) pairs.
15 / 35 16 / 35
Naming: Structured naming Name resolution Naming: Structured naming Name resolution
Closure mechanism: The mechanism to select the implicit context from which Soft link: Allow a node N to contain a name of another node
to start name resolution First resolve N’s name (leading to N)
[Link]: start at a DNS name server Read the content of N, yielding name
/home/maarten/mbox: start at the local NFS file server (possible recursive Name resolution continues with name
search)
0031 20 598 7784: dial a phone number Observations
[Link]: route message to a specific IP address
The name resolution process determines that we read the content of a
node, in particular, the name in the other node that we need to go to.
Note One way or the other, we know where and how to start name resolution
You cannot have an explicit closure mechanism – how would you start? given name
Naming: Structured naming Name resolution Naming: Structured naming The implementation of a name space
Naming: Structured naming The implementation of a name space Naming: Structured naming The implementation of a name space
1. [nl,vu,cs,ftp] 1. [nl,vu,cs,ftp]
Root
name server Root
2. #[nl], [vu,cs,ftp] 8. #[nl,vu,cs,ftp] name server 2. [vu,cs,ftp]
nl
3. [vu,cs,ftp] Name server
nl node 7. #[vu,cs,ftp] Name server
Client's 4. #[vu], [cs,ftp] nl node 3. [cs,ftp]
name vu Client's
resolver 5. [cs,ftp] Name server name
vu node resolver 6. #[cs,ftp] Name server
6. #[cs], [ftp] vu node 4. [ftp]
cs
7. [ftp] Name server
cs node 5. #[ftp] Name server
8. #[ftp] cs node
ftp
[nl,vu,cs,ftp] #[nl,vu,cs,ftp]
Nodes are [nl,vu,cs,ftp] #[nl,vu,cs,ftp]
managed by
the same server
Naming: Structured naming The implementation of a name space Naming: Attribute-based naming Directory services
Naming: Attribute-based naming Hierarchical implementations: LDAP Naming: Attribute-based naming Hierarchical implementations: LDAP
29 / 35 30 / 35
Naming: Attribute-based naming Hierarchical implementations: LDAP Naming: Attribute-based naming Decentralized implementations
Naming: Attribute-based naming Decentralized implementations Naming: Attribute-based naming Decentralized implementations
Drawbacks of distributed index Alternative: map all attributes to 1 dimension and then
index
Space-filling curves: principle
1 Map the N-dimensional space covered by the N attributes {a1 , . . . , aN }
into a single dimension
Quite a few 2 Hashing values in order to distribute the 1-dimensional space among
A query involving k attributes requires contacting k servers index servers.
Imagine looking up “lastName = Smith ∧ firstName = Pheriby ”: the client Hilbert space-filling curve of (a) order 1, and (b) order 4
may need to process many files as there are so many people named 1
“Smith.”
14/16
Index 1 Index 2
12/16
Values attribute #2
Values attribute #2
No (easy) support for range queries, such as “price = [1000 − 2500].” 10/16
8/16
6/16
4/16
0/16
0 1 0 2 4 6 8 10 12 14
16 16 16 16 16 16 16 16
(a) Values attribute #1 (b) Values attribute #1
Space-filling curve
Space-filling curves 35 / 35