Hi,
the backend is using its own structure atm. It's based on JDBM, which is a
B-tree storage.
The DN are also stored in a B-Tree, and this is not necessarily optimal. We
may want to go for a H-tree instead of a B-tree for these DN (B-tree and
H-tree storages are available in JDBM)
So basically, it's just a question to associate a H-tree to the DN storage.
Ok, this is theory. In the 'real world', this would need more analysis, and
we must evaluate the impact of such a modification on the code base.
Now, I have a question : how big is your data set ? If it's a few thousnads,
there would be a very little increase in performance doing that : you have
to consider that the cache system will very quickly keep in memory all the
DN of your database. (you might want to increase the cache size for this
kind of objects in your partition :
...
<property name="indexedAttributes">
<set>
<bean class="
org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration
">
<property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.1"
/>
<property name="cacheSize" value="100" />
</bean>
...
In this default configuration, 100 DNs are kept into the cache. Just
increase it to fit your needs.
If in cache, grabbing a DN is really fast, wether you use H-tree or not.
You will just have to consider if this would be of interest to modify the
backend (with all the burden it suppose) instead of increasing the cache.
And this is again a question of how many DN will you have.
I hope this help.
Feel free to go further, we really have this Hashing in our radar.
Emmanuel
On 1/22/07, Johan Asterholm <[EMAIL PROTECTED]> wrote:
Hi,
I'm trying to develop LDAP integration towards an application, but I have
a hard time to understand how it all should work.
To learn how it should be done I'm trying to develop a backend which works
towards a HashMap where the hash Map includes a key (Identifier) And then
another hashmap with attributes (They are not "Attributes" but simply String
names of the attribute). I prefer this way since this is quite similar to
what i need to do when integrating towards or application.
so searching for uid=1,ou=user,cn=example,cn=com would point to a row in
the hashmap, but ou=user,cn=example,cn=com is static.
Is there any example where a simple backend like this is done? Maybe not
with a HashMap but something similar?
This would help me tremendously.
BR / Johan Asterholm
--
Cordialement,
Emmanuel Lécharny
www.iktek.com