|[ Team LiB ]|
A naming service is a mechanism in which complex data objects (or references to these objects) can be associated with well-known names that follow standard naming conventions. These names can then be published, and clients can use these names to look up the data objects associated with them. Each naming service has its own naming conventions.
Names can be atomic (an indivisible component of a name) or compound (a sequence of zero or more atomic names, such as /usr/bin in a file namespace). Names can also be composite; enterprises use composite namespaces a lot. For example, a name such as http://www.getgamma.com/newsletter/archives/index.html typically accesses a DNS (Internet naming) facility to first resolve the www.getgamma.com part. Following this, it accesses the file namespace to resolve the index.html file, stored under the <wwwroot>/newsletter/archives/ directory. From a user's perspective, however, there's a single namespace consisting of composite names.
Associations between the names and objects are known as bindings. Naming services usually integrate with another service such as a file system, a directory, a database, and so on, to provide these bindings.
A directory can be compared to a database to the extent that it's used to store and organize data. A directory contains descriptive, attribute-based information about the stored objects. Directories are meant to be queried far many times more than they're meant to be updated. For this reason, they're built and indexed to handle large amounts of high-volume queries, thus allowing for fast queries but slower updates. For the same reason, directories don't usually implement transaction or rollback schemes like databases typically do.
The naming service allows for different components of the enterprise to work with each other without knowing their physical location, but only the name under which they are advertised. This enables the system administrators to move these objects around if necessary, without breaking any dependencies, as long as the naming service reflects the object's correct location at all times.
Several types of naming and directory services are available in the market. We'll take a look at a few of them here:
Understanding the Differences in Naming Services
All the naming services allow for data bindings, which is the minimum requirement to qualify as a naming service. However, there are inherent differences between these services in the way the data is stored and looked up. For instance, consider the DNS naming service. To look up IP addresses, you would use the standard naming convention, which is <sub domain>.<domain-name>.<top-level domain> (for example, www.getgamma.com). To use LDAP to look up the phone number of John Smith, who works for Gamma Enterprise Technologies in United States, you would formulate the name using name-value pairs, separated by commas (,): cn=John Smith, o=Gamma, c=US.
With so many naming systems in the market, along with their different implementation artifacts, there's an obvious need for a common interface to access them all in a uniform manner from an application. This is where the Java Naming and Directory Interface (JNDI) comes into the picture.
WebLogic Server now ships with a private LDAP server, which is used by the LDAP security realm.
|[ Team LiB ]|