comp 655: distributed/operating systems summer 2011 dr. chunbo chu week 5: naming...
TRANSCRIPT
![Page 1: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/1.jpg)
COMP 655:Distributed/Operating
SystemsSummer 2011
Dr. Chunbo ChuWeek 5: Naming
04/21/23 1Distributed Systems - COMP 655
![Page 2: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/2.jpg)
04/21/23 Distributed Systems - Comp 655 2
What is the naming problem?
Name objects in distributed systems so that the naming system provides
1. Human-friendly names for use by people2. System-friendly names for use by systems3. Uniqueness where necessary4. Ambiguity when helpful5. A service that can be used in many
systems6. Minimal centralized administration7. Global scalability
![Page 3: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/3.jpg)
04/21/23 Distributed Systems - Comp 655 3
Ambiguity when usefulwww.yahoo.akadns.net27 A 216.109.118.78
www.yahoo.akadns.net27 A 216.109.118.64
www.yahoo.akadns.net27 A 216.109.118.65
www.yahoo.akadns.net27 A 216.109.118.66
www.yahoo.akadns.net27 A 216.109.118.72
www.yahoo.akadns.net27 A 216.109.118.73
www.yahoo.akadns.net27 A 216.109.118.74
www.yahoo.akadns.net27 A 216.109.118.76
![Page 4: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/4.jpg)
04/21/23 Distributed Systems - Comp 655 4
Aspects of human-friendliness
What do humans need in the names they use?
•
•
•
![Page 5: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/5.jpg)
04/21/23 Distributed Systems - Comp 655 5
Examples of human-friendly names
• Albert Einstein• einstein• cs.franklin.edu• franklin.edu• edu• http://cs.franklin.edu/~chuc/655/• /home/export/cs/Htdocs/Syllabus/comp655/
![Page 6: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/6.jpg)
04/21/23 Distributed Systems - Comp 655 6
Types of system-friendly names
• Addresses• Identifiers
Brainstorm• What are identifiers, addresses?
![Page 7: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/7.jpg)
04/21/23 Distributed Systems - Comp 655 7
Address• Definition – a name that refers to an
access point in a communication system• Examples
– [email protected]– 205.133.198.15:1677– 00-04-E2-36-A0-5E– 201 S. Grant Avenue, Columbus, Ohio
43215– 614-797-4700– 877-341-6300
![Page 8: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/8.jpg)
04/21/23 Distributed Systems - Comp 655 8
DefinitionIdentifier – a name with the following
properties:1. It refers to at most one entity2. An entity has at most one identifier3. Once used for one entity, its meaning
never changes
-- Tanenbaum, Page 181
![Page 9: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/9.jpg)
04/21/23 Distributed Systems - Comp 655 9
Examples of identifiers
• {72eb61e0-8672-4303-9175-f2e4c68b2e7c}
• {b4431a67-9e32-4e2d-81e5-076a5f1b6170}
• 6a29b0a6b9ad79c8:f72617:ff5c75073e:-7ffd
• 00-04-E2-36-A0-5E• 123-45-6789 (close to being an identifier)
![Page 10: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/10.jpg)
04/21/23 Distributed Systems - Comp 655 10
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.
![Page 11: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/11.jpg)
04/21/23 Distributed Systems - Comp 655 11
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
– count, a short to distinguish UIDs generated in the same VM with the same time value
![Page 12: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/12.jpg)
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.
04/21/23 Distributed Systems - Comp 655 12
![Page 13: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/13.jpg)
04/21/23 Distributed Systems - Comp 655 13
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.
![Page 14: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/14.jpg)
04/21/23 Distributed Systems - Comp 655 14
What about part 7 of the naming problem
(global scalability)?
![Page 15: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/15.jpg)
04/21/23 Distributed Systems - Comp 655 15
Easy namingDirectory 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
![Page 16: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/16.jpg)
04/21/23 Distributed Systems - Comp 655 16
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
![Page 17: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/17.jpg)
04/21/23 Distributed Systems - Comp 655 17
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
![Page 18: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/18.jpg)
04/21/23 Distributed Systems - Comp 655 18
Name spacedirectorytable
rootnode
path name(“absolute”)relative path name:
steen/.twmrc
global path name:nfs://flits/home/steen/.twmrc
![Page 19: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/19.jpg)
04/21/23 Distributed Systems - Comp 655 19
Another name space: Java packages and classes
dino.naming.NameChooser
java.rmi.server. ObjID
dino/naming/NameChooser.class
java/rmi/server/ObjID.class
![Page 20: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/20.jpg)
04/21/23 Distributed Systems - Comp 655 20
Yet another name space: DNS names
<domain> ::= <subdomain> | " "
<subdomain> ::= <label> | <subdomain> "." <label>
<label> ::= <letter> [ [ <ldh-str> ] <let-dig> ]
<ldh-str> ::= <let-dig-hyp> | <let-dig-hyp> <ldh-str>
<let-dig-hyp> ::= <let-dig> | "-"
<let-dig> ::= <letter> | <digit>
<letter> ::= any one of the 52 alphabetic characters A through Z in upper case and a through z in lower case
<digit> ::= any one of the ten digits 0 through 9
Source: RFC-1035
![Page 21: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/21.jpg)
04/21/23 Distributed Systems - Comp 655 21
Three layers of DNS names
Top-level domains
DN
S s
up
port
s to
p 2
le
vels
loca
l file
sy
stem
![Page 22: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/22.jpg)
Distributed Systems - COMP 655
Name Space Distribution (2)
04/21/23 22
![Page 23: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/23.jpg)
04/21/23 Distributed Systems - Comp 655 23
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?
![Page 24: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/24.jpg)
04/21/23 Distributed Systems - Comp 655 24
Resolution implementation• Name resolution for common name
spaces is usually an operating system function– File system names– DNS names
![Page 25: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/25.jpg)
04/21/23 Distributed Systems - Comp 655 25
Namespace collaboration• Linking• Mounting• Composite names• Abstract naming system interfaces
![Page 26: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/26.jpg)
04/21/23 Distributed Systems - Comp 655 26
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
![Page 27: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/27.jpg)
Distributed Systems - COMP 655
Linking
04/21/23 27
![Page 28: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/28.jpg)
04/21/23 Distributed Systems - Comp 655 28
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)
![Page 29: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/29.jpg)
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.
04/21/23 29
![Page 30: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/30.jpg)
Distributed Systems - COMP 655
Linking and Mounting
04/21/23 30
![Page 31: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/31.jpg)
04/21/23 Distributed Systems - Comp 655 31
Composite names
Include the three essentials in one string:
ftp: //ftp.cs.vu.nl /home/steen/mbox
protocol serverresource name (in remote name space)
http: //cs.franklin.edu /~chuc/655/
![Page 32: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/32.jpg)
04/21/23 Distributed Systems - Comp 655 32
Composite names in the Java RMI Registry
//einstein:4310/SuperTalk
//:4321/Inventory
//einstein.franklin.edu/Mfg
//192.70.252.120:4300/chat
//host:port/servicenameStructure
Examples
![Page 33: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/33.jpg)
04/21/23 Distributed Systems - Comp 655 33
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
![Page 34: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/34.jpg)
04/21/23 Distributed Systems - Comp 655 34
Recursive name resolution
Resolving ftp://ftp.cs.vu.nl
![Page 35: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/35.jpg)
04/21/23 Distributed Systems - Comp 655 35
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
![Page 36: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/36.jpg)
Distributed Systems - COMP 655
Example: The Domain Name System
04/21/23 36
![Page 37: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/37.jpg)
04/21/23 Distributed Systems - Comp 655 37
Name service clients• Embedded in applications
– Web browsers– Email servers– Email clients– ftp, ssh, etc
• Command line– nslookup– dig
![Page 38: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/38.jpg)
04/21/23 Distributed Systems - Comp 655 38
nslookupty
pes
on
p.
20
2,
cs.v
u.n
l ta
ble
on
p.
20
5$ nslookupDefault Server: ns1.franklin.eduAddress: 192.70.252.125
> set type=ANY> cs.vu.nlServer: ns1.franklin.eduAddress: 192.70.252.125
Non-authoritative answer:cs.vu.nl nameserver = top.cs.vu.nlcs.vu.nl nameserver = solo.cs.vu.nlcs.vu.nl nameserver = star.cs.vu.nlcs.vu.nl nameserver = ns.vu.nl
Authoritative answers can be found from:cs.vu.nl nameserver = solo.cs.vu.nlcs.vu.nl nameserver = star.cs.vu.nlcs.vu.nl nameserver = ns.vu.nlcs.vu.nl nameserver = top.cs.vu.nltop.cs.vu.nl internet address = 192.31.231.43solo.cs.vu.nl internet address = 130.37.24.1
![Page 39: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/39.jpg)
04/21/23 Distributed Systems - Comp 655 39
digTo fi
nd
: G
oog
le d
ig d
ns
dow
nlo
ad
![Page 40: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/40.jpg)
04/21/23 Distributed Systems - Comp 655 40
Codd on dig
![Page 41: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/41.jpg)
04/21/23 Distributed Systems - Comp 655 41
JNDI
• http://java.sun.com/products/jndi/• http://java.sun.com/products/jndi/ser
viceproviders.html
![Page 42: COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 5: Naming 10/12/20151Distributed Systems - COMP 655](https://reader035.vdocuments.us/reader035/viewer/2022062409/56649eb25503460f94bb8bd9/html5/thumbnails/42.jpg)
04/21/23 Distributed Systems - Comp 655 42
Summary: naming system patterns
• Hierarchical namespace• Independent administration of sub-
trees• Symbolic links• Synonyms • Name includes the name of an
interpretative system