naming - distributed systems...2. forwarding pointers forwarding pointers enables locating mobile...
TRANSCRIPT
![Page 1: Naming - Distributed Systems...2. Forwarding Pointers Forwarding Pointers enables locating mobile entities Mobile entities move from one access point to another When an entity moves](https://reader030.vdocuments.us/reader030/viewer/2022033122/5e7bf5b09c2eda671413d130/html5/thumbnails/1.jpg)
NamingDistributed Systems IT332
![Page 2: Naming - Distributed Systems...2. Forwarding Pointers Forwarding Pointers enables locating mobile entities Mobile entities move from one access point to another When an entity moves](https://reader030.vdocuments.us/reader030/viewer/2022033122/5e7bf5b09c2eda671413d130/html5/thumbnails/2.jpg)
Outline…
Names, Identifier, and Addresses
Flat Naming
Structured Naming
2
![Page 3: Naming - Distributed Systems...2. Forwarding Pointers Forwarding Pointers enables locating mobile entities Mobile entities move from one access point to another When an entity moves](https://reader030.vdocuments.us/reader030/viewer/2022033122/5e7bf5b09c2eda671413d130/html5/thumbnails/3.jpg)
Names, Addresses and Identifiers
A name is used to refer to an entity
An address is a name that refers to an access point of an entity An entity may have multiple access points and addresses
Identifiers are used to uniquely identify an entity. An identifier is a namewith the following properties 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 (i.e., it is Never reused)
Name resolution maps a name to its address Name resolution is performed by a naming system
In a distributed system, a naming system is itself distributed
3
![Page 4: Naming - Distributed Systems...2. Forwarding Pointers Forwarding Pointers enables locating mobile entities Mobile entities move from one access point to another When an entity moves](https://reader030.vdocuments.us/reader030/viewer/2022033122/5e7bf5b09c2eda671413d130/html5/thumbnails/4.jpg)
Naming Systems
A naming system is simply a middleware that assists in nameresolution
Naming systems are classified into three classes based on thetype of names used:
Flat naming
Structured naming
Attribute-based naming
4
![Page 5: Naming - Distributed Systems...2. Forwarding Pointers Forwarding Pointers enables locating mobile entities Mobile entities move from one access point to another When an entity moves](https://reader030.vdocuments.us/reader030/viewer/2022033122/5e7bf5b09c2eda671413d130/html5/thumbnails/5.jpg)
Flat Naming
Flat names are fixed size bit strings Can be efficiently handled by machines
Identifiers are flat names
Flat name does not contain any information on how to locate an entity
How to resolve flat names? Broadcasting
Forwarding pointers
Home-based approaches: Mobile IP
Distributed Hash Tables: Chord
5
![Page 6: Naming - Distributed Systems...2. Forwarding Pointers Forwarding Pointers enables locating mobile entities Mobile entities move from one access point to another When an entity moves](https://reader030.vdocuments.us/reader030/viewer/2022033122/5e7bf5b09c2eda671413d130/html5/thumbnails/6.jpg)
1. Broadcasting
Approach: Broadcast the identifier to the complete network. The entityassociated with the identifier responds with its current address
Example: Address Resolution Protocol (ARP) Resolve an IP address to a MAC address.
In this application, IP address is the identifier of the entity
MAC address is the address of the access point
Challenges: Not scalable in large networks
This technique leads to flooding the network with broadcast messages
Requires all entities to listen to all requests
Who has the identifier 192.168.0.1?
I am 192.168.0.1. My address is 02:AB:4A:3C:59:85
6
![Page 7: Naming - Distributed Systems...2. Forwarding Pointers Forwarding Pointers enables locating mobile entities Mobile entities move from one access point to another When an entity moves](https://reader030.vdocuments.us/reader030/viewer/2022033122/5e7bf5b09c2eda671413d130/html5/thumbnails/7.jpg)
2. Forwarding Pointers
Forwarding Pointers enables locating mobile entities Mobile entities move from one access point to another
When an entity moves from location A to location B, it leaves behind (in A)a reference to its new location at B
Name resolution mechanism Follow the chain of pointers to reach the entity
Update the entity’s reference when the present location is found
Challenges: Long chains lead to longer resolution delays
Long chains are prone to failure due to broken links
7
![Page 8: Naming - Distributed Systems...2. Forwarding Pointers Forwarding Pointers enables locating mobile entities Mobile entities move from one access point to another When an entity moves](https://reader030.vdocuments.us/reader030/viewer/2022033122/5e7bf5b09c2eda671413d130/html5/thumbnails/8.jpg)
3. Home-based approaches
Each mobile entity has a fixed IP address (home address) Entity’s home address is registered at a naming service
Home node keeps track of current address of the entity (care‐of address)
Entity updates the home about its current address (care‐of address) whenever it moves
Name resolution Client contacts the home to obtain the current address
Client then contacts the entity at the current location
Challenges: Home address is permanent for an entity’s lifetime
If the entity permanently moves, then a simple home-based approach incurs highercommunication overhead
Poor geographical scalability
Consider the scenario where the clients are nearer to the mobile entity than the home entity
8
![Page 9: Naming - Distributed Systems...2. Forwarding Pointers Forwarding Pointers enables locating mobile entities Mobile entities move from one access point to another When an entity moves](https://reader030.vdocuments.us/reader030/viewer/2022033122/5e7bf5b09c2eda671413d130/html5/thumbnails/9.jpg)
3. Home-based approaches –An example
9
![Page 10: Naming - Distributed Systems...2. Forwarding Pointers Forwarding Pointers enables locating mobile entities Mobile entities move from one access point to another When an entity moves](https://reader030.vdocuments.us/reader030/viewer/2022033122/5e7bf5b09c2eda671413d130/html5/thumbnails/10.jpg)
4. Distributed Hash Table (DHT): Chord
Every node is assigned a random m‐bit identifier
Every entity is assigned a unique m‐bit key
Entity with key k falls under jurisdiction of node with the smallest identifierid ≥ k , denoted as succ(k)
How to resolve a key k to the address of succ(k)? Each node p maintains a finger table with at most m entries, value of the ith
entry is FTp[i]= succ(p+2i‐1)
To look up a key k, node p forwards the request to node q with index jwhere q = FTp[j] ≤ k < FTp[j+1]
If p < k < FTp[1], the request is forwarded to FTp[1]
A lookup requires O(logN) steps, where N is number of nodes in the system.
10
![Page 11: Naming - Distributed Systems...2. Forwarding Pointers Forwarding Pointers enables locating mobile entities Mobile entities move from one access point to another When an entity moves](https://reader030.vdocuments.us/reader030/viewer/2022033122/5e7bf5b09c2eda671413d130/html5/thumbnails/11.jpg)
Name Resolution in Chord –An example
11
![Page 12: Naming - Distributed Systems...2. Forwarding Pointers Forwarding Pointers enables locating mobile entities Mobile entities move from one access point to another When an entity moves](https://reader030.vdocuments.us/reader030/viewer/2022033122/5e7bf5b09c2eda671413d130/html5/thumbnails/12.jpg)
Exploiting Network Proximity in Chord
The logical organization of nodes in the overlay network may lead toinefficient message transfers in the underlying Internet Node k and node succ(k +1) may be far apart
Chord can be optimized by considering the network location of nodes Topology-aware Node Assignment
Two nearby nodes have identifiers that are close to each other
Proximity Routing Each node q maintains ‘r’ successors for ith entry in the finger table
To forward the lookup request, pick one of the r successors closest tothe node q
12
![Page 13: Naming - Distributed Systems...2. Forwarding Pointers Forwarding Pointers enables locating mobile entities Mobile entities move from one access point to another When an entity moves](https://reader030.vdocuments.us/reader030/viewer/2022033122/5e7bf5b09c2eda671413d130/html5/thumbnails/13.jpg)
Structured Naming
Flat names are difficult for humans to remember
Human‐friendly names are structured names composed ofseveral parts
Example: file names, host names
/home/userid/work/dist-systems/naming.txt
www.ksu.edu.sa
How to locate an entity given its human‐friendly name?
13
![Page 14: Naming - Distributed Systems...2. Forwarding Pointers Forwarding Pointers enables locating mobile entities Mobile entities move from one access point to another When an entity moves](https://reader030.vdocuments.us/reader030/viewer/2022033122/5e7bf5b09c2eda671413d130/html5/thumbnails/14.jpg)
Name Spaces
Structured Names are organized into name spaces
A structured name space is represented as a labeled directed graphwith two types of nodes A leaf node represents a named entity and stores information about the
entity
A directory node stores a directory table of (edge label, node ID) pairs
14
![Page 15: Naming - Distributed Systems...2. Forwarding Pointers Forwarding Pointers enables locating mobile entities Mobile entities move from one access point to another When an entity moves](https://reader030.vdocuments.us/reader030/viewer/2022033122/5e7bf5b09c2eda671413d130/html5/thumbnails/15.jpg)
Name Spaces
A path name is used to refer to a node in the graph
A path name is a sequence of edge labels leading from one node toanother An absolute path name starts from the root node (e.g.,
/home/steen/mbox)
A relative path name does not start at the root node (e.g., steen/mbox)
15
![Page 16: Naming - Distributed Systems...2. Forwarding Pointers Forwarding Pointers enables locating mobile entities Mobile entities move from one access point to another When an entity moves](https://reader030.vdocuments.us/reader030/viewer/2022033122/5e7bf5b09c2eda671413d130/html5/thumbnails/16.jpg)
Aliasing
Aliasing: an entity may be reachable by multiple paths and therefore is named by multiplepath names
When multiple path names refer to the same node, these path names are called hard linksto the node. E.g., path names/keys and /home/steen/keys are hard links to node n5 (seegraph on previous slide)
A symbolic link occurs when a leaf node holds a path name that refers to another nodeE.g., the path name /home/steen/keys is a symbolic link to node n5 (see graph below)
16
![Page 17: Naming - Distributed Systems...2. Forwarding Pointers Forwarding Pointers enables locating mobile entities Mobile entities move from one access point to another When an entity moves](https://reader030.vdocuments.us/reader030/viewer/2022033122/5e7bf5b09c2eda671413d130/html5/thumbnails/17.jpg)
Name Resolution
The process of looking up a name is called Name Resolution
Resolving a name in a name space results in a reference to the nodereferred to by that name
Name resolution is performed by traversing the graph
Knowing how and where to start name resolution is referred to as aclosure mechanism
Keep a reference to the root node for dealing with absolute path names
Keep a reference to the current directory node for dealing with relativepath names
17
![Page 18: Naming - Distributed Systems...2. Forwarding Pointers Forwarding Pointers enables locating mobile entities Mobile entities move from one access point to another When an entity moves](https://reader030.vdocuments.us/reader030/viewer/2022033122/5e7bf5b09c2eda671413d130/html5/thumbnails/18.jpg)
Combining Name Spaces
Combining two names spaces can be done by mounting a namespace onto a mount point in a different external name space
Mounting requires one directory node (i.e., mount point)tocontain identifier of another directory node in the externalname space (i.e., mounting point)
Example: mount a remote file system onto a local mount point
Remote files can be accessed using local names!
18
![Page 19: Naming - Distributed Systems...2. Forwarding Pointers Forwarding Pointers enables locating mobile entities Mobile entities move from one access point to another When an entity moves](https://reader030.vdocuments.us/reader030/viewer/2022033122/5e7bf5b09c2eda671413d130/html5/thumbnails/19.jpg)
Example of Mounting
19
Name resolution for “/remote/vu/mbox” in a distributed file system
![Page 20: Naming - Distributed Systems...2. Forwarding Pointers Forwarding Pointers enables locating mobile entities Mobile entities move from one access point to another When an entity moves](https://reader030.vdocuments.us/reader030/viewer/2022033122/5e7bf5b09c2eda671413d130/html5/thumbnails/20.jpg)
Name Space Implementation
Name space for a large‐scale distributed system is partitioned intothree logical layers
Global layer: high‐level directory nodes(root and its Children)
Represent groups of organizations, directory tables rarely changed
Administrational layer: directory nodes managed by a singleorganization
Typically one directory node per department, directory tablesinfrequently changed
Managerial layer: nodes that change frequently
Example: nodes representing hosts, user‐defined directories and files
20
![Page 21: Naming - Distributed Systems...2. Forwarding Pointers Forwarding Pointers enables locating mobile entities Mobile entities move from one access point to another When an entity moves](https://reader030.vdocuments.us/reader030/viewer/2022033122/5e7bf5b09c2eda671413d130/html5/thumbnails/21.jpg)
Name Space Implementation
21
An example partitioning ofthe DNS name space, including Internet‐accessible files, into three layers.
![Page 22: Naming - Distributed Systems...2. Forwarding Pointers Forwarding Pointers enables locating mobile entities Mobile entities move from one access point to another When an entity moves](https://reader030.vdocuments.us/reader030/viewer/2022033122/5e7bf5b09c2eda671413d130/html5/thumbnails/22.jpg)
Name Space Implementation
Global Administrational Managerial
Geographical scale of the network
Total number of nodes
Number of replicas
Update propagation
Is client side caching applied?
Responsiveness to lookups
Worldwide Organization Department
Few Many Vast numbers
Lazy Immediate Immediate
Many None or few None
Yes Yes Sometimes
Seconds Milliseconds Immediate
22
![Page 23: Naming - Distributed Systems...2. Forwarding Pointers Forwarding Pointers enables locating mobile entities Mobile entities move from one access point to another When an entity moves](https://reader030.vdocuments.us/reader030/viewer/2022033122/5e7bf5b09c2eda671413d130/html5/thumbnails/23.jpg)
Distributed Name Resolution
Distributed Name Resolution is responsible for mapping namesto address in a system where:
Name servers are distributed among participating nodes
Each name server has a local name resolver
We will study two distributed name resolution algorithms:
Iterative Name Resolution
Recursive Name Resolution
23
![Page 24: Naming - Distributed Systems...2. Forwarding Pointers Forwarding Pointers enables locating mobile entities Mobile entities move from one access point to another When an entity moves](https://reader030.vdocuments.us/reader030/viewer/2022033122/5e7bf5b09c2eda671413d130/html5/thumbnails/24.jpg)
1. Iterative Name Resolution
24
Resolving the name “ftp.cs.vu.nl”
<a,b,c> = structured name in a sequence#<a> = address of node with name “a”
![Page 25: Naming - Distributed Systems...2. Forwarding Pointers Forwarding Pointers enables locating mobile entities Mobile entities move from one access point to another When an entity moves](https://reader030.vdocuments.us/reader030/viewer/2022033122/5e7bf5b09c2eda671413d130/html5/thumbnails/25.jpg)
2. Recursive Name Resolution
25
Resolving the name “ftp.cs.vu.nl”
<a,b,c> = structured name in a sequence#<a> = address of node with name “a”
![Page 26: Naming - Distributed Systems...2. Forwarding Pointers Forwarding Pointers enables locating mobile entities Mobile entities move from one access point to another When an entity moves](https://reader030.vdocuments.us/reader030/viewer/2022033122/5e7bf5b09c2eda671413d130/html5/thumbnails/26.jpg)
Comparison between Recursive andIterative Name Resolutions
Drawback of recursive name resolution Higher demand on each name server
Name servers in the global layer support only iterative name resolution
Advantages of recursive name resolution Reduced communication costs
Caching results is more effective
With iterative name resolution, only client’s name resolver performs caching
26
![Page 27: Naming - Distributed Systems...2. Forwarding Pointers Forwarding Pointers enables locating mobile entities Mobile entities move from one access point to another When an entity moves](https://reader030.vdocuments.us/reader030/viewer/2022033122/5e7bf5b09c2eda671413d130/html5/thumbnails/27.jpg)
Next chapter
Synchronization
27