distributed systems cs 15-440 naming – part ii lecture 6, sep 26, 2011 majd f. sakr, vinay kolar,...
Post on 21-Dec-2015
218 views
TRANSCRIPT
Distributed SystemsCS 15-440Naming – Part II
Lecture 6, Sep 26, 2011
Majd F. Sakr, Vinay Kolar, Mohammad Hammoud
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
Recap: Three Classes of Naming
Flat naming
Structured naming
Attribute-based naming
3
Recap: Three Classes of Naming
Flat naming
Structured naming
Attribute-based naming
4
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
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
Recap: Layers in Distributed Name Spaces
Distributed Name Spaces can be divided into three layers
7
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
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
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
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
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
Classes of Naming
Flat naming
Structured naming
Attribute-based naming
13
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
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
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
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
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
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
Reference
http://en.wikipedia.org/wiki/Directory_service
20