On Thu, Sep 3, 2009 at 3:24 PM, Emmanuel Lecharny <elecharny@apache.org> wrote:
Alex Karasulu wrote:
On Thu, Sep 3, 2009 at 2:59 PM, Kiran Ayyagari <ayyagarikiran@gmail.com>wrote:

 
 Hi guys,
   
right now, the Partition interface is used in two places :
- as the interceptor chain entry point
- as the facade for the specific backends (JDBM, LDIF, Oracle...)

We are using the same interface in both case.

What about defining two different interfaces ? One for the chain, one for
the backend ?

     
+1

   

Don't know for sure. Need to think a bit more about this.  What specific
entry point into the chain are you citing as using the Partition interface?
I thought we used LdapSession which has similar methods yet adapted to deal
with session related concerns.

LdapSession is the adaptation of Partition that you're looking for I think.
 
Let me bit more precies. We have a CoreSession which uses an OperationManager which pushes the operation into the InterceptorChain which calls the NexusPartition method. Pfeww...

This is this NexusPartition I suggest to be the base interface, and when we hit the backend, we use an extended interface.

Is it more clear ?



Yep much clearer now.  Yes I agree that there's some improvements to be made on the relationship between NexusPartition and Partition especially now that several things have shifted in the architecture of the server.  I know we have remnants of crap that still plagues these interfaces.  This is a great time to eradicate them!


 
   
The chain interface (ie, Partition, to keep the existing name), will carry
the operations (add, delete, search...), the other interface, named
BackendPartition, which expose a bit more methods, like the sync() method,
get/set Id, get/set SuffixDn, etc.

Does it make sense to you ?


     
yeap, and one more thing is to change the BTreePartition class name too.
(I somehow feel that it doesn't sound like a generic base class)


   
I agree.  I think this is a base XdbmPartition implementation really.
 
Then we have to define it. We can rename the BTreePartion to be XdbmPartition



Sounds good to me. 

Regards,
--
Alex Karasulu
My Blog :: http://www.jroller.com/akarasulu/
Apache Directory Server :: http://directory.apache.org
Apache MINA :: http://mina.apache.org