directory-kerby mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kiran Ayyagari <kayyag...@apache.org>
Subject Re: [backend] AbstractIdentityBackend interface
Date Tue, 30 Jun 2015 03:49:28 GMT
On Mon, Jun 29, 2015 at 9:10 PM, Zheng, Kai <kai.zheng@intel.com> wrote:

> Thanks Kiran for the taking.
>
> >> I am implementing a Mavibot based backend*.
> Would you clarify a bit about this? I'm wondering if it's the same thing,
> the on-going LdapIdentityBackend Yaning is working on?
>
no, this is a different one that stores all data in a single file in binary
format

> Or you mean something that uses Mavibot directly instead of by the LDAP
> connection API?
>
yes, LDAP backend needs a server, whereas mavibot backend stores locally on
disk

>
> >> Is there any reason why the API methods start with doXXX()?
> I would think AbstractIdentityBackend isn't the interface, and the doXXX()
> methods are not the APIs.
> Please see the APIs in the interface IdentityBackend/IdentityService.
>
ic, I see that these doXXX() are for subclasses, but we can completely
avoid these methods, see below

> AbstractIdentityBackend is a common abstract class to implement the API
> interface, and provides some useful functionalities like cache.
>

This AbstractIdentityBackend ia always utilizing a cache and this is
enforced on all backends that
subclass this, instead what we should do is to create a
CacheableIdentityBackend which wraps
an instance IdentityBackend and maintains an internal cache, and calls are
delegated to the wrapped
backend when a cache miss happens.

This way implementations of IdentityBackend will be free from the side
effects of caching while testing
and also become simple and cleaner.


I thought if you don't like it, you could start with totally new,
> implementing IdentityBackend/IdentityService directly.
>
> I hope the above reasons make the intention behind this proposal clear

> >> now is the time after today's commits in Mavibot trunk that address
> these bugs.
> Glad it's the time now. It will help a lot.
>
> Regards,
> Kai
>
> -----Original Message-----
> From: Kiran Ayyagari [mailto:kayyagari@apache.org]
> Sent: Monday, June 29, 2015 5:43 PM
> To: kerby@directory.apache.org
> Subject: [backend] AbstractIdentityBackend interface
>
> I am implementing a Mavibot based backend*.
>
> Is there any reason why the API methods start with doXXX()?
> This looks a bit odd and hard to read.
>
> I would like to strip the 'do' verb from these methods, please let me know
> if there are any objections.
>
> * this is on hold for a long time due to the free page management bugs,
> but now
>    is the time after today's commits in Mavibot trunk that address these
> bugs.
>
> --
> Kiran Ayyagari
> http://keydap.com
>



-- 
Kiran Ayyagari
http://keydap.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message