directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Karasulu <aok...@bellsouth.net>
Subject Re: [apacheds] A few questions.
Date Wed, 16 Mar 2005 14:27:29 GMT
Trustin Lee wrote:

>I started to reading ApacheDS code, and I've got a few questions from
>it.  Is there anyoine who can teach me? :)
>
>Some Qs might be silly, but be patient with me!
>
>1. What is the difference between user-provided DN and normalized DN?
>  
>
The user provided DN is the DN given as input from the user without any 
alterations.  The normalized DN is the DN which is textually modified 
into a cannonical form.  For example ou=  HuMAN       ResoURces might be 
supplied by the user and so this is the user provided DN.   The server 
must generate a cannonical representation to store this in the DN 
index.  So what happens to normalized is the space variance is removed 
without effecting tokenization order: many spaces becone a single 
space.  Next the server case normalizes the string if the ou attribute 
is case insensitive.  The server lower cases the value.  So the 
normalized form of the follwoing UPDNs are ...

ou=  HuMAN       ResoURces,dc = EXAMPLE, dc=com
ou=  human     ResoURces,dc = exampLE, dc=com
ou=  HuMAN resOURCES,dc = EXample, dc=COM

Normalized form is always ...

ou=human resources,dc=example,dc=com

>1.1. Can I generate user-provided DN from normalized DN and vice versa?
>  
>
You can't produce a UPDN from a NDN unless you do lookups against a 
partition index but careful to make sure you are not swimming in details 
of a specfic backend implementation.   There are two indices dealing 
with DNs in the default backend implementation.

One bidirectionally maps UPDN values to the id of the entry.  Another 
maps NDN values to the id of the entry.  This prevents us from 
normalizing all the time and allows use to lookup a UPDN if we know the 
id or NDN. 

>2. What is a collective attribute?
>  
>
All we don't have this implemented yet.  Basically it is an attribute 
that is shared between a set of entries.  Let me give you an example.  
Say I have a DIT where I store a bunch of people from a specific region 
under an organizationalUnit node.  This is natural.  The people entries 
under this ou will have the same locale attribute values as well as 
possibly other attribute values they share in common.  So with 
collective attributes I can assign the value once to a set of entries in 
something called a subentry node in the ou up above.  Then using a 
subtree specification I say the collective attribute's value applies to 
everything below this node.

>3. Could you explain me what the constructor of AbstractContextPartition does?
>  
>
May be nothing at the moment.   Why you asking?  I think I have this 
class as a common abstract class or root for both SystemPartition and 
the default ApplicationParition.

>4. If there are many context partitions with different backing stores,
>what happens when we move entries between different partitions?  Do we
>reassign entryIds (BigInteger) ?
>  
>
No entryId is not a know entity outside of the specific backend 
implementation we have.  In LDAP there is no primary key other than the 
DN.  Well now we might have one with the UUID. 

To answer your question fast the default partition implementation uses a 
sequence to generate auto incrementing entryIds.  Each backend has its 
own sequence.  So if I take entry with entryId 2000 from partition A and 
move it to partition B, entry with entryId 2000 will be assigned the 
next value of the id index which could be anything.

Does this answer the question?

>Thanks,
>Trustin
>  
>


Mime
View raw message