Partitions are entry stores assigned to a naming context. The idea behind a partition is that it stores a subset of the Directory Information Base (DIB). Partitions can be implemented in any way so long as they adhere to interfaces.
Presently the server has a single partition implementation. This implementation is used for both the system partition and user partitions. It uses JDBM as the underlying B+Tree implementation for storing entries.
Other implementations are possible like in memory based partitions either BTree based or based on something like Prevayler .
Partitions have simple interfaces that can be used to align any data source to the LDAP data model thereby accessing it via JNDI or via LDAP over the wire. This makes the server very flexible as a bridge to standardize access to disparate data sources and formats. Dynamic mapping based backends are also interesting.
The system partition is a very special partition that is hardcoded to hang off of the *ou=system* naming context. It is always present and contains administrative and operational informations needed by the server to operate. Hence its name.
The server's subsystems will use this partition to store informations critical to its operation.
Several partitions can be assigned to different naming contexts within the server so long as their names do not overlap such that one partition's naming context is contained within another's. The root nexus is a fake partition that does not really store entries. It maps other entry storing partitions to naming contexts and routes backing store calls to the partition containing the entry associated with the operation.
User partitions are partitions added by users. When you download and start using the server you may want to create a separate partition to store the entries of your application. To us user (sometimes also referred to as application) partitions are those that are not the system partition! In the following section we describe how a user partition can be created in the server.
Adding new application partitions to the server is a matter of adding DirectoryPartitionConfiguration objects to the StartupConfigration added to the JNDI environment. These properties are used in both standalone and in embedded configurations. You'll see how to configure partitions by example using xml configuration files with the standalone application and programatically for embedding.
Until this section is filled with more specific examples just geared towards the configuration of partitions please see Configuration .
Things we'd like to do with the existing partitioning scheme and beyond.
Today we have some limitations to the way we can partition the DIB. Namely we can't have a partition within a partition and sometimes this makes sense. Eventually we intend to enable this kind of functionality using a special type of nexus which is both a router and a backing store for entries. It's smart enough to know what to route verses when to use its own database. Here's a JIRA improvement specifically aimed at achieving this goal.
Obviously we want as many different kinds of partitions as possible. Some really cool ideas have floated around out there for a while. Here's a list of theoretically possible partition types that might be useful or just cool: