Upload
norman-norris
View
220
Download
2
Tags:
Embed Size (px)
Citation preview
COMP 655:Distributed/Operating
SystemsSummer 2011
Dr. Chunbo ChuWeek 5: Naming
04/21/23 1Distributed Systems - COMP 655
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
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
04/21/23 Distributed Systems - Comp 655 4
Aspects of human-friendliness
What do humans need in the names they use?
•
•
•
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/
04/21/23 Distributed Systems - Comp 655 6
Types of system-friendly names
• Addresses• Identifiers
Brainstorm• What are identifiers, addresses?
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
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
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)
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.
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
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
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.
04/21/23 Distributed Systems - Comp 655 14
What about part 7 of the naming problem
(global scalability)?
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
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
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
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
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
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
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
Distributed Systems - COMP 655
Name Space Distribution (2)
04/21/23 22
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?
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
04/21/23 Distributed Systems - Comp 655 25
Namespace collaboration• Linking• Mounting• Composite names• Abstract naming system interfaces
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
Distributed Systems - COMP 655
Linking
04/21/23 27
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)
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
Distributed Systems - COMP 655
Linking and Mounting
04/21/23 30
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/
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
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
04/21/23 Distributed Systems - Comp 655 34
Recursive name resolution
Resolving ftp://ftp.cs.vu.nl
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
Distributed Systems - COMP 655
Example: The Domain Name System
04/21/23 36
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
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
04/21/23 Distributed Systems - Comp 655 39
digTo fi
nd
: G
oog
le d
ig d
ns
dow
nlo
ad
04/21/23 Distributed Systems - Comp 655 40
Codd on dig
04/21/23 Distributed Systems - Comp 655 41
JNDI
• http://java.sun.com/products/jndi/• http://java.sun.com/products/jndi/ser
viceproviders.html
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