distributed systems cs 15-440 naming – part ii lecture 6, sep 26, 2011 majd f. sakr, vinay kolar,...
Post on 21-Dec-2015
221 views
TRANSCRIPT
![Page 1: Distributed Systems CS 15-440 Naming – Part II Lecture 6, Sep 26, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649d555503460f94a32a8b/html5/thumbnails/1.jpg)
Distributed SystemsCS 15-440Naming – Part II
Lecture 6, Sep 26, 2011
Majd F. Sakr, Vinay Kolar, Mohammad Hammoud
![Page 2: Distributed Systems CS 15-440 Naming – Part II Lecture 6, Sep 26, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649d555503460f94a32a8b/html5/thumbnails/2.jpg)
Today…
Last session: Naming: Flat-Names, Structured-Names
Today’s session: Naming: Resolution of Structured Names, Attribute-based Naming Introduction to Synchronization and Clock Synchronization
In the next three lectures, we will cover: Synchronization
Announcement: Project 1 due on Oct 3rd
2
![Page 3: Distributed Systems CS 15-440 Naming – Part II Lecture 6, Sep 26, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649d555503460f94a32a8b/html5/thumbnails/3.jpg)
Recap: Three Classes of Naming
Flat naming
Structured naming
Attribute-based naming
3
![Page 4: Distributed Systems CS 15-440 Naming – Part II Lecture 6, Sep 26, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649d555503460f94a32a8b/html5/thumbnails/4.jpg)
Recap: Three Classes of Naming
Flat naming
Structured naming
Attribute-based naming
4
![Page 5: Distributed Systems CS 15-440 Naming – Part II Lecture 6, Sep 26, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649d555503460f94a32a8b/html5/thumbnails/5.jpg)
Recap: Name Spaces in Structured Naming
Structured names are organized into name spaces
n0
n1
n4
n5
n2 n3
Leaf node
Directory node
home keys
steenmax
elke
n2: “elke”n3: “max”
n4: “steen”
Data stored in n1
“/keys”
twmrc mbox
Name Spaces may be distributed across multiple computers (e.g., NFS)5
![Page 6: Distributed Systems CS 15-440 Naming – Part II Lecture 6, Sep 26, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649d555503460f94a32a8b/html5/thumbnails/6.jpg)
Recap: Distributed Name Spaces
In large Distributed Systems, it is essential to distribute name spaces over multiple name servers
Distribute nodes of the naming graph
Distribute name space management
Distribute name resolution mechanisms
6
![Page 7: Distributed Systems CS 15-440 Naming – Part II Lecture 6, Sep 26, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649d555503460f94a32a8b/html5/thumbnails/7.jpg)
Recap: Layers in Distributed Name Spaces
Distributed Name Spaces can be divided into three layers
7
![Page 8: Distributed Systems CS 15-440 Naming – Part II Lecture 6, Sep 26, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649d555503460f94a32a8b/html5/thumbnails/8.jpg)
Distributed Name Resolution
Distributed Name Resolution is responsible for mapping names to addresses 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:1. Iterative Name Resolution
2.Recursive Name Resolution
8
![Page 9: Distributed Systems CS 15-440 Naming – Part II Lecture 6, Sep 26, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649d555503460f94a32a8b/html5/thumbnails/9.jpg)
1. Iterative Name Resolution
In iterative name resolution, a client iteratively calls various name servers to resolve a name
An example:
Resolving the name “ftp.cs.vu.nl”
<a,b,c> = structured name in a sequence#<a> = address of node with name “a”
9
![Page 10: Distributed Systems CS 15-440 Naming – Part II Lecture 6, Sep 26, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649d555503460f94a32a8b/html5/thumbnails/10.jpg)
Iterative Name Resolution Algorithm
1. Client hands over the complete name to root name server
2. Root name server resolves the name as far as it can, and returns the result to the client• The root name server returns the address of the next-level name
server (say, NLNS) if address is not completely resolved
3. Client passes the unresolved part of the name to the NLNS
4. NLNS resolves the name as far as it can, and returns the result to the client (and probably its next-level name server)
5. The process continues till the full name is resolved
10
![Page 11: Distributed Systems CS 15-440 Naming – Part II Lecture 6, Sep 26, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649d555503460f94a32a8b/html5/thumbnails/11.jpg)
2. Recursive Name Resolution
In recursive name resolution, a client calls the root name server to resolve a name
The name server may recursively call other name servers for name resolution
An example:
Resolving the name “ftp.cs.vu.nl”
<a,b,c> = structured name in a sequence#<a> = address of node with name “a”
11
![Page 12: Distributed Systems CS 15-440 Naming – Part II Lecture 6, Sep 26, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649d555503460f94a32a8b/html5/thumbnails/12.jpg)
Recursive Name Resolution (cont’d)
ApproachThe client provides the name to the root name server
If the root name server is not able to resolve the complete name, it passes the unresolved part of the name to the next associated name server
The process continues till the name is fully resolved
The root name server returns the result to the client
Drawback:Recursive name resolution incurs large overhead at name servers (especially, at the high-level name servers)
12
![Page 13: Distributed Systems CS 15-440 Naming – Part II Lecture 6, Sep 26, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649d555503460f94a32a8b/html5/thumbnails/13.jpg)
Classes of Naming
Flat naming
Structured naming
Attribute-based naming
13
![Page 14: Distributed Systems CS 15-440 Naming – Part II Lecture 6, Sep 26, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649d555503460f94a32a8b/html5/thumbnails/14.jpg)
Attribute-based Naming
In many cases, it is convenient to look up entities by means of their attributes
Similar to traditional directory services (e.g., yellow pages)
e.g., Search an organization for users in a department, Search for printers in a network
Attribute-based naming supports looking up for entities by means of their attributes
Entities are described using a set of (attribute, value) pairs
Name resolution happens through attributesUsers search for attributes, and a list of entities that match the attributes are returned
14
![Page 15: Distributed Systems CS 15-440 Naming – Part II Lecture 6, Sep 26, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649d555503460f94a32a8b/html5/thumbnails/15.jpg)
Directory ServiceDirectory Services are systems that support naming and name resolution for attribute-based names
Many organizations use directory services to locate users, and resources such as files and printers in a network
Entity representation in a directory service:Each entity is described using an entry
An entry is a set of(attribute, value) pairs
All entries are stored in a database called directory
Directory service enables searching for entities by specifying attributes
The user specifies a query by describing a set of attributes
The directory service returns the entities that match the query
15
![Page 16: Distributed Systems CS 15-440 Naming – Part II Lecture 6, Sep 26, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649d555503460f94a32a8b/html5/thumbnails/16.jpg)
Directory Service (cont’d)
Challenge in Implementing Directory Services: The lookup operations on directory services are extremely expensive
They require to match the requested attribute values against the actual attribute values; this needs inspecting all the entities
Solution: Implement the basic directory service as a database
Organize the database similar to traditional structured naming system for fast look up
We will study a well-known directory service Light-weight Directory Access Protocol (LDAP)
16
![Page 17: Distributed Systems CS 15-440 Naming – Part II Lecture 6, Sep 26, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649d555503460f94a32a8b/html5/thumbnails/17.jpg)
Light-weight Directory Access Protocol (LDAP)
LDAP Directory Service consists of a number of records called “directory entries”
Each directory entry is made of (attribute, value) pair
LDAP Standard specifies five attributes for each record
Directory Information Base (DIB) is a collection of all directory entries
Each record in a DIB is unique
Each record is represented by a unique
name e.g., /C=NL/O=Vrije Universiteit/OU=Comp. Sc.
17
![Page 18: Distributed Systems CS 15-440 Naming – Part II Lecture 6, Sep 26, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649d555503460f94a32a8b/html5/thumbnails/18.jpg)
Directory Information Tree in LDAPAll the records in the DIB can be organized into a hierarchical tree called Directory Information Tree (DIT)
LDAP provides advanced search mechanisms based on attributes by traversing the DIT
Example syntax for searching all Main servers in Vrije Universiteit: search("&(C = NL) (O = Vrije Universiteit) (OU = *) (CN = Main server)")
18
![Page 19: Distributed Systems CS 15-440 Naming – Part II Lecture 6, Sep 26, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649d555503460f94a32a8b/html5/thumbnails/19.jpg)
Naming in Distributed Systems – Summary
Naming and name resolutions enable accessing entities in a Distributed System
Three types of namingFlat naming
e.g., Home-based approaches, Distributed Hash Table
Structured namingOrganizes names into name spaces
Name spaces can be distributed across multiple computers
Attribute-based namingEntities are looked up using their attributes
19
![Page 20: Distributed Systems CS 15-440 Naming – Part II Lecture 6, Sep 26, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649d555503460f94a32a8b/html5/thumbnails/20.jpg)
Reference
http://en.wikipedia.org/wiki/Directory_service
20