6. Naming (name services) P183 6. Naming (name services) General issues Naming in distributed systems Locating mobile entities
DNS is a distributed naming system. P648 WWW can be viewed as a huge distributed system consisting of millions of clients and servers for accessing linked documents. DNS is a distributed naming system.
6.1 Naming entities 1. Three kinds of names human-friendly name: f1, cs.nju.edu.cn address: a special kind of name – name of an access point. 202.119.32.6 identifier: a name has properties: an identifier refers to at most one entity each entity is referred to by at most one identifier RFC:2648
Names are used to identify and refer to entities. Address is not well suited for referring an entity an entity may be moved changes address an entity can offer more than one access points. Identifier is location independent (PID)
2. Name spaces Name space is a collection of all valid names which can be represented as a labeled, directed graph. (recognized by a particular service) C++: namespace A { … } XML: <student xmlns = “student.dtd” xmlns:teacher =“teacher.dtd”> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
For human use For implementation 1 “usr” 2 “dev” Purpose? usr li liu dev nic f1 f2 7 8 2 9 11 12 usr dev 1 li liu f1 f2 nic 13 For human use For implementation
Example of Unix file system 1 n blocks … … inode inode inode … … data data data data The general organization of the UNIX file system implementation on a logical disk of contiguous disk blocks.
return P187 A general naming graph with a single root node.
Leaf node represent named entity store information (address or state) on the entity directory node represent a collection of entities store a directory table of (edge label, node identifier). path name N:<label-1, label-2, …, label-n> .. no:<home,steen,mbox> /home/steen/mbox
Name space distribution root cn jp edu com MIT cm ustc pku nju …... ... ….. us com, edu, gov, mil, net, org, arpa, int, country
P196 An example partitioning of the DNS name space, including Internet-accessible files, into three layers.
3. Name resolution A path name ---> information stored in the node. find A path name ---> information stored in the node. or entity Name resolution: the process of traversing the naming graph by looking up the components of a path name, one at a time. N:<label-1, label-2, …, label-n>
For example, n0:<home, steen, mbox> n5:”keys” /home/steen/mbox
4. Name service in large distributed system P194 4. Name service in large distributed system Name service Chapter 6.1 DNS name entity (or address) Design issue: structure of name space A large-scale name space (naming graph) is implemented by distributing its nodes across multiple name servers and organized hierarchically. Distribution of a name space across multiple name servers affects the implementation of name resolution
The principle of iterative name resolution.
The principle of recursive name resolution. ?
6.2 Directory service 1. Directory service P206 1. Directory service If we wish to find a particular person or resource, but we don’t know its name, only some of its other attributes. For example, Query the name of each Web server running Unix the person with CS department whose family name is Li, man If we have directory service with information:
Predefined entities and their attributes DIB Entry Attributes Entity user name:xxx; tel.no.:xxxxx; email addr.:… name:yyy; tel.no.:yyyyy; email addr.:… …… host name:xxx; type:www server; OS:Unix; … name:yyy; type:FTP server; OS:Linux; … printer … ...... Entity Attributes User Name: … Tel.no.: … Email address: Dept: …… Sex: Host Name: Type: OS: IP address: …… Printer …
Directory service store collections of binding between names and attributes look for an entity based on a description of attributes some attributes ----> information of entities type=Web server&OS=Unix ----> entities (or names) Examples: X.500, LDAP(P209), Active directory services
2. X.500 general model for global P206 an X.500 directory service consists of a number of directory entries a directory entry is made up of a collection of (attribute, value) pairs …… Name: cs.nju.edu.cn Type: www server OS: Linux IP address: 202.119.36.1
P207 130.37.21.11 -- WWW_Server FTP_Server 130.37.24.6, 192.31.231.42,192.31.231.66 Mail_Servers Main server CN CommonName Math. & Comp. Sc. OU OrganizationalUnit Vrije Universiteit O Organization Amsterdam L Locality NL C Country Value Abbr. Attribute A simple example of a X.500 directory entry using X.500 naming convention.
P207 Naming convention applies to the first five attributes: C, L, O, OU, CN CommonName is used as a name to identify an entry within a limited part of a directory The collection of all directory entries in X.500 directory service is called DIB (Directory Information Base)
Each naming attribute is called RDN P207 Each entry in DIB is uniquely named by listing naming attributes in sequence Each naming attribute is called RDN C : nl L : Amsterdam O : Vrije Universiteit OU : Math. & Comp. Sc. CN : Main server Mail_server : … FTP_server : … WWW_server: …
/C=NL/O=Vrije Univ/OU=Math.& Sc DIT (Directory Information Tree) C, O, OU could be used to form the global unique name, analog to DNS name /C=NL/O=Vrije Univ/OU=Math.& Sc ~ nl.vu.cs DIT (Directory Information Tree) use of globally unique names leads to a hierarchy of the collection of directory entries
1) X.500 name space DIT P208 directory entry | node
Two directory entries having Host_Name as RDN P208 Attribute Value Country NL Locality Amsterdam Organization Vrije Universiteit OrganizationalUnit Math. & Comp. Sc. CommonName Main server Host_Name star zephyr Host_Address 192.31.231.42 192.31.231.66 Two directory entries having Host_Name as RDN (Relative Distinguished Name).
2) Look up operations read path name an entity search base name list of names record=read(“&(C=NL)(O=Vrije Univ.)(OU=Math. & Comp. Sc.) (CN=Main server)”) P207 list=search(“&(C=NL)(O=Vrije Univ.)(OU= Math. & Comp. Sc.) (CN=Main server)”) star, zephyr filter expression for all of entries below the base node list
3) Implementation P209 DIT is partitioned and distributed across many Directory Service Agent (DSA) DSA DSA DSA DUA DSA DSA DSA DUA Client (DUA—Directory User Agent) interacts with a DSA, which accesses other DSAs as necessary
2. LDAP 1) LDAP is Internet-based directory services. Lightweight Directory Access Protocol 1) LDAP is Internet-based directory services. ASN.1 encoding string 2) Active directory services P539 Microsoft’s LDAP implementation X.500 protocol LDAP ISO protocol stack TCP IP
Active directory services a distributed system is partitioned into domains each domain consists of a number of users and resources each domain has one or more directory servers, each of which has a DNS name (ldap.cs.nju.edu.cn) nju directory servers … … soft CS phy Domain tree
Domain: Users: teacher, student, … Resources: host, printer, DIB Entry Attributes user1 user2 resource1 resource2
Entity Attributes Teacher Name: … Tel.no.: … Email address: …… Student Status: Host Name: Type: OS: IP address: Printer
Implementation with DNS DNS Directory service edu ustc pku nju ... Domain tree name server directory server nju … … soft CS phy domain has DNS name: ldap.cs.nju.edu.cn
P202 DNS database DIB for domain cs.nju.edu.cn Name Value Entry Type Value www.nju.edu.cn A 202.119.32.6 cs.nju.edu.cn 202.119.36.1 ldap.cs.nju.edu.cn SRV 202.119.36.2 TXT “LDAP server” DIB for domain cs.nju.edu.cn Entry Attributes user1 user2 resource1 resource2
Use directory service DNS server query(LDAP server) request address LDAP query directory server client LDAP reply
6.3 Locating mobile entities P210 1. Feature of mobile entities A mobile entity has multiple addresses when mobile host moves. 2. Locating mobile entities use forwarding pointer use location-independent identifier to locate mobile entities
1) Forwarding pointer location A location B location C entity entity When an entity move from A to B, it leaves behind a reference to its new location at B entity entity entity
2) Home-based approaches Chapter 6.2 Mobile IP
3) Hierarchical approaches It is used in Globe location service. A network is divided into a collection of domains. There is a single top-domain that spans the entire network each domain can be subdivided into multiple smaller subdomains leaf domain is lowest-level one
Top domain D1 D2 D3 D21 D24 D11 D12 D13 D231 D232
How organize location service? Top domain D D1 D2 D3 D21 D24 D11 D12 D13 E31 E22 E1 E12 E32 D231 D232 E33 E13 E23, E232 How organize location service?
Directory node: each domain D has a directory node dir(D) that stores location records for all entities in D Location record: For leaf domain, the location record for entity E contains E’s current address in the domain; For higher-level domain D’, the location record for entity E contains a pointer to directory node of next lower-level domain that has E root directory node knows about all entities
Top domain D D2 D1 D3 D11 D21 D12 D24 D13 E31 E22 E13’ E1 E12 E32 D231
dir(D) dir(D1) E1 <E1> E12 ->dir(D12) E13 ->dir(D13) E1 ->dir(D1) E12 ->dir(D1) E13 ->dir(D1) ->dir(D2) E22 ->dir(D2) E23 ->dir(D2) E232 ->dir(D2) E31 ->dir(D3) E32 ->dir(D3) E33 ->dir(D3) dir(D2) E22 ->dir(D22) E23 ->dir(D23) E232 ->dir(D23) E13 ->dir(D21) dir(D22) E22 <E22> dir(D23) E23 <E23> E232 ->dir(D232) dir(D232) E232 <E232>
P218 Hierarchical organization of a location service into domains, each having an associated directory node.
An example of storing information of an entity having two addresses in different leaf domains.
Look up operation Client issues the request for E to the directory node of the leaf domain D in which the client resides search the tree of directory nodes E’ address is returned to the client method 1: from the root if E is not in the leaf domain method 2: from its parents if … and there are copies
P219 Looking up a location in a hierarchically organized location service.
Insert operation An insert request is forwarded to the first node that knows about entity E. A chain of forwarding pointers to the leaf node is created. For example, An entity E has created a replica in the leaf domain D.
P220
Summary 1. Naming entity and name service three kinds of name name space name resolution name service in large distributed system(DNS) 2. Directory service difference between directory service and name service X.500 and LDAP (Active directory services)
3. Locating mobile entities use location-independent identifier to locate mobile entities. ways home-based approaches forwarding pointer object(proxy, skeleton) hierarchical approaches