1!MISM - 95-702 - Distributed Systems Distributed Systems Name & Directory Services2!MISM - 95-702 - Distributed Systems Creating a Namespace • How hard it is to come up with a namespace for millions of unrelated computing systems worldwide? • In retrospect, not difficult: – Internet domain name system – www.heinz.cmu.edu3!MISM - 95-702 - Distributed Systems YouTube Video Namespace • What is the address of your favorite YouTube video? • What is the YouTube video namespace? • E.g. – http://www.youtube.com/watch?v=xcXd2lPTuqw – What is the name? – Therefore is YouTube: • a Name Server? • or Directory Server?Terminology • Namespaces can be – Flat – Hierarchical • Which is: – The Internet Domain Namespace – Twitter identities – YouTube movies – Unix, Windows, and MacOS File Systems? 4!MISM - 95-702 - Distributed Systems5!MISM - 95-702 - Distributed Systems Naming Concepts • Very common problem: map people-friendly names to objects. • Examples: [email protected] -> Mike’s mailbox www.cnn.com -> cnn’s web server c:\somedir\f1.dat -> a file on the C drive cn=Rosanna Lee, o=Sun, c=US -> info about Rosanna Notice the hierarchies in each case.6!MISM - 95-702 - Distributed Systems Naming Conventions • Different naming systems use different conventions (or syntax) for names • Examples: DOS uses slashes and colons c:\some\f.dat Unix uses slashes /usr/local/filename DNS uses dots www.cnn.com LDAP (The lightweight directory access protocol) uses name, value pairs cn=Rosanna Lee, o=Sun, c=US7!MISM - 95-702 - Distributed Systems Context • A context is a set of name-to-object bindings. • Every context has an associated naming convention. • A context may allow operations such as bind, unbind, lookup. • A context may associate a name with another context (subcontext, or subdirectory).8!MISM - 95-702 - Distributed Systems Naming Service • A naming system provides a naming service to its customers for performing naming-related operations. – For example, associate a domain name with an IP address. • A namespace is the set of names in a naming system.9!MISM - 95-702 - Distributed Systems Directory Service • A Directory Service is an extension of a naming service that allows one to lookup objects based on names or based on attributes. • Attributes have attribute identifiers and a set of attribute values. • Therefore – Directory Services have a lot in common with RDBMS – OpenLDAP is a Directory Service, and you can plug a RDBMS in the back-end10!MISM - 95-702 - Distributed Systems Directory Enabled Applications • A directory-enabled application is an application that uses a naming or directory service. • Applications can share the common infrastructure provided by the directory. – Example: A mail client, scheduling systems and mail forwarding program might all use the same address book stored in a common directory. • The directory may also be used as an object store for programs needing the same object.11!MISM - 95-702 - Distributed Systems Domain Name System Browser www.heinz.cmu.edu 198.12.78.608 Local Name Server Root Name Server CMU Name Server Heinz Name Server www.heinz.cmu.edu cmu’s DNS IP www.heinz.cmu.edu Heinz’s DNS IP www.heinz.cmu.edu 198.12.78.608 www.heinz.cmu.edu 198.12.78.608:80 Assume a browser in Los Angeles wants to contact www.heinz.cmu.edu12!MISM - 95-702 - Distributed Systems The Java Naming and Directory Interface (JNDI): • Is an abstraction API (just like JDBC is an abstraction API on RDBMS databases). Java Application | JNDI API LDAP DNS rmiregistry Various Service Providers File System Pluggable architectureThe Java Naming and Directory Interface (JNDI): • Sits on top of different naming services. • In the JMS lab, we will use JNDI to find Message Oriented Middleware resources. 13 MISM - 95-702 - Distributed SystemsNaming Operations • Bind – Add a name / object to the Context • Lookup – Lookup a name, return the object – Search for attributes, return objects • List – List objects in a Context • Modify – Update an object • Rename – Change the binding (name) of an object • Remove – Remove an object from a Context 14!MISM - 95-702 - Distributed
View Full Document