COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655
10/12/2015Distributed Systems - Comp 6552 What is the naming problem? Name objects in distributed systems so that the naming system provides 1.Human-friendly names for use by people 2.System-friendly names for use by systems 3.Uniqueness where necessary 4.Ambiguity when helpful 5.A service that can be used in many systems 6.Minimal centralized administration 7.Global scalability
10/12/2015Distributed Systems - Comp 6553 Ambiguity when useful A A A A A A A A
10/12/2015Distributed Systems - Comp 6554 Aspects of human-friendliness What do humans need in the names they use?
10/12/2015Distributed Systems - Comp 6555 Examples of human-friendly names Albert Einstein einstein cs.franklin.edu franklin.edu edu /home/export/cs/Htdocs/Syllabus/comp655/
10/12/2015Distributed Systems - Comp 6556 Types of system-friendly names Addresses Identifiers Brainstorm What are identifiers, addresses?
10/12/2015Distributed Systems - Comp 6557 Address Definition – a name that refers to an access point in a communication system Examples – :1677 –00-04-E2-36-A0-5E –201 S. Grant Avenue, Columbus, Ohio – –
10/12/2015Distributed Systems - Comp 6558 Definition Identifier – a name with the following properties: 1.It refers to at most one entity 2.An entity has at most one identifier 3.Once used for one entity, its meaning never changes -- Tanenbaum, Page 181
10/12/2015Distributed Systems - Comp 6559 Examples of identifiers {72eb61e f2e4c68b2e7c} {b4431a67-9e32-4e2d-81e5-076a5f1b6170} 6a29b0a6b9ad79c8:f72617:ff5c75073e:-7ffd E2-36-A0-5E (close to being an identifier)
10/12/2015Distributed Systems - Comp Globally Unique Identifiers (GUIDs) DCE/Microsoft: A GUID is a 128-bit integer (16 bytes) that can be used across all computers and networks wherever a unique identifier is required. Such an identifier has a very low probability of being duplicated. GUIDs are generated using a combination of the current date and time, a counter, and the MAC address from the network card.
10/12/2015Distributed Systems - Comp UIDs in Java new java.rmi.server.UID() –f72617:ff5c75073e:-7ffc Javadocs say: A UID instance contains three primitive values: –unique, an int that uniquely identifies the VM that this UID was generated in –time, a long equal to a time (as returned by System.currentTimeMillis() ) at which the VM that this UID was generated in was alive System.currentTimeMillis() –count, a short to distinguish UID s generated in the same VM with the same time value
VMIDs in Java A VMID is a identifier that is unique across all Java virtual machines. VMIDs are used by the distributed garbage collector to identify client VMs. new java.rmi.dgc.VMID() –6a29b0a6b9ad79c8:f72617:ff5c75073e:-7ffd –Adds an address to the UID. 10/12/2015Distributed Systems - Comp 65512
10/12/2015Distributed Systems - Comp If you remember nothing else Distributed systems use three kinds of names: –Human-friendly names –Addresses –Identifiers Naming services manage the associations among these kinds of names.
10/12/2015Distributed Systems - Comp What about part 7 of the naming problem (global scalability)?
10/12/2015Distributed Systems - Comp Easy naming Directory service in our projects Only notebooks are named Notebook names are arbitrary character strings – no formation rules Light usage –A handful of names –Busy minute: a few dozen transactions Usually on a LAN
10/12/2015Distributed Systems - Comp Hard naming – the Web Global scalability –Millions of entities to name –Millions of name lookups per hour –Slow and expensive communications –Many independently-administered domains Location-related transparency –Location –Re-location –Migration –Replication
10/12/2015Distributed Systems - Comp Definition Name – a string of characters or bits that refers to something –Names in a computer system conform to some set of formation rules –Names have semantics that determine how a name maps to a thing –Some names have to be obtained from a naming authority
10/12/2015Distributed Systems - Comp Name space directory table root node path name (“absolute”) relative path name: steen/.twmrc global path name: nfs://flits/home/steen/.twmrc
10/12/2015Distributed Systems - Comp Another name space: Java packages and classes dino.naming.NameChooser java.rmi.server. ObjID dino/naming/NameChooser.class java/rmi/server/ObjID.class
10/12/2015Distributed Systems - Comp Yet another name space: DNS names ::= | " " ::= | "." ::= [ [ ] ] ::= | ::= | "-" ::= | ::= any one of the 52 alphabetic characters A through Z in upper case and a through z in lower case ::= any one of the ten digits 0 through 9 Source: RFC-1035 RFC-1035
10/12/2015Distributed Systems - Comp Three layers of DNS names Top-level domains DNS supports top 2 levels local file system
Distributed Systems - COMP 655 Name Space Distribution (2) 10/12/201522
10/12/2015Distributed Systems - Comp Semantics - name resolution Given a name, look up information about the entity the name refers to In a hierarchical namespace, resolution works by: –Picking a starting point –Working down, across, or up the hierarchy from there A closure mechanism is a way of deciding where to start name resolution –For local absolute names: where’s the root node? –For relative names: where’s the current node? –For global names: which root node?
10/12/2015Distributed Systems - Comp Resolution implementation Name resolution for common name spaces is usually an operating system function –File system names –DNS names
10/12/2015Distributed Systems - Comp Namespace collaboration Linking Mounting Composite names Abstract naming system interfaces
10/12/2015Distributed Systems - Comp Linking Aliases (aka synonyms) –Hard links (multiple absolute paths to the same entity) –Symbolic links (leaf nodes contains an absolute path to the entity) Beware of cycles Symbolic links often integrate smoothly into distributed systems –hard links cannot be made between files on different file systems nor between directories
Distributed Systems - COMP 655 Linking 10/12/201527
10/12/2015Distributed Systems - Comp Mounting Mounting == allowing a directory node to store the identifier of a directory node in some other namespace Mount point == the local directory node Mounting point == the remote directory node –For UNIX file systems, mounting point is usually a root node –For Windows file systems, mount point is usually a root node (example – G: drive maps to \\randomserver\games)
Distributed Systems - COMP 655 Mounting Information required to mount a foreign name space in a distributed system The name of an access protocol. The name of the server. The name of the mounting point in the foreign name space. 10/12/201529
Distributed Systems - COMP 655 Linking and Mounting 10/12/201530
10/12/2015Distributed Systems - Comp Composite names Include the three essentials in one string: ftp: //ftp.cs.vu.nl/home/steen/mbox protocolserver resource name (in remote name space) http: //cs.franklin.edu/~chuc /655/
10/12/2015Distributed Systems - Comp Composite names in the Java RMI Registry //einstein:4310/SuperTalk //:4321/Inventory //einstein.franklin.edu/Mfg // :4300/chat //host:port/servicename Structure Examples
10/12/2015Distributed Systems - Comp Iterative name resolution Resolving ftp://ftp.cs.vu.nl NOTE: client’s name resolver may not run on the client machine. It may also be a name server for local entities
10/12/2015Distributed Systems - Comp Recursive name resolution Resolving ftp://ftp.cs.vu.nl
10/12/2015Distributed Systems - Comp Compare & contrast Advantages of recursive resolution: –Name servers can cache addresses of lower- level nodes –Usually, fewer long-haul communications Disadvantage of recursive resolution: –Higher-level name servers can become bottlenecks
Distributed Systems - COMP 655 Example: The Domain Name System 10/12/201536
10/12/2015Distributed Systems - Comp Name service clients Embedded in applications –Web browsers – servers – clients –ftp, ssh, etc Command line –nslookup –dig
10/12/2015Distributed Systems - Comp nslookup types on p. 202, cs.vu.nl table on p. 205 $ nslookup Default Server: ns1.franklin.edu Address: > set type=ANY > cs.vu.nl Server: ns1.franklin.edu Address: Non-authoritative answer: cs.vu.nl nameserver = top.cs.vu.nl cs.vu.nl nameserver = solo.cs.vu.nl cs.vu.nl nameserver = star.cs.vu.nl cs.vu.nl nameserver = ns.vu.nl Authoritative answers can be found from: cs.vu.nl nameserver = solo.cs.vu.nl cs.vu.nl nameserver = star.cs.vu.nl cs.vu.nl nameserver = ns.vu.nl cs.vu.nl nameserver = top.cs.vu.nl top.cs.vu.nl internet address = solo.cs.vu.nl internet address =
10/12/2015Distributed Systems - Comp dig To find: Google dig dns download
10/12/2015Distributed Systems - Comp Codd on dig
10/12/2015Distributed Systems - Comp JNDI ceproviders.htmlhttp://java.sun.com/products/jndi/servi ceproviders.html
10/12/2015Distributed Systems - Comp Summary: naming system patterns Hierarchical namespace Independent administration of sub-trees Symbolic links Synonyms Name includes the name of an interpretative system