directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@apache.org>
Subject Re: [apacheds] Idea on refactoring Database, ContextPartition, and RootNexus
Date Sun, 19 Jun 2005 08:42:12 GMT
Hi Trustin,

> I thought over simplifying Database and ContextPartition, and here's my idea:
> 
> 1) Do we need that much modification operations (add, delete, move
> ...) in Database?
> 
> No we don't need that much, all we need is:
> 
> * Put (used to add and replace entries)
> * Remove (used to delete entries)

I suggest that you keep an operation to change entries. It may be much
faster to do a Change than to do a Remove/Put. Even a Put instead of a
Change can be costly, as all the elements of an entry are to be updated,
which could cost a lot. Obviously, it depends on the underlying
database !


> We could be able to combine put and remove operation to move or rename
> entries, and therefore rename and move operation is splitted into many
> small operations, so we need transaction here:
> 
> Database db = ...;
> Transaction tx = db.beginTransaction();
> tx.delete( entryWithOldName );
> tx.put( entryWithNewName );
> tx.commit();

Put aside the previous comment, I really like the Tx stuff. This is
something that many LDAP implementations don't have.

Emmanuel L├ęcharny





Mime
View raw message