200 likes | 208 Views
Distributed Systems CS 15-440. Naming – 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
E N D
Distributed SystemsCS 15-440 Naming – 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
Recap: Three Classes of Naming • Flat naming • Structured naming • Attribute-based naming
Recap: Three Classes of Naming • Flat naming • Structured naming • Attribute-based naming
Recap: Name Spaces in Structured Naming • Structured names are organized into name spaces Data stored in n1 n0 keys home n2: “elke” n3: “max” n4: “steen” n1 n5 “/keys” elke steen max n4 n2 n3 Leaf node twmrc mbox Directory node Name Spaces may be distributed across multiple computers (e.g., NFS)
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
Recap: Layers in Distributed Name Spaces • Distributed Name Spaces can be divided into three layers
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: • Iterative Name Resolution • Recursive Name Resolution
1. Iterative Name Resolution • In iterative name resolution, a client iteratively calls various name servers to resolve a name • An example: <a,b,c> = structured name in a sequence #<a> = address of node with name “a” Resolving the name “ftp.cs.vu.nl”
Iterative Name Resolution Algorithm • Client hands over the complete name to root name server • 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 • Client passes the unresolved part of the name to the NLNS • NLNS resolves the name as far as it can, and returns the result to the client (and probably its next-level name server) • The process continues till the full name is resolved
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: <a,b,c> = structured name in a sequence #<a> = address of node with name “a” Resolving the name “ftp.cs.vu.nl”
Recursive Name Resolution (cont’d) • Approach • The 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)
Classes of Naming • Flat naming • Structured naming • Attribute-based naming
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 attributes • Users search for attributes, and a list of entities that match the attributes are returned
Directory Service • Directory 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
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)
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=VrijeUniversiteit/OU=Comp. Sc.
Directory Information Tree in LDAP • All 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 VrijeUniversiteit: search("&(C = NL) (O = VrijeUniversiteit) (OU = *) (CN = Main server)")
Naming in Distributed Systems – Summary • Naming and name resolutions enable accessing entities in a Distributed System • Three types of naming • Flat naming • e.g., Home-based approaches, Distributed Hash Table • Structured naming • Organizes names into name spaces • Name spaces can be distributed across multiple computers • Attribute-based naming • Entities are looked up using their attributes
Reference • http://en.wikipedia.org/wiki/Directory_service