1.09k likes | 1.21k Views
ITEC801 Distributed Systems. Naming & Name Services Coulouris Chapter 9. Important Things. What is a Name? Why are names important? What is binding? When can it happen? Name resolution Approaches to navigating name servers Example systems DNS. X.500, LDAP. Use of Names.
E N D
ITEC801Distributed Systems Naming & Name Services Coulouris Chapter 9
Important Things • What is a Name? • Why are names important? • What is binding? When can it happen? • Name resolution • Approaches to navigating name servers • Example systems • DNS. X.500, LDAP Naming
Use of Names • A name identifies what you want. • names are used to refer to resources • Services • Nodes • network attachment • Paths • Files • objects within services Naming
Other Related terms • Address: An address identifies where the named entity is. • Route: A route identifies a way to get there. • Binding: Binding is the process of mapping a name to a address. • Context: A context is a particular set of bindings. • Each context has an associated naming • convention Naming
Other Related terms • Naming System: Connected set of contexts of the same type and provides a common set of operations • name service: A service that provides a binding function. • Name space: Set of names in the naming system Naming
Scope • Some names valid only for a particular service • File for file service • Process id for process server • Some beyond a single service • User name • Computer name • Service name • In internet naming is potentially global in scope Naming
Addresses (Access Points) , Names, • All named entities can be operated upon. • Printer • Network connection • To operate on an entity, we need to access it. • Access Point: each entity can be accessed using its access point called an address. • Address: An address identifies where the named entity is. • Route: A route identifies a way to get there. Naming
Identifiers • Identifier • At most one entity • At most one identifier • Always the same entity • Identifier includes or can be transformed to an address for an object • E.g. NFS file handle, Corba remote object reference Naming
Identifiers • A name • Is human readable • Can be resolved to an identifier or an address • These are not the same Naming
Names and Addresses • An address is just a special kind of a name?? • Why do we need both a name and an address to refer to an entity • An entity can have more than one address (access point) • An entity can change its addresses in the course of time. • Addresses usually not human friendly. • Clarity • Location Independence Naming
Identifiers and Names • For many purposes, names are preferable to identifiers • Binding can be changed: • Human Friendly nature: • machine readable form Naming
More Terms • A name is resolved when it is translated into data about the named resource • The association between a name and an object is called a binding • Simplest form of binding • Distributed Systems Naming
URL http://www.cdk3.net:8888/WebExamples/earth.html file Socket Web server Composed naming domains used to access a resource from a URL DNS lookup Resource ID (IP number, port number, pathname) 138.37.88.61 8888 WebExamples/earth.html ARP lookup (Ethernet) Network address 2:60:8c:2:b0:5a Naming *
Interpreting Names • Names are usually used to look up collections of names in a table (directory, name server) to yield the value. • Context: A context is a particular set of bindings. • A name only has meaning relative to some context. Naming
Interpreting Names • A name service stores a collection of one or more naming contexts • The major service of a name server is to resolve a name • Creation of new bindings • Deletion of bindings • Listing of bound names • Addition and deletion of contexts Naming
Ideal Name Service Should • Handle an arbitrarily large collection of names and administrative organisations • Have a long life time • Have high availability • Be fault tolerant • Not rely on components being trusted by all clients Naming
Uses of Names • The above is a bit glib • there are many uses of naming in distributed systems • they are not necessarily catered for by the same naming structure and common naming mechanism • Machine to service mapping. Naming
Name Spaces • A name space: A context within which the names of all objects must be unambiguously resolvable. • Collection of all valid names recognised by a name server • A valid name does not necessarily correspond to an actual something • Name spaces require a syntactic definition of a valid name • Internal Structure versus flat • Pure and non pure names Naming
Flat Name Space • Name is assigned to an address. • Name a sequence of characters without structure. • May or may not have a common section. • Issues with scaling. • Unambiguously resolvable requirement Naming
Scaling • Distributed systems: • Indefinite number of machines for naming. • Not prudent to redesign the system: • the name space should be managed rather than scale disasters avoided • a prominent feature is the use of hierarchy to avoid accidental non-uniqueness of names Naming
Hierarchies • Uniqueness and scaling through hierarchy • Hierarchical solution quite popular. • this leads to multi-part names which resemble (and thus need to be carefully distinguished from) names in such systems as Unix • Assures Uniqueness Naming
Hierarchical Names • compound name • Divided into different sub parts. • Subname Space • Uniqueness necessary only in subname space: To be unambiguously resolvable • So same name may be reused in different contexts. • Example: Unix path names: /etc/passwd, /oldetc/passwd, different machines. • Name space potentially limitless in size • scale to extremely large networks • Example: DNS systems in Internet Naming
Name Resolution • A name is presented to a context • The context maps the name into data about the named resource or object. • Data : A set of primitive attributes. • Attribute: Most common is address. • Examples: • DNS • X.500 • Corba Naming service Naming
URL http://www.cdk3.net:8888/WebExamples/earth.html DNS lookup Resource ID (IP number, port number, pathname) 55.55.55.55 8888 WebExamples/earth.html Web server Network address file 2:60:8c:2:b0:5a Socket Domain Name Resolution Naming
Name Servers • No large service will store all information on a single machine • Such a machine would be • Single point of failure • Bottleneck • Any heavily used name service uses replication and/or partitioning Naming
Name Server • Local name server stores naming data for the local domain • Data is therefore partitioned amongst the servers • The local name server cannot answer all enquiries • It may store some data from outside (responsible for more than domain, caching) but won’t store all Naming
Navigation • The process of locating naming data from more than one name server • The client name resolution software does this for the client • Various approaches • Iterative navigation • Multicast navigation • Non-recursive server controlled navigation • Recursive server controlled navigation Naming
Iterative Navigation • Used by DNS and NFS • NFS due to its Symbolic links. • Naming Client presents name to local server • If result is another context, client presents next part of name to that server and so on. • Queries to be satisfied locally NS2 2 Name servers 1 Client NS1 NS3 3 Naming
Multicast navigation • Client multicasts name to all servers • Only server holding named attributes replies • Unbound name gets no reply – which is the same result for a bound name held by a down server • Cheriton and Mann Extension • Used in discovery services Naming
Non-recursive Server Controlled • Naming Client presents name to local server • Server then communicates iteratively or recursively with its peers to resolve name NS2 2 Name servers 1 Client NS1 4 NS3 3 Naming
Recursive Server Controlled • Naming Client presents name to local server • Name is passed recursively to servers until resolved, and then back. • Client controlled and non recursive schemes are restricted. NS2 2 1 Client NS1 3 4 5 Name servers NS3 Naming
Distributed Systems • what's different about distributed systems? • they are not centralised • if there is anywhere in the system that necessarily has to have global information, it is not really distributed Naming
Bindings • there is more naming in distributed systems because there is more binding • that is, there is more that can change, for example • binding machines to addresses • binding services to machines Naming
Binding types • An important issue in binding is that of when the binding takes place. • static binding: essentially a hard-coded binding. • Least flexible • Example: Static cache for address resolution • dynamic binding: have some mechanism for resolving the name on demand. • early binding: Binding performed some time before the binding is needed. • late binding: binding is performed on demand, just before use. Naming
Bindings • conventional wisdom in distributed systems holds that early binding is to be avoided • in practice this is not always followed • some programs which should consult name servers will have addresses hard coded into them, which can lead to services failing • Late Binding is more flexible. Naming
Caching • Systems cache results of previous lookups • Name servers in DNS • ARP cache • Caching assists performance and availability • Response times reduced. • Elimination of some servers from navigation path. • Widely used in name servers • Successful because naming data rarely changes • Can still lead to incorrect results being returned Naming
Replicated Name Servers • Useful for reliability and availability • Can give problems of consistency • The following is generally true of any replication • Consistency important. • Immediate: Cost • Long term. Naming
Names and resources • Currently, different name systems are used for each type of resource: resource name identifies • file pathname file within a given file system • process process id process on a given computer • port port number IP port on a given computer Naming
Uniform Resource Identifier • Uniform Resource Identifiers (URI) offer a general solution for any type of resource. There two main classes: • URL Uniform Resource Locator • typed by the protocol field (http, ftp, nfs, etc.) • part of the name is service-specific • resources cannot be moved between domains • URN Uniform Resource Name • requires a universal resource name lookup service - a DNS-like system for all resources Naming
Uniform Resource Locators • Scale to unlimited number of web resources • Are addresses of web resources • If resource deleted or moved and URL still used no, or incorrect, information returned Naming
Uniform Resource Name • Idea is for web resource to have a URN that persists even if resources moves • Need URN lookup service • Resource registered with lookup service • Service translates URN to URL • New URL registered if resource moves Naming
More on URNs • format: urn:<nameSpace>:<name-within-namespace> • examples: • urn:ISBN:021-61918-0 • urn:dcs.qmul.ac.uk:TR2000-56 Naming *
URN Resolution: • send a request to nearest ISBN-lookup service - it would return whatever attributes of a book are required by the requester • send a request to the urn lookup service at dcs.qmul.ac.uk • it would return a url for the relevant document Naming
Directory and Discovery Service • Allow look up on more than just names • DNS • Allow look up on one or more attribute • X.500 Directory • Names are treated as just another attribute • We will now discuss DNS and X.500 Directory service Naming
DNS: History • Before 1980, ARPANET: A few hundred networked computers • Single file (Hosts.txt) for name to address mapping: • SRI (NIC) in Menlo Park California. • Other hosts copied this file as and when required • As ARPANET increased in size, problems surfaced • Hosts.txt: became too large • needed to be updated more than once a day • Traffic bottleneck and Flat name space problem • Solution: Creation of DNS (RFCs 882,1035) • DNS: Hierarchical Name Space Naming
Some concepts regarding Hierarchy • directory or naming network: A set of catalogs that may include other directories • naming hierarchy: A naming network organized in a tree-structured form. • Pathname • Root • Examples: • /etc/passwd • ftp.cs.vu.nl Naming
Hierarchy Name Space Distribution • Typically a single root node. • Global layer • Nodes at Highest levels: • Stability • Administrative layer • Organization specific • Represent groups • Managerial Layer • Nodes that typically change regularly. • Shared files, user defined Naming
DNS • Hierarchical client/server-based systems • Application layer functionality • Purpose: Translation • Clients: resolvers • servers: name servers (NS) • Analogous to a Telephone book • Resolvers: Passing requests between application and NS • NS: take requests and resolves names to addresses Naming
Name Space and Names • DNS name space is hierarchical • Domain name consists of one or more strings called name components or labels • No delimiter at beginning or end of name • Root sometimes referred to as ‘.’ • Names cannot contain ‘.’ and must printable • Not case sensitive Naming
Domains • DNS a collection of domain names • A domain’s name is the suffix of the names within it • Sometimes difficult to distinguish a domain name from the name of a computer Naming