HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
The database name, given in the DN attribute, must correspond with one of the values in
the nsslapd-back end attribute of the suffix entry.
12.3.2 Adding distribution logic to a suffix
The distribution logic is a function declared in a suffix. This function is called for every operation
reaching this suffix, including the subtree search operations that start above the suffix. You can
add a distribution function to a suffix using both the Console and the command-line.
12.3.2.1 Using the console
To use the Console to add a distribution function to a suffix:
1. In the Directory Server Console, select the Configuration tab.
2. Expand the Data tree, and select the suffix to which you want to add the distribution function.
3. Select the Databases tab in the right pane.
4. Click Add to add new databases to the suffix from the Database List.
5. Enter the path to the distribution library in the Distribution Library field, or click Browse
to locate the library on your local machine.
6. Enter the name of your distribution function in the Function Name field.
7. Click Save to save your changes.
12.3.2.2 Using the command-line
To use the Command-line to add a distribution function to a suffix:
Use the ldapmodify command-line utility to add the following lines to the suffix entry:
nsslapd-distribution-plugin: path_to_shared_library
nsslapd-distribution-funct: distribution_function_name
The first line provides the name of the library that your plug-in uses. The second line provides
the name of the distribution function itself.
12.4 Using the distribution logic examples
The directory provides three distribution logic examples. The examples illustrate the following:
Distributing entries based on the first letter of their RDN (alpha_distribution).
The example uses as many databases as you like to contain the data. For example, if you
create three databases for a single suffix, entries starting with the letters A-I go to database
0, entries starting with the letters J-R go to database 1, and entries starting with the letters
S-Z go to database 2. If you create 26 databases, each database would receive the entries for
one letter of the alphabet.
Distributing entries based on a simple hash algorithm (hash_distribution).
In this example, entries are randomly distributed using a hash algorithm on the RDN to
compute the database to which the entry will be written.
Chaining entries to a read-write replica from a read-only replica
(chaining_distribution).
Usually the directory returns a referral to clients making update requests to a read-only
replica. This example uses a distribution function on a suffix that contains both a read-only
database and a database link. When the read-only database receives an update request, it
forwards the request using the database link to a read-write database. The database link
needs to be configured to chain on update.
For information on configuring database links, refer to the Creating Directory Entries chapter
in the HP-UX Directory Server administrator guide.
104 Using the custom distribution logic