directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@gmail.com>
Subject Data serialization heads up
Date Wed, 13 Aug 2008 16:40:45 GMT
Hi guys,

I'm working on data serialization since last week, and it's a complex 
problem.

I just wanted to give some feedback.

We need to serialize many differents data in the server :
- Entry, as they are stored in the Master table serialized
- DN for the same reason (stored within an entry - a debated choice :) 
-, and in the DN index )
- ChangeLogEvent
- LdifEntry stored in the ChangeLogEvent
- LdapPrincipal stored within the LdifEntry
- Modification stored withing the LdifEntry

The biggest problem I'm currently facing is that we have two kind of 
entries : client and server, which can't be serialized the same way, as 
the server entry hold some schema data structure we can't serialize at 
all. And the LdifEntry contains ClientEntry only, but are translated to 
ServerEntry when restored and applied.

Plus the LdapPrincipal should _not_ be serialized with the UserPassword.

One more important element is that we don't want to store useless data, 
so some of the inner fields are computed when the serialized structure 
has been read back (for instance, we are doing a lookup of the 
attributeType using the attributeId).

The current implementation is pretty correct, but does not work 
correctly with the newly added features and the JNDI removal made it 
complex to manage. I'm doing my best to make it work.

Last, not least, there are not a lot of unit tests for those 
serialization, so I'm adding all of them, which takes a lot of time.

I also have to mention that the data structure I listed is just an 
overview of the real data which are to be serialized. Here is the 
complete list :

LdapPrincipal
Entry(i)
  ClientEntry
    DefaultClientEntry
  ServerEntry(i)
    ClonedServerEntry
    DefaultServerEntry
Value(i)
  ClientBinaryValue
    ServerBinaryValue   
  ClientStringValue
    ServerStringValue
EntryAttribute(i)
  ClientAttribute(i)
    DefaultClientAttribute
    ServerAttribute(i)
      DefaultServerAttribute
Modification(i)
  ClientModification
  ServerModification
LdifEntry
ChangeLogEvent
BTree
HashBucket
HashDirectory
BlockIo
LdapDN
Rdn
AttributeTypeAndValue
SequencedHashMap
SynchronizedLRUMap

These classes implements the Externalizable interface, and are not 
tested, except the DN serialization.

-- 
--
cordialement, regards,
Emmanuel L├ęcharny
www.iktek.com
directory.apache.org



Mime
View raw message