Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5 DISTRIBUTED SYSTEMS.

Slides:



Advertisements
Similar presentations
Dr. Kalpakis CMSC621 Advanced Operating Systems Naming.
Advertisements

Domain Name System. DNS is a client/server protocol which provides Name to IP Address Resolution.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Naming (2) DISTRIBUTED.
Naming Computer Engineering Department Distributed Systems Course Asst. Prof. Dr. Ahmet Sayar Kocaeli University - Fall 2014.
Distributed Systems Principles and Paradigms Chapter 04 Naming.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
OCT 1 Master of Information System Management Organizational Communications and Distributed Object Technologies Lecture 14: Naming.
Computer Science Lecture 9, page 1 CS677: Distributed OS Today: Naming Names are used to share resources, uniquely identify entities and refer to locations.
NamingCS-4513, D-Term Naming CS-4513 Distributed Computing Systems (Slides include materials from Operating System Concepts, 7 th ed., by Silbershatz,
Application Layer At long last we can ask the question - how does the user interface with the network?
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.
Faculty of Information Technology © Copyright UTS Faculty of Information Technology - JNDIJNDI-1 Advanced Java Programming JNDI v2 Chris Wong
Domain Name System: DNS
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 19 Domain Name System (DNS)
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.
25.1 Chapter 25 Domain Name System Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Domain Name System ( DNS )  DNS is the system that provides name to address mapping for the internet.
TCP/IP Protocol Suite 1 Chapter 17 Upon completion you will be able to: Domain Name System: DNS Understand how the DNS is organized Know the domains in.
DNS. Outline r Domain Name System r DNS Hierarchy r Resolution.
Chapter 25 Domain Name System
11.1 © 2004 Pearson Education, Inc. Exam Managing and Maintaining a Microsoft® Windows® Server 2003 Environment Lesson 11: Introducing WINS, DNS,
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
JNDI Java Naming and Directory Interface See also:
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.
25.1 Chapter 25 Domain Name System Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Network Protocols Chapter 25 (Data Communication & Networking Book): Domain Name System (DNS) 1.
Chapter 17 Domain Name System
5.1 Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED.
1 LDAP and Java Naming Services Murali. M.Nagendranath.
Chapter 29 Domain Name System (DNS) Allows users to reference computer names via symbolic names translates symbolic host names into associated IP addresses.
Naming Chapter 4. Name Spaces (1) A general naming graph with a single root node.
TCP/IP Protocol Suite 1 Chapter 17 Upon completion you will be able to: Domain Name System: DNS Understand how the DNS is organized Know the domains in.
Naming Chapter 4.
Domain Name System CH 25 Aseel Alturki
October 8, 2015 University of Tulsa - Center for Information Security Microsoft Windows 2000 DNS October 8, 2015.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
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.
1 Kyung Hee University Chapter 18 Domain Name System.
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.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 19 Domain Name System (DNS)
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
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
TCP/IP Protocol Suite 1 Chapter 17 Upon completion you will be able to: Domain Name System: DNS Understand how the DNS is organized Know the domains in.
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.
Basics of the Domain Name System (DNS) By : AMMY- DRISS Mohamed Amine KADDARI Zakaria MAHMOUDI Soufiane Oujda Med I University National College of Applied.
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.
Master of Information System Management
Naming Chapter 4.
Chapter 19 Domain Name System (DNS)
5.3. Structured Naming Advanced Operating Systems Fall 2017
Lecture 7: Name and Directory Servers
Lecture 7: Name and Directory Servers
Lecture 8: Name and Directory Servers
Distributed Systems CS
Distributed Systems CS
Distributed Systems CS
Distributed Systems CS
Distributed Systems CS
Domain Name System: DNS
Presentation transcript:

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S. TANENBAUM MAARTEN VAN STEEN Chapter 5 Naming (Revised for CS6580)

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved The Domain Name System (DNS)  DNS is primarily used for looking up IP address of hosts and mail servers  DNS name space is rooted tree  Domain: A subtree of DNS name space  Domain Name: A path to its root node cs.csueastbay.edu, csueastbay.edu  Zone: The name space is divided into non overlapping parts. A zone is an “administrative space” (delegated) and is implemented by a separate (primary) name server

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Name Servers  Answer “DNS” questions  Types of Name Servers Authoritative Servers Master (Primary) Slave (Secondary) Caching (Recursive) Servers  Zone Transfer – Primary to Secondary: Records Transfer Implemented using TCP (While Query using UDP)

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Name Space Distribution (1) Figure An example partitioning of the DNS name space, including Internet-accessible files, into three layers.

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Implementation of Name Resolution (1) Figure The principle of iterative name resolution.

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Implementation of Name Resolution (2) Figure The principle of recursive name resolution.

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved The DNS Name Space Figure The most important types of resource records forming the contents of nodes in the DNS name space.

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DNS Implementation (1) Figure An excerpt from the DNS database for the zone cs.vu.nl.

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DNS Implementation (2) Figure An excerpt from the DNS database for the zone cs.vu.nl.

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Attribute-Based Naming (LDAP)  Describe an entity in terms of (attribute, value) pairs called attributed-based naming An entry has an associated collection of attributes (each says something about the entity). By specifying a value of an attribute, naming system will return one or more entities that meet the user’s description. It is also known as a directory service  A common approach for distributed directory services is to combine structured naming with attribute-based naming. (Microsoft’s Active Directory). Light-weight directory access protocol (LDAP) derived from OSI’s X500 directory service is often used. It consists of a number of records (directory entries). A record is a collection of (attribute, value) pairs.

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved LDAP Protocol  The collection of all directory entries in LDAP is called a directory information base (DIB). Each record is uniquely named so that it can be looked up. Each naming attribute is called a relative distinguished name (RDN). As shown in Figure LDAP(1) : /C=NL/O=Vrije Universiteit/OU=Comp. Sc. can be a globally unique name like DNS name nl.vu.cs  As in DNS, the use of globally unique names by listing RDNs in sequence leads to a hierarchy of the collection of directory entries, which is referred to as a directory information tree (DIT) (Figure LDAP(2)). A DIT forms the name graph of an LDAP directory service in which each node represents a directory entry.

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved LDAP Protocol - Continued  In Figure LDAP(2), Node N corresponds to the directory entry shown in Figure LDAP(1).  This node N acts also as a parent of other directory entries that have additional naming attribute Host_Name that is used as an RDN. Such entries may be used to represent hosts as shown in Figure LDAP(3)

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved LDAP – Lookup Examples  READ: read a single record given its path name in DIT /C=NL/O=Vrije Universiteit/OU=Comp. Sc./CN=Main server Returns the record (directory entry) as in Figure LDAP(1)  LIST: list the names of all outgoing edges of a giving node in the DIT. Each name corresponds to a child node of a given node. Does not return any record; Return names, i.e. star and zephy as in Figure LDAP(3)

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved LDAP – Lookup Examples – Cont.  Suppose we want a list of all main servers at the Vrije Universiteit. answer = search(“&(C=NL)(O=Vrjie Universiteit)(OU=“*) (CN=Main server)”) Here we specified that the place to look for main servers (not interesting in particular organization unit). Each returned result should have the CN attribute equal to Main server.

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Figure LDAP (1) A Directory Entry using LDAP naming

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Figure LDAP (2) Part of a directory Information Tree

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Figure LDAP (3) Two directory entries having Host_Name as RDN

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved JNDI Introduction  Java Name and Directory Interface (JNDI) provides name and directory functionality to applications written using Java. JNDI API JNDI SPI (Service Provider Interface)  Java applications use the JNDI API to access a variety of naming and directory services.  The SPI enables a variety of naming and directory services to be plugged in transparently

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved JNDI From:

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved JNDI – Context Factory (SPI)  CORBA services (COS) naming service com.sun.jndi.cosnaming.CNCtxFactory  Lightweight Directory Access Protocol (LDAP) com.sun.jndi.ldap.LdapCtxFactory  Java Remote Method Invocation (RMI) Registry com.sun.jndi.rmi.registry.RegistryContextFactory More…..

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved JNDI – CORBA COS Naming Example // Publish the reference in the Naming Service // using JNDI API Context initialNamingContext = new InitialContext(); initialNamingContext.rebind("HelloService", helloRef ); ic = new InitialContext(); // Get the Object reference from the Name Service // using JNDI call. objref = ic.lookup("HelloService"); java -classpath. -Djava.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory - Djava.naming.provider.url=iiop://localhost:1050 HelloServer & java -classpath. -Djava.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory - Djava.naming.provider.url=iiop://localhost:1050 HelloClient java.naming.factory.initial This envronment property specify the initial context factory to use - the fully qualified class name of the factory class that will create an initial context. java.naming.provider.url This environment property specify the location of the service provider the client will use - The NamingContextFactory use this information to know which server to connect to.

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved JNDI – DNS Naming Example nslookup -type=srv _kerberos._tcp String name = args[0]; String[] recordTypes = new String[args.length - 1]; System.arraycopy(args, 1, recordTypes, 0, args.length - 1); Hashtable env = new Hashtable (); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.dns.DnsContextFactory"); try { DirContext ctx = new InitialDirContext(env); Attributes dnsQueryResult = ctx.getAttributes(name, recordTypes); if (dnsQueryResult == null) { System.out.println("Not found: '" + name + "'"); } for (String rrType: recordTypes) { Attribute rr = dnsQueryResult.get(rrType); if (rr != null) { for (NamingEnumeration vals = rr.getAll(); vals.hasMoreElements();) { System.out.print(rrType + "\t"); System.out.println(vals.nextElement()); } } catch (NamingException e) { e.printStackTrace(System.err); }

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved JNDI – LDAP Example import javax.naming.Context; import javax.naming.directory.InitialDirContext; import javax.naming.directory.DirContext; import javax.naming.directory.Attributes; import javax.naming.NamingException Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); env.put(Context.PROVIDER_URL, "ldap://localhost:389/o=JNDITutorial");

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved JNDI – LDAP Example - Continued try { // Create the initial directory context DirContext ctx = new InitialDirContext(env); // Ask for all attributes of the object Attributes attrs = ctx.getAttributes("cn=Ted Geisel, ou=People"); // Find the surname attribute ("sn") and print it System.out.println("sn: " + attrs.get("sn").get()); } catch (NamingException e) { System.err.println("Problem getting attribute:" + e); } # java Getattr sn: Geisel