Distributed Systems Principles and Paradigms Chapter 04 Naming.

Slides:



Advertisements
Similar presentations
Rasool Jalili, OS2, Sem Naming Chapter 4. Rasool Jalili, OS2, Sem Advertisment!! Please inform the students to subscribe to the mailing.
Advertisements

Dr. Kalpakis CMSC621 Advanced Operating Systems Naming.
Naming Computer Engineering Department Distributed Systems Course Asst. Prof. Dr. Ahmet Sayar Kocaeli University - Fall 2014.
Distributed Systems Principles and Paradigms Chapter 04 Naming.
Naming Technologies within Distributed Systems
Univ. of TehranDistributed Operating Systems1 Advanced Operating Systems University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani.
Naming in Distributed System Presented by Faraz Rasheed & Uzair Ahmed RealTime & Multimedia Lab Kyung Hee University, Korea.
The implementation of a name space
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
CS 582 / CMPE 481 Distributed Systems Naming Class Overview Why naming? Terminology Naming Fundamentals Name Services Case Studies –DNS –GNS.
Chapter 4  Naming 1 Naming Chapter 4 Chapter 4  Naming 2 Why Naming?  Names are needed to o Identify entities o Share resources o Refer to locations,
Naming Chapter 4. Naming Names are used to share resources, to uniquely identify entities, or to refer to locations. Name resolution is used for a process.
Computer Science Lecture 9, page 1 CS677: Distributed OS Today: Naming Names are used to share resources, uniquely identify entities and refer to locations.
Naming Names in computer systems are used to share resources, to uniquely identify entities, to refer to locations and so on. An important issue with naming.
NamingCS-4513, D-Term Naming CS-4513 Distributed Computing Systems (Slides include materials from Operating System Concepts, 7 th ed., by Silbershatz,
Distributed Systems CS Naming – Part II Lecture 6, Sep 26, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud.
EEC-681/781 Distributed Computing Systems Lecture 9 Wenbing Zhao Cleveland State University.
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
1 Naming Names are used to uniquely identify resources/services. Name resolution: process to determine the actual entity that a name refers to. In distributed.
NamingCS-4513, D-Term Naming CS-4513 Distributed Computing Systems (Slides include materials from Operating System Concepts, 7 th ed., by Silbershatz,
Distributed Systems Naming Chapter 5.
Naming Names in computer systems are used to share resources, to uniquely identify entities, to refer to locations and so on. An important issue with naming.
Naming Chapter 5. n Most of the lecture notes are based on slides by Prof. Jalal Y. Kawash at Univ. of Calgary n Some slides are from Brennen Reynolds.
Distributed Computing COEN 317 DC2: Naming, part 1.
ICS362 Distributed Systems Dr Ken Cosh Week 5. Review Communication – Fundamentals – Remote Procedure Calls (RPC) – Message Oriented Communication – Stream.
Computer Science Lecture 9, page 1 CS677: Distributed OS Today: Naming Names are used to share resources, uniquely identify entities and refer to locations.
Chapter 16 – DNS. DNS Domain Name Service This service allows client machines to resolve computer names (domain names) to IP addresses DNS works at the.
Naming. Names play a very important role in all computer system. A name is a string of bits or characters that used to refer to an entity – eg:- recourse.
5.1 Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED.
Naming Chapter 4. Name Spaces (1) A general naming graph with a single root node.
Naming Chapter 4.
Distributed Computing COEN 317 DC2: Naming, part 1.
Naming (1) Chapter 4. Chapter 4 topics What’s in a name? Approaches for naming schemes Directories and location services Distributed garbage collection.
Distributed Systems Principles and Paradigms Minqi Zhou Chapter 05: Naming.
6. Naming (name services)
Computer Science Lecture 9, page 1 CS677: Distributed OS Last Class: Naming Name distribution: use hierarchies DNS Iterative versus Recursive name resolution.
Fall 2007cs4251 Distributed Computing Umar Kalim Dept. of Communication Systems Engineering 10/12/2007.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Univ. of TehranDistributed Operating Systems1 Advanced Operating Systems University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Naming Chapter 4. Naming Names are used to share resources, to uniquely identify entities, or to refer to locations. Name resolution is used for a process.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
1. Outline  Introduction  Different Mechanisms Broadcasting Multicasting Forward Pointers Home-based approach Distributed Hash Tables Hierarchical approaches.
ADVANCED OPERATING SYSTEMS STRUCTURED NAMING BY KANNA KARRI.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Attribute based Naming
Internet Naming Service: DNS* Chapter 5. The Name Space The name space is the structure of the DNS database –An inverted tree with the root node at the.
Naming CSCI 6900/4900. Mounting Mounting – Merging different namespaces transparently File system example –Directory node of one namespace stores identifier.
Lecture 9: Name and Directory Servers CDK4: Chapter 9 CDK5: Chapter 13 TVS: Chapter 5.
Naming CSCI 6900/4900. Names & Naming System Names have unique importance –Resource sharing –Identifying entities –Location reference Name can be resolved.
Naming CSCI 4780/6780. Name Space Implementation Naming service – A service that lets users to add/delete and lookup names In large distributed systems.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Naming Chapter 4. Table of Contents Concepts Locate mobile entities Garbage collection.
Domain Name System: DNS To identify an entity, TCP/IP protocols use the IP address, which uniquely identifies the Connection of a host to the Internet.
Naming Chapter 4.
Naming A name in a distributed system is a string of bits or characters used to refer to an entity. To resolve name a naming system is needed.
Net 323 D: Networks Protocols
5.3. Structured Naming Advanced Operating Systems Fall 2017
Lecture 7: Name and Directory Servers
Lecture 7: Name and Directory Servers
Naming (1) Chapter 4.
5.2 FLAT NAMING.
Lecture 8: Name and Directory Servers
Distributed Systems CS
Distributed Systems CS
Distributed Systems CS
Distributed Systems CS
Distributed Systems CS
Presentation transcript:

Distributed Systems Principles and Paradigms Chapter 04 Naming

Names, identifiers, and addresses Name resolution Name space implementation Naming Entities 04 – 1 Naming/4.1 Naming Entities

Naming Essence: Names are used to denote entities in a distributed system. To operate on an entity, we need to access it at an access point. Access points are entities that are named by means of an address. Note: A location-independent name for an entity E, is independent from the addresses of the access points offered by E. 04 – 2 Naming/4.1 Naming Entities

Pure name: A name that has no meaning at all; it is just a random string. Pure names can be used for comparison only. Identifier: A name having the following properties: - P1 Each identifier refers to at most one entity - P2 Each entity is referred to by at most one identifier - P3 An identifier always refers to the same entity (prohibits reusing an identifier) Observation: An identifier need not necessarily be a pure name, i.e., it may have content. Question: Can the content of an identifier ever change? Identifiers 04 – 3 Naming/4.1 Naming Entities

Name Space (1/2) Essence: a graph in which a leaf node represents a (named) entity. A directory node is an entity that refers to other nodes. Note: A directory node contains a (directory) table of (edge label, node identifier) pairs. 04 – 4 Naming/4.1 Naming Entities

Type of the entity An identifier for that entity Address of the entity’s location Nicknames... Name Space (2/2) Observation: We can easily store all kinds of attributes in a node, describing aspects of the entity the node represents: Observation: Directory nodes can also have attributes, besides just storing a directory table with (edge label, node identifier) pairs. 04 – 5 Naming/4.1 Naming Entities

Name Resolution Name Resolution - the process of looking up a name Problem: To resolve a name we need a directory (initial) node. How do we actually find that initial node? Closure mechanism: The mechanism to select the implicit context from which to start name resolution: Question: Why are closure mechanisms always implicit? Observation: A closure mechanism may also determine how name resolution should proceed 04 – 6 Naming/4.1 Naming Entities

Hard link: What we have described so far is a path name: a name that is resolved by following a specific path in a naming graph from one node to another. Soft link: Allows a node O to contain a name of another node: First resolve O ’s name (leading to O ) Read the content of O, yielding name Name resolution continues with name Observations: The name resolution process determines that we read the content of a node, in particular, the name in the other node that we need to go to. One way or the other, we know where and how to start name resolution given name Name Linking (1/2) 04 – 7 Naming/4.1 Naming Entities

Name Linking (2/2) Observation: the path name /home/steen/keys, which refers to a node containing the absolute path name /keys, is a symbolic link to node n5. 04 – 8 Naming/4.1 Naming Entities

Merging Name Spaces (1/3) Problem: We have different name spaces that we wish to access from any given name space. Solution 1: Introduce a naming scheme by which pathnames of different name spaces are simply concatenated (URLs). 04 – 9 Naming/4.1 Naming Entities

Merging Name Spaces (2/3) Solution 2: Introduce nodes that contain the name of a node in a “foreign” name space, along with the information how to select the initial context in that foreign name space. Mount point: (Directory) node in naming graph that refers to other naming graph Mounting point: (Directory) node in other naming graph that is referred to. 04 – 10 Naming/4.1 Naming Entities

Merging Name Spaces (3/3) Solution 3: Use only full pathnames, in which the starting context is explicitly identified, and merge by adding a new root node (DCE’s Global Name Space). Note: In principle, you always have to start from the new root 04 – 11 Naming/4.1 Naming Entities

Name Space Implementation (1/2) Basic issue: Distribute the name resolution process as well as name space management across multiple machines, by distributing nodes of the naming graph. Consider a hierarchical naming graph and distinguish three levels: Global layer: Consists of the high-level directory nodes. Main aspect is that these directory nodes have to be jointly managed by different administrations Administrational layer: Contains mid-level directory nodes that can be grouped in such a way that each group can be assigned to a separate administration. Managerial layer: Consists of low-level directory nodes within a single administration. Main issue is effectively mapping directory nodes to local name servers. 04 – 12 Naming/4.1 Naming Entities

Name Space Implementation (2/2) 04 – 13 Naming/4.1 Naming Entities

Iterative Name Resolution 04 – 14 Naming/4.1 Naming Entities resolve(dir, [name1,…, nameK]) is sent to Server0 responsible for dir Server0 resolves resolve(dir, name1) → dir1, returning the identification (address) of Server1, which stores dir1. Client sends resolve(dir1,[name2,…, nameK]) to Server1 etc.

Recursive Name Resolution 04 – 15 Naming/4.1 Naming Entities resolve(dir,[name1,…,nameK]) is sent to Server0 responsible for dir Server0 resolves resolve(dir, name1) → dir1, and sends resolve(dir,[name2,…,nameK]) to Server1, which stores dir1. Server0 waits for the result from Server1, and returns it to the client

04 – 16 Naming/4.1 Naming Entities Caching in Recursive Name Resolution Also see Figure 4-11 for the comparison between recursive and iterative name resolution with respect to communication costs.

Example 1: Internet Domain Name System (DNS) 04 – 17ANaming/4.1 Naming Entities - used for looking up IP addresses of hosts and mail servers in Internet - comparable to a telephone book (white pages) for looking up phone numbers - DNS name space is hierarchically organized as a rooted tree - The contents of a node is formed by a collection of resource records - Multiple (primary, secondary, etc.) DNS servers are usually deployed for an organization to increase availability - nslookup is a utility for querying DNS service

DNS Resource Records Figure The most important types of resource records forming the contents of nodes in the DNS name space. Type of record Associated entity Description SOAZoneHolds information on the represented zone AHostContains an IP address of the host this node represents MXDomainRefers to a mail server to handle mail addressed to this node SRVDomainRefers to a server handling a specific service NSZoneRefers to a name server that implements the represented zone CNAMENodeSymbolic link with the primary name of the represented node PTRHostContains the canonical name of a host HINFOHostHolds information on the host this node represents TXTAny kindContains any entity-specific information considered useful 04 – 17B Naming/4.1 Naming Entities

Figure An excerpt from the DNS database for the zone cs.vu.nl. Sample DNS Records 04 – 17C

- ITU standard for directory services - provides directory service based on a description of properties instead of a full name (e.g., yellow pages in telephone book) - an X.500 directory entry is comparable to a resource record in DNS - Each record is made up of a collection of (attribute, value) pairs - The collection of all entries is called Directory Information Base (DIB) - Each entry in a DIB can be looked up using a sequence of naming attributes, which forms a globally unique name called Distinguished Name (DN). Each naming attribute is called Relative Distinguished Name (RDN) - e.g., /C=KR/O=POSTECH/OU=Dept. of CSE is analogous to the DNS name cse.postech.ac.kr - X.500 also forms a hierarchy of the collection of entries called Directory Information Tree (DIT) 04 – 18A Naming/4.1 Naming Entities Example 2: X.500 Directory Service (1)

A simple example of a X.500 directory entry using X.500 naming conventions. AttributeAbbr.Value CountryCNL LocalityLAmsterdam OrganizationLVrije Universiteit OrganizationalUnitOUMath. & Comp. Sc. CommonNameCNMain server Mail_Servers , , FTP_Server WWW_Server X.500 Directory Entry Example 04 – 18B Naming/4.1 Naming Entities

A Part of Directory Information Tree 04 – 18C Naming/4.1 Naming Entities

Two directory entries having Host_Name as RDN AttributeValueAttributeValue CountryNLCountryNL LocalityAmsterdamLocalityAmsterdam OrganizationVrije UniversiteitOrganizationVrije Universiteit OrganizationalUnitMath. & Comp. Sc.OrganizationalUnit Math. & Comp. Sc. CommonNameMain serverCommonNameMain server Host_NamestarHost_Namezephyr Host_Address Host_Address – 18D Naming/4.1 Naming Entities

- DIT is usually partitioned and distributed across multiple servers known as Directory Service Agents (DSA) - Clients are known as Directory User Agents (DUA) - Directory Access Protocol (DAP) is used between DUA and DSA to insert/lookup/modify/delete entries in DSA - traditionally implemented using OSI protocols - Lightweight Directory Access Protocol (LDAP) - implemented on top of TCP - parameters of operations are passed as strings - becoming a de facto standard for Internet-based directory services for various applications 04 – 18E Naming/4.1 Naming Entities Example 2: X.500 Directory Service (2)

Locating Mobile Entities Naming versus locating objects Simple solutions Home-based approaches Hierarchical approaches 04 – 19 Naming/4.2 Locating Mobile Entities

Naming & Locating Objects (1/2) Location service: Solely aimed at providing the addresses of the current locations of entities. Assumption: Entities are mobile, so that their current address may change frequently. Naming service: Aimed at providing the content of nodes in a name space, given a (compound) name. Content consists of different (attribute,value) pairs. Assumption: Node contents at global and administrational level is relatively stable for scalability reasons. Observation: If a traditional naming service is used to locate entities, we also have to assume that node contents at the managerial level is stable, as we can use only names as identifiers (think of Web pages). 04 – 20 Naming/4.2 Locating Mobile Entities

Naming & Locating Objects (2/2) Problem: It is not realistic to assume stable node contents down to the local naming level Solution: Decouple naming from locating entities Name: Any name in a traditional naming space Entity ID: A true identifier Address: Provides all information necessary to contact an entity Observation: An entity’s name is now completely independent from its location. Question: What may be a typical address? 04 – 21 Naming/4.2 Locating Mobile Entities

Broadcasting: Simply broadcast the ID, requesting the entity to return its current address. Can never scale beyond local-area networks (think of ARP/RARP) Requires all processes to listen to incoming location requests Forwarding pointers: Each time an entity moves, it leaves behind a pointer telling where it has gone to. Dereferencing can be made entirely transparent to clients by simply following the chain of pointers Update a client’s reference as soon as present location has been found Geographical scalability problems: –Long chains are not fault tolerant –Increased network latency at dereferencing Essential to have separate chain reduction mechanisms Simple Solutions for Locating Entities 04 – 22 Naming/4.2 Locating Mobile Entities

Single-tiered scheme: Let a home keep track of where the entity is: An entity’s home address is registered at a naming service The home registers the foreign address of the entity Clients always contact the home first, and then continues with the foreign location Home-Based Approaches (1/2) 04 – 23 Naming/4.2 Locating Mobile Entities

Two-tiered scheme: Keep track of visiting entities: Check local visitor register first Fall back to home location if local lookup fails Problems with home-based approaches: The home address has to be supported as long as the entity lives. The home address is fixed, which means an unnecessary burden when the entity permanently moves to another location Poor geographical scalability (the entity may be next to the client) Question: How can we solve the “permanent move” problem? Home-Based Approaches (2/2) 04 – 24 Naming/4.2 Locating Mobile Entities

Hierarchical Location Services (HLS) Basic idea: Build a large-scale search tree for which the underlying network is divided into hierarchical domains. Each domain is represented by a separate directory node. 04 – 25 Naming/4.2 Locating Mobile Entities

The address of an entity is stored in a leaf node, or in an intermediate node Intermediate nodes contain a pointer to a child if and only if the subtree rooted at the child stores an address of the entity The root knows about all entities HLS: Tree Organization 04 – 26 Naming/4.2 Locating Mobile Entities

Basic principles: Start lookup at local leaf node If node knows about the entity, follow downward pointer, otherwise go one level up Upward lookup always stops at root HLS: Lookup Operation 04 – 27 Naming/4.2 Locating Mobile Entities

HLS: Insert Operation 04 – 28 Naming/4.2 Locating Mobile Entities

HLS: Record Placement 04 – 29 Naming/4.2 Locating Mobile Entities Observation: If an entity E moves regularly between leaf domains D 1 and D 2, it may be more efficient to store E ’s contact record at the least common ancestor LCA of dir( D 1 ) and dir( D 2 ) Lookup operations from either D 1 or D 2 are on average cheaper Update operations (i.e., changing the current address) can be done directly at LCA Note: assuming that E generally stays in dom(LCA), it does make sense to cache a pointer to LCA

Size scalability: Again, we have a problem of overloading higher- level nodes: Only solution is to partition a node into a number of subnodes and evenly assign entities to subnodes Naive partitioning may introduce a node management problem, as a subnode may have to know how its parent and children are partitioned. Geographical scalability: We have to ensure that lookup operations generally proceed monotonically in the direction of where we’ll find an address: If entity E generally resides in California, we should not let a root subnode located in France store E ’s contact record. Unfortunately, subnode placement is not that easy, and only a few tentative solutions are known HLS: Scalability Issues 04 – 30 Naming/4.2 Locating Mobile Entities

Reference counting Reference listing Scalability issues Reclaiming References 04 – 31 Naming/4.3 Reclaiming References

Assumption: Objects may exist only if it is known that they can be contacted: Each object should be named Each object can be located A reference can be resolved to client–object communication Problem: Removing unreferenced objects: How do we know when an object is no longer referenced (think of cyclic references)? Who is responsible for (deciding on) removing an object? Unreferenced Objects: Problem 04 – 32 Naming/4.3 Reclaiming References

Principle: Each time a client creates (removes) a reference to an object O, a reference counter local to O is incremented (decremented) Problem 1: Dealing with lost (and duplicated) messages: An increment is lost so that the object may be prematurely removed A increment is lost so that the object is never removed An ACK is lost, so that the increment/decrement is resent. Solution: Keep track of duplicate requests. Reference Counting (1/2) 04 – 33 Naming/4.3 Reclaiming References

Reference Counting (2/2) Problem 2: Dealing with duplicated references – client P 1 tells client P 2 about object O : Client P 2 creates a reference to O, but dereferencing (communicating with O ) may take a long time If the last reference known to O is removed before P 2 talks to O, the object is removed prematurely Solution 1: Ensure that P 2 talks to O on time: Let P 1 tell O it will pass a reference to P 2 Let O contact P 2 immediately A reference may never be removed before O has acked that reference to the holder 04 – 34 Naming/4.3 Reclaiming References

Solution 2: Avoid increment and decrement messages: Let O allow a maximum M of references Client P 1 creates reference grant it M/2 credit Client P 1 tells P 2 about O, it passes half of its credit grant to P 2 Pass current credit grant back to O upon reference deletion Weighted Reference Counting 04 – 35 Naming/4.3 Reclaiming References

Observation: We can avoid many problems if we can tolerate message loss and duplication Reference listing: Let an object keep a list of its clients: Increment operation is replaced by an (idempotent) insert Decrement operation is replaced by an (idempotent) remove There are still some problems to be solved: Passing references: client B has to be listed at O before last reference at O is removed (or keep a chain of references) Client crashes: we need to remove outdated registrations (e.g., by combining reference listing with leases) Reference Listing 04 – 36 Naming/4.3 Reclaiming References

Observation: If we cannot be exact in the presence of communication failures, we will have to tolerate some mistakes Essential issue: We need to avoid that object references are never reclaimed Solution: Hand out a lease on each new reference: The object promises not to decrement the reference count for a specified time Leases need to be refreshed (by object or client) Observations: Refreshing may fail in the face of message loss Refreshing can tolerate message duplication Does not solve problems related to cyclic references Leases 04 – 37Naming/4.3 Reclaiming References