Directory clients and servers

Understand how directories are accessed in relation to clients and servers.

Directories are accessed by the client/server model of communication. The directory clients and servers might not be on the same machine. A server can serve many clients. An application that wants to read or write information in a directory does not access the directory directly. Instead, it calls a function or an application programming interface (API) that causes a message to be sent to another process. This second process accesses the information in the directory on behalf of the requesting application. The results of the read or write actions are then returned to the requesting application.

An API defines the programming interface that a particular programming language uses to access a service. The format and contents of the messages that are exchanged between client and server must adhere to an agreed upon protocol. LDAP defines a message protocol that is used by directory clients and directory servers. There is also an associated LDAP API for the C language. There are ways to access the directory from a Java™ application using the Java Naming and Directory Interface (JNDI).