+ 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 Eve has a single partition implementation which 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. I'm particularly interested in + memory based partitions either BTree based or based on something like + Prevayer. +
+ ++ 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 Eve 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 information needed by the + server to operate. Hence its name. +
+ ++ Eve's subsystems will use this partition to store information critical + to their operation. Things like triggers, stored procedures, access + control instructions and schema information can be maintained here. +
++ Several partitions can be assigned to different naming contexts within + Eve so long as their names do not overlap such that one partition's + naming context is contained within anothers. 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 Eve you may want to create a separate partition to store + the entries of your application. To us user and application partition + means the same thing: not the system partition! +
+ +
+ Adding new application partitions to the server is a matter of
+ setting the right JNDI environment properties. These properties are
+ used in both standalone and in embedded configurations. Below is an
+ example of a properties configuration for two partitions hanging off
+ of the naming contexts dc=apache,dc=org and
+ ou=test:
+
+ Although somewhat ugly the way we use properties for settings does + work and hopefully we can build a tool on top of this to save the + user some hassle. Another approach may be to use XML or something + easier to generate these properties from them. For now its the best + non-specific means we have to inject settings through JNDI env + Hashtables while still being able to load settings via properties + files. Ultimately JNDI properties are the common denominator. +
+ ++ Breifly we'll explain these properties. All partition properties + are associated with one another using some partition id. All + partition ids are listed as a space separated list using the + eve.db.partitions property: above it lists the ids for the too + partitions, apache and test. +
+ ++ Partitions need to know the naming context they will store entries + for. This naming context is also referred to as the suffix since all + entries in the partition have this common suffix. You guessed it, + the suffix is a distinguished name. The property key for the suffix + of a partition is composed of the following property key base + eve.db.partition.suffix. concatenated with the id of the + partition: eve.db.partition.suffix.${id}. For example + if the partition id is foo, then the suffix key would be, + eve.db.partition.suffix.foo. +
+ ++ Partitions can have indices on attributes. Unlike OpenLDAP where you + can build specific types of indices, Eve indices are of a single type. + For each partition a key is assembled from the partition id and the + property key base: eve.db.partition.indices.${id}. So + again for foo the key for attribute indices would be + eve.db.partition.indices.foo. This value is a space separated + list of attributeType names to index. For example the apache + partition has indices built on top of ou, objectClass + and uid. +
+ ++ When creating a context the root entry of the context corresponding + to the suffix of the partition must be created. This entry is + composed of single-valued and multi-valued attributes. We must + specify these attributes as well as their values. To do so we again + use a key composed of a base, however this time we use both the id + of the partition and the name of the attribute: + eve.db.partition.attributes.${id}.${name}. So + for partition foo and attribute bar the following key would be used: + eve.db.partition.attributes.foo.bar. The value of the key + is a space separated list of values for the bar attribute. For + example the apache partition's suffix has an objectClass attribute + and its values are set to: top domain extensibleObject. +
++ 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. + Ones using RDBMS' and ones using LDAP servers are welcome as well + so we can serve their content as well in one unified view. +
+ +
+ Other aspirations include entry partitioning within a container
+ context. Imagine having 250 million entries under
+ ou=citizens,dc=census,dc=gov. You don't want all 250
+ million in one partition but would like to sub partition these entries
+ under the same context based on some attribute. Basically we will be
+ using the attribute value to implement sub partitioning where within
+ a single context we are partitioning entries.
+