Top Banner
5.3 Structured Naming Distributed Systems Chapter 5 Naming Prepared by: Ahmed Magdy Ezzeldin Reference: Distributed Systems Principles and Paradigms 2 nd Edition
20
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Distributed Systems Naming

5.3 Structured Naming

Distributed Systems

Chapter 5 Naming

Prepared by: Ahmed Magdy Ezzeldin Reference: Distributed Systems Principles and Paradigms 2nd Edition

Page 2: Distributed Systems Naming

5.3.1 Name Spaces

● A Name space is a labeled, directed graph with two types of nodes.

● A leaf node represents a named entity and has the property that it has no outgoing edges.

● And a directory node that has a number of outgoing edges, each labeled with a name, and has an associated identifier.

● A directory table holds (edge label, node identifier) for the directory contents.

● n0 is the root node and name : N label_1 , label_2 , ..... label_n is called a path. If N is the root then the path is called an absolute path, otherwise it is called a relative path. We use "/" as a separator between labels and as a representation for n0.

Page 3: Distributed Systems Naming

5.3.1 Name Spaces [continued]

A name space can be strictly hierarchical so that the naming graph is organized as a tree (one absolute path for each node). In other cases it can be organized in a directed acyclic graph (not permitted to have a cycle).

Page 4: Distributed Systems Naming

5.3.2 Name Resolution

- Resolution starts by reading the directory table at the first node of the path and then proceeding to the next identified node and continue the look-up until reaching the last node where it returns the node identifier for the last node in the path.

- Closure MechanismKnowing how and where to start name resolution is generally referred to as a closure mechanism. Essentially, a closure mechanism deals with selecting the initial node in a name space from which name resolution is to start.

Page 5: Distributed Systems Naming

5.3.2 Name Resolution [continued]

Page 6: Distributed Systems Naming

5.3.2 Name Resolution [continued]

- Linking and MountingThere are 2 ways of aliasing naming

1- In a directed graph where there are 2 absolute paths to a certain node. (Like Hard Links in UNIX file system)

2- In a tree structure, we can represent an entity by a leaf node that stores an absolute path name of another node. (like symbolic links in UNIX file system) [Figure 5-11]

A mounted file system corresponds to letting a directory node store the identifier of a directory node from a different name space. To mount a foreign name space in a distributed system requires at least the following information:

1. The name of an access protocol.2. The name of the server.3. The name of the mounting point in the foreign name

space. [Figure 5-12]

Page 7: Distributed Systems Naming

5.3.2 Name Resolution [continued]

Page 8: Distributed Systems Naming

5.3.3 Implementation of a Name Space

- Name Space DistributionName spaces are organized hierarchically and also partitioned into logical layers:

1- Global layer (Root and its direct children) which is stable (rarely changed). In this layer availability is more important than performance as caching can be used.

2- The administrational layer (they represent groups of entities that belong to the same organization or administrational unit) stable but not like the global layer.

3- The managerial layer consists of nodes that may typically change regularly. For example, nodes representing hosts in the local network belong to this layer. [Figure 5-13] & [Figure 5-14]

Page 9: Distributed Systems Naming

5.3.3 Implementation of a Name Space [continued]

Page 10: Distributed Systems Naming

5.3.3 Implementation of a Name Space [continued]

Page 11: Distributed Systems Naming

● Implementation of Name Resolution- Iterative name resolution:Where the client name resolver requests from the root name server to respond with the URL parts identifiers. The root server replies with what it can resolve then the response is sent back to the client that sends a new request to the next name server that has been resolved by the root server and so on until the whole URL has been resolved.[Figure 5-15]

5.3.3 Implementation of a Name Space [continued]

Page 12: Distributed Systems Naming

5.3.3 Implementation of a Name Space [continued]

Page 13: Distributed Systems Naming

- Recursive Name resolution:Where it is the responsibility of the name server not the client to resolve the name by requesting the rest of the name to be resolved from the other servers recursively which adds a performance demand on each server as it has to resolve the whole URL, but caching can be used more effectively than iterative name resolution.

[Figure 5-16] & [Figure 5-17] & [Figure 5-18]

5.3.3 Implementation of a Name Space [continued]

Page 14: Distributed Systems Naming

5.3.3 Implementation of a Name Space [continued]

Page 15: Distributed Systems Naming

5.3.3 Implementation of a Name Space [continued]

Page 16: Distributed Systems Naming

5.3.3 Implementation of a Name Space [continued]

Page 17: Distributed Systems Naming

5.3.4 The DNS Name Space [continued] ● The DNS name space is hierarchically organized as a rooted tree.● A label is a case-insensitive string made up of alphanumeric characters. ● A label has a maximum length of 63 characters. The length of a complete path name is restricted to 255 characters. ● The string of a path name consists of its labels, starting with the rightmost one, and separating the labels by a dot. ● The root is represented by a dot. e.g. the path name root: <com, google, web, s1>, is represented by the string "s1.web.google.com.", which includes the rightmost dot to indicate the root node (the dot is removed for readability). ● A subtree is called a domain; a path name to its root node is called a domain name. [Figure 5-19]

Page 18: Distributed Systems Naming

5.3.4 The DNS Name Space [continued]

Page 19: Distributed Systems Naming

- DNS Implementation

● The DNS name space is divided into a global layer and an administrational layer.

● Each zone is implemented by a name server, which is virtually always replicated for availability.

● A DNS database is implemented as a (small) collection of files, a file for each zone.

5.3.4 The DNS Name Space [continued]

Page 20: Distributed Systems Naming

Thank you

Questions

???