Kiran Ayyagari wrote:
hello guys,

As a second step in getting the CiDIT [1] am currently implementing a new partition which uses LDIF files as backend, however as I go deeper in implementation(atm the partition supports add operation) I asked a couple of questions to myself which I would like to share and seek opinion on

1. Instead of creating a whole new partition impl for storing CiDIT can we use the existing (and well tested)
         JDBM partition?
Well, at first sight, I don't think it's a good idea. The initial target was to allow an admin to manipulate the conf without having to use a tool to change the config. Being able to modify the conf with vi/emacs/notepad is always a good thing compared to having a broken conf in an opac file. But ...

The JDBM based partition stores data in binary format but in order to make the configuration editable using
         a simple text editor I propose the following steps

a. After initial startup of server the default configuration will be dumped to the file system as a single LDIF file or as a set of directories and LDIF files( mimicking the DIT structure)
What if the JDBM file is broken ?

b. A watchdog thread will keep listening on this file(s) for changes

i. any change of type update/delete done to the content of file(s) will be reflected in
                the CiDIT accordingly, but

ii. If the file itself gets deleted we *don't* delete the configuration data in DIT but simply dump that data again to file system. To delete the configuration data completely the corresponding partition needs to be physically removed from the disk in which case the system restores the
                 default configuration during the next startup

c. similarly this file(s) gets updated if the configuration data DIT gets updated


  thanks for your time and I appreciate your comments :)
Ok, I see where you want to go : basically, guarantee that the config can be read as we know that if it's JDBM packed, the partition will work. I would say that as a first step, to debug the config itself (ie, to check that all the parameters are OK), we can do that. But at the end, I really think we must go for a text based config.

P.S:- Though implementing a partition is not difficult it is certainly not trivial, am thinking in terms of maintaining code and the amount of configuration required for each new partition impl to be used in server and also considering the time we have to implement replication support in 2.0
IMO, writing a new partition bascked by ldif files should not really take much more than 2 weeks. But as we really need to have some config element for the replication subsystem, and if going with JDBM backed config will help, I would say : go for it.

Thanks !




[1] http://cwiki.apache.org/confluence/display/DIRxSRVx20/ADS+2.0+configuration

Kiran Ayyagari



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


Reply via email to