1 / 52

6. Naming (name services)

P183. 6. Naming (name services). General issues Naming in distributed systems Locating mobile entities. 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.

nelle-rocha
Download Presentation

6. Naming (name services)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. P183 6. Naming (name services) General issues Naming in distributed systems Locating mobile entities

  2. 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.

  3. 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

  4. 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)

  5. 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">

  6. 0 1 “usr” 2 “dev” 0 usr dev usr dev 1 2 nic li liu li liu nic 7 8 9 f1 f2 f1 f1 f1 f2 11 12 13 Purpose? For human use For implementation

  7. Example of Unix file system P188 0 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.

  8. return P187 A general naming graph with a single root node.

  9. 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

  10. root ... …... ….. cn jp ... …... com us edu ... …... ... com com edu edu MIT cm …... pku ustc nju Name space distribution com, edu, gov, mil, net, org, arpa, int, country

  11. P196 An example partitioning of the DNS name space, including Internet-accessible files, into three layers.

  12. 3. Name resolution P198 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>

  13. For example, n0:<home, steen, mbox> n1:”home” n5:”keys” /home/steen/mbox

  14. 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

  15. The principle of iterative name resolution. P198

  16. The principle of recursive name resolution. ?

  17. 6.2 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:

  18. Predefined entities and their attributes DIB

  19. 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

  20. 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 ……

  21. Attribute Abbr. Value Country C NL Locality L Amsterdam Organization O Vrije Universiteit OrganizationalUnit OU Math. & Comp. Sc. CommonName CN Main server Mail_Servers -- 130.37.24.6, 192.31.231.42,192.31.231.66 FTP_Server -- 130.37.21.11 WWW_Server -- 130.37.21.11 P207 A simple example of a X.500 directory entry using X.500 naming convention.

  22. 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)

  23. 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: …

  24. 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

  25. directory entry | node 1) X.500 name space P208 DIT

  26. P208 Two directory entries having Host_Name as RDN (Relative Distinguished Name).

  27. list 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

  28. DSA DSA DSA DSA DSA DSA DUA DUA 3) Implementation P209 DIT is partitioned and distributed across many Directory Service Agent (DSA) Client (DUA—Directory User Agent) interacts with a DSA, which accesses other DSAs as necessary

  29. P209 2. LDAP 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

  30. directory servers nju CS 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) … … soft phy Domain tree

  31. Domain: • Users: teacher, student, … • Resources: host, printer, DIB

  32. name server directory server nju ... edu CS domain has DNS name: ldap.cs.nju.edu.cn pku ustc nju Implementation with DNS DNSDirectory service Domain tree … … soft phy

  33. P202 DNS database DIB for domain cs.nju.edu.cn

  34. directory server DNS server client query(LDAP server) request address LDAP query LDAP reply Use directory service

  35. 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

  36. entity entity entity 1) Forwarding pointer P214 location A location B location C entity When an entity move from A to B, it leaves behind a reference to its new location at B

  37. 2) Home-based approaches P216 Chapter 6.2 Mobile IP

  38. 3) Hierarchical approaches P217 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

  39. D2 D1 D3 D11 D21 D12 D24 D231 D232 D13 Top domain

  40. D2 D1 D3 D11 D21 D12 D24 D231 D232 D13 Top domain D E31 E22 E1 E12 E32 E33 E13 E23, E232 How organize location service?

  41. 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 • rootdirectory node knows about all entities

  42. D2 D1 D3 D11 D21 D12 D24 D231 D232 D13 Top domain D E31 E22 E13’ E1 E12 E32 E33 E13 E23, E232

  43. dir(D1) E1 <E1> E12 ->dir(D12) E13 ->dir(D13) dir(D2) E22 ->dir(D22) E23 ->dir(D23) E232 ->dir(D23) E13 ->dir(D21) dir(D23) E23 <E23>E232 ->dir(D232) dir(D) 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(D22) E22 <E22> dir(D232) E232 <E232>

  44. P218 Hierarchical organization of a location service into domains, each having an associated directory node.

  45. An example of storing information of an entity having two addresses in different leaf domains.

  46. method 1: from the root if E is not in the leaf domain method 2: from its parents if … and there are copies 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

  47. P219 • Looking up a location in a hierarchically organized location service.

  48. 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.

  49. P220

More Related