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 3 databases for a single suffix, entries starting with the
letters A-I 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 Chapter 2,
"Creating Directory Entries," in the Netscape Directory Server Administrator's Guide.
The following directory in your Directory Server installation contains the
uncompiled C code examples:
<server_root>/plugins/slapd/slapi/examples/distb/
This directory contains a file named
functions (
chaining_distribution
Once you have compiled the source code, you will have the following files:
AIX
HP-UX
Solaris
Windows
alpha_distribution
) and a Makefile for compiling them.
distrib-plugin.a
distrib-plugin.sl
distrib-plugin.so
distrib-plugin.dll
, which contains three example
distrib.c
,
hash_distribution
Chapter 12
Using the Custom Distribution Logic
Using the Distribution Logic Examples
, and
153
Need help?
Do you have a question about the NETSCAPE DIRECTORY SERVER 6.1 - PLUG-IN and is the answer not in the manual?
Questions and answers