Previous | Next | Trail Map | Getting Started | Naming and Directory Concepts

Naming Concepts

The primary function of a naming system is to map names to objects. It maps people-friendly names to addresses, identifiers, or objects typically used by computer programs. For example, the Internet Domain Name System (DNS) maps machine names (such as www.sun.com) to IP addresses (like 192.9.48.5). A file system maps a file name (c:\bin\autoexec.bat for example) to a file handle that a program can use to access the contents of the file. These two examples also illustrate the wide range of scale at which naming services exist--from an entity on the Internet to a file on the local file system.

Names

To look up an object from a naming system, you supply it the name of the object. The naming system determines the syntax that the name must follow. This syntax is sometimes called the naming system's naming convention.

For example, the UnixTM file system's naming convention is that a file is named from its path relative to the root of the file system, with each component in the path separated left-to-right using the slash character ('/'). The Unix path name, /usr/hello, for example, names a file hello in the file directory usr, which is located in the root of the file system.

In the DNS, the naming convention is that components in the DNS name are ordered from right to left, and are delimited by dot characters ('.'). Thus, the DNS name sales.Wiz.COM names a DNS entry with the name sales, relative to the DNS entry Wiz.COM. The DNS entry Wiz.COM, in turn, names an entry with the name Wiz in the COM entry.

In the Lightweight Directory Access Protocol (LDAP), the naming convention is that components are ordered right to left, and are delimited by comma characters (','). Thus, the LDAP name cn=Rosanna Lee, o=Sun, c=US names an LDAP entry cn=Rosanna Lee, relative to the entry o=Sun, which in turn, is relative to c=us. The LDAP has the further rule that each component of the name must be a name/value pair with the name and value separated by an equal character ('=').

Bindings

The association of a name with an object is called a binding.

For example, a file name is bound to a file. The DNS contains bindings that map machine names to IP addresses. An LDAP name is bound to an LDAP entry.

References and Addresses

The reference of an object contains one or more addresses (or communication end points). Depending on the naming service, some objects cannot be stored directly. A reference is one means by which such an object can be bound and accessed.

A file object, for example, is accessed using a file reference, or file handle as it is often called. A printer object, for example, might contain the state of the printer, such as its current queue and amount of paper. A printer object reference, on the other hand, might contain only information on how to reach the printer, such as its print server name and printing protocol. As another example, an airplane object might contain a list of its passengers and crew, its flight plan, and fuel and instrument status. By contrast, an airplane object reference might contain only its flight number and departure time. In all of these examples, the reference is a much more compact representation that can be used to communicate with the object, while the object itself might contain a lot more state. Using the reference, you can contact the object and obtain more information about the object.

For simplicity, an object reference and the object it refers to are sometimes used interchangeably in this tutorial.

Context

A context is a set of name-to-object bindings.

Every context has an associated naming convention. A context provides a lookup (resolution) operation that returns the object, and may provide operations such as those for binding names, unbinding names, and listing bound names. A name in one context object can be bound to another context object with the same naming convention, called a subcontext.

For example, a file directory, such as /usr, in the Unix file system is a context. A file directory named relative to another file directory is a subcontext (some Unix users refer to this as a subdirectory). For example, given a file directory /usr/bin, the directory bin is a subcontext of usr.

A DNS domain, such as COM, is a context. A DNS domain named relative to another DNS domain is a subcontext. For example, given a DNS domain Sun.COM, the DNS domain Sun is a subcontext of COM.

An LDAP directory, such as c=us, is a context. An LDAP directory named relative to another LDAP directory is a subcontext. For example, given an LDAP entry o=sun,c=us, the entry o=sun is a subcontext of c=us.

Naming Systems and Namespaces

A naming system is a connected set of contexts of the same type (having the same naming convention) and providing a common set of operations.

For example, the DNS is a naming system. A system that communicates using the LDAP is a naming system.

A naming system provides a naming service to its customers for performing naming-related operations. A naming service is accessed through its interface. For example, the DNS offers a naming service that maps machine names to IP addresses. The LDAP offers a naming service that maps LDAP names to LDAP entries. The file system offers a naming service that maps file names to files and directories.

A namespace is the set of names in a naming system. For example, the Unix file system has a namespace consisting of all the names of files and directories in that file system. The DNS namespace contains names of DNS domains and entries. The LDAP namespace contains names of LDAP entries.


Previous | Next | Trail Map | Getting Started | Naming and Directory Concepts