directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel L├ęcharny <>
Subject Cache and partitions...
Date Sun, 08 Sep 2013 08:08:24 GMT
Hi guys,

we need to use a cache in the partitions, for entries, aliases, and also
for whatever cache the partitins could need (assuming that this can be
configurable : for instance, JDBM has its own cache, but Mavibot does not).

This cache could be handled by the CacheService, which is created in the
ApacheDsService, the DefaultDirectoryServiceFactory, or in the
DefautDirectoryService if it's not injected in this class.

On a side note, the CacheService is a wrapper on top of EhCache, which
is, IMO, not good enough : it should be an interface, with some factory
which creates various instances of CacheService instances, one of them
being based on EhCache. In case we wan't to use another cache later, or
design our own, then we would just instanciate the correct CacheService
instance using the factory.

That being said, I thing the CacheService should be propagated down to
the partitions for them to be used - or not.

The CacheService should also be configurable through the LDIF
configuration file - we don't necessarily need to make the CacheService
a fully configured system, because then we would face a chicken/egg pb :
how do we read the configuration if we can't configure the cacheService,
which will be used by the LdifPartition ?

Those are elements to think about, because they are pretty critical from
the performance POV. However, this is by no mean urgent : this won't fix
a bug, it will just make the server to run faster.

I suggest we focus on decoupling the cacheService we have from it's
EhCache implementation atm, so that the API is not to be odified after
the next release, and that's it. I also suggest to make this
CacheService available in the Partitions, even if it's not used.

Thoughts ?

Emmanuel L├ęcharny 

View raw message