870 likes | 1.03k Views
Naming. Chapter 4. Table of Contents. Concepts Locate mobile entities Garbage collection. 4.1 Naming Entities. Convenient and Unique. What’s the most important requirement for a name?. Take a breath.
E N D
Naming Chapter 4
Table of Contents • Concepts • Locate mobile entities • Garbage collection
4.1 Naming Entities Convenient and Unique • What’s the most important requirement for a name?
Take a breath Mr. Adolph Blaine Charles David Earl Frederick Gerald Hubert Irvin John Kenneth Lloyd Martin Nero Oliver Paul Quincy Randolph Sherman Thomas Uncas Victor William Xerxes Yancy Wolfeschlegelsteinhausenbergerdorffwelchevoralternwarengewissenschaftschaferswessenschafewarenwohlgepflegeundsorgfaltigkeitbeschutzenvonangreifeudurchihrraubgierigfeindewelchevoralternzwolftausendjahresvorandieerscheinenerscheinenvanderersteerdemenschderraumschiffgebrauchlichtalsseinursprungvonkraftgestartseinlangefahrthinzwischensternaitigraumaufdersuchenachdiesternwelchegehabtbewohnbarplanetenkreisedrehensichundwohinderneurassevonverstandigmenschlichkeitkonntefortpflanzenundsicherfeuenanlebenslanglichfreudeundruhemitnicheinfurchtvorangreifenvonandererintelligentgeschopfsvonhinzwischenternart Zeus igraum Senior • Can you image the longest English name in the world?
He was born in Munich in 1904 and lived in Philadelphia for most of his life. Apparently he shortened his name to Wolfeschlegelsteinhausenbergerdorff, and subsequently went by Hubert Blaine Wolfe, but the "Senior" indicates that he passed some form of his name to his son. The full version of the name of 590 letters appeared in the 12th edition of The Guinness Book of Records. He now lives in Philadelphia, Pennsylvania, U.S.A., and has shortened his surname to Mr. Wolfe + 585, Senior.
(2003-03-04) 姓名最长的是藏族代表 藏族代表姓名13字长,姓王代表230人居首。 这次到北京的人大代表中,姓名最长的是藏族代表嘉木样.洛桑久美.图丹却吉尼玛,共有13个字。最特别的姓名有战永胜、种明辉、锁飞、揭国雄、娘毛先等。资格最老的代表是申纪兰,这是她第十次当选全国人大代表,亦是唯一一个从第一届担任到第十届的人大代表。此外,人数最多的姓是王,共230人,紧随其后的是姓李的226人,而姓种、锁、漆、揭、娘、焉和初等罕见姓氏的代表,则各只有一位。 >>> 2003年两会专题
4.1 Naming Entities • Definition • A name in a distributed system is a string of bits or characters that is used to refer to an entity. • An access point is yet special kind of entity to be used to access some entity, i.e. phone #. • The name of an access point is called an address.
4.1 Naming Entities • Identifier: uniquely identify an entity. • An identifier refers to at most one entity • Each entity is referred to by at most one identifier • An identifier always refers to the same entity (i.e., it is never reused) • phone #, passport #
4.1 Naming Entities • Addresses and identifiers are normally represented in machine-readable form, bit strings. • A human-friendly name is generally represented as a character sting. • www.njust.edu.cn
4.1 Naming Entities • Name spaces • Labeled (acyclic) directed graph • Leaf node: 0 outgoing edges • Directory node: n outgoing edges • Root node • Path name • Form: N:<label-1, label-2, …, label-n> • Absolute path name • Relative path name
Name Spaces (1) • A general naming graph with a single root node.
Name Spaces (2) • The general organization of the UNIX file system implementation on a logical disk of contiguous disk blocks.
4.1 Naming Entities • Name resolution • The process of looking up a name. • N:<label-1, label-2, …, label-n> • Closure Mechanism • Knowing how and where to start name resolution. • 4340880245810362 • /home/yangzhao/movie • $HOME
4.1 Naming Entities • Name resolution • Linking • An alias is another name for the same entity, for example, an environment variable. • Alias implementation • Hard links: multiple absolute paths names to the same node • Symbolic link: storing an absolute path name in the leaf node • Why aliasing?
Linking and Mounting (1) • The concept of a symbolic link explained in a naming graph.
4.1 Naming Entities • Name resolution • Mounting • Let a directory node store the identifier of a directory node from a different name space, which we refer to as a foreign name space. • Mount point vs. Mounting point • Mounting implementation • The name of an access protocol • The name of the server • The name of the mounting point in the foreign name space
Linking and Mounting (2) • Mounting remote name spaces through a specific process protocol.
4.1 Naming Entities cd /remote ls -l • Name resolution • Mounting • Example • nfs://flits.cs.vu.nl/home/steen Transparent
4.1 Naming Entities • Name resolution • Global Name Service (GNS) • Add a new root node and to make the existing root nodes its children. • /home/steen/keys => n0:/home/steen/keys
Linking and Mounting (3) • Organization of the DEC Global Name Service
4.1 Naming Entities • Name Space Layer • Global layer • close to root node, rarely updated • Administrational layer • organizations, groups of entities • Managerial layer • nodes for hosts • user-defined directories and files A zone is a part of the name space that is implemented by a separate name server.
Name Space Distribution (1) • An example partitioning of the DNS name space, including Internet-accessible files, into three layers.
4.1 Naming Entities • Availability • Performance • Client-side Caching • Replication
Name Space Distribution (2) • A comparison between name servers for implementing nodes from a large-scale name space partitioned into a global layer, as an administrational layer, and a managerial layer.
4.1 Naming Entities • Implementation of Name resolution • Local name resolver • Ensuring that the name resolution process is carried out • Iterative name resolution • Recursive name resolution root:<nl, vu, cs, ftp, pub, globe, index.txt> Root server is assumed to be known.
Implementation of Name Resolution (1) • The principle of iterative name resolution.
Implementation of Name Resolution (2) • The principle of recursive name resolution.
Implementation of Name Resolution (3) • Recursive name resolution of <nl, vu, cs, ftp>. Name servers cache intermediate results for subsequent lookups.
4.1 Naming Entities • Comments on the recursive name resolution -: puts a higher performance demand on each name server +: caching results is more effective +: communication costs may be reduced
Implementation of Name Resolution (4) • The comparison between recursive and iterative name resolution with respect to communication costs.
The DNS Name Space • The most important types of resource records forming the contents of nodes in the DNS name space.
DNS Implementation (1) • An excerpt from the DNS database for the zone cs.vu.nl.
DNS Implementation (2) • Part of the description for the vu.nl domain which contains the cs.vu.nl domain.
The X.500 Name Space (1) • A simple example of a X.500 directory entry using X.500 naming conventions.
The X.500 Name Space (2) • Part of the directory information tree.
The X.500 Name Space (3) • Two directory entries having Host_Name as RDN.
4.2 Locating Mobile Entities • Names • Human-friendly names • Addresses • Identifiers • Traditional naming systems • Human-friendly names maps to addresses • Both names and addresses can change
Naming versus Locating Entities • Direct, single level mapping between names and addresses. • Two-level mapping using identities.
4.2 Locating Mobile Entities • Locating an entity • Broadcasting • A message with an entity ID is broadcast • Each machine checks whether it has the entity • One replies • Multicasting • A group of hosts receives the request • +: locate the nearest replica
4.2 Locating Mobile Entities • Locating an entity • Forwarding Pointers • An entity moves from A to B • A reference to B is left at A • Locating an entity is followed by the chain of forwarding pointers. +: simple -: a chain can be very long => inefficient (space, time) -: a chain is easy to be broken
Forwarding Pointers (1) • The principle of forwarding pointers using (proxy, skeleton) pairs.
Forwarding Pointers (2) • Redirecting a forwarding pointer, by storing a shortcut in a proxy. • Sending the response directly to the initiating proxy or along the reverse path of forwarding pointers
If a process in a chain of (proxy, skeleton) pairs crashes: • A object’s home location always keep a reference to its current location
4.2 Locating Mobile Entities • Locating an entity • Home-based Approaches • Home location • keeps track of the current location of an entity • is often chosen the place where an entity was created normally • +: improve the previous two approaches: scalability and performance problems • -: always contact the home location first • -: fixed home location
Home-Based Approaches • The principle of Mobile IP.
4.2 Locating Mobile Entities • Locating an entity • Hierarchical Approaches • Multiple-tiered home-based approach • A network is divided into a collection of domains • Leaf domain is the lowest-level domain • dir(D): entities in the domain D • root node: knows about all entities
Hierarchical Approaches (1) • Hierarchical organization of a location service into domains, each having an associated directory node.
4.2 Locating Mobile Entities • Location record • A location record for entity E in the directory node N for a leaf domain D contains the entity’s current address in that domain • The directory node N’ for the next higher-level domain D’ that contains D will have a location record for E containing only a pointer to N. • Likewise, the parent node of N’ will store a location record for E containing only a pointer to N’.
Hierarchical Approaches (2) • An example of storing information of an entity having two addresses in different leaf domains.
4.2 Locating Mobile Entities • Lookup operation • A client wishing to locate an entity E, issues a lookup request to the directory node of the leaf domain D in which the client resides. • If the directory node does not store a location record for E, then E is not located in D currently. • Go for D’s parent (next level higher), and so on. • Once the request reaches a node M that stores a location recode for E, then E is in dom(M).