Return-Path: X-Original-To: apmail-directory-kerby-archive@minotaur.apache.org Delivered-To: apmail-directory-kerby-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0131B18B23 for ; Tue, 30 Jun 2015 03:49:30 +0000 (UTC) Received: (qmail 3447 invoked by uid 500); 30 Jun 2015 03:49:29 -0000 Delivered-To: apmail-directory-kerby-archive@directory.apache.org Received: (qmail 3426 invoked by uid 500); 30 Jun 2015 03:49:29 -0000 Mailing-List: contact kerby-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: kerby@directory.apache.org Delivered-To: mailing list kerby@directory.apache.org Received: (qmail 3415 invoked by uid 99); 30 Jun 2015 03:49:29 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jun 2015 03:49:29 +0000 Received: from mail-ig0-f178.google.com (mail-ig0-f178.google.com [209.85.213.178]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 9E17B1A0253 for ; Tue, 30 Jun 2015 03:49:29 +0000 (UTC) Received: by igblr2 with SMTP id lr2so4169731igb.0 for ; Mon, 29 Jun 2015 20:49:28 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.50.30.9 with SMTP id o9mr21592231igh.36.1435636168841; Mon, 29 Jun 2015 20:49:28 -0700 (PDT) Received: by 10.36.31.204 with HTTP; Mon, 29 Jun 2015 20:49:28 -0700 (PDT) In-Reply-To: <8D5F7E3237B3ED47B84CF187BB17B66611B8AA97@SHSMSX103.ccr.corp.intel.com> References: <8D5F7E3237B3ED47B84CF187BB17B66611B8AA97@SHSMSX103.ccr.corp.intel.com> Date: Tue, 30 Jun 2015 11:49:28 +0800 Message-ID: Subject: Re: [backend] AbstractIdentityBackend interface From: Kiran Ayyagari To: kerby@directory.apache.org Content-Type: multipart/alternative; boundary=047d7bd76aeadef33f0519b417ce --047d7bd76aeadef33f0519b417ce Content-Type: text/plain; charset=UTF-8 On Mon, Jun 29, 2015 at 9:10 PM, Zheng, Kai 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 --047d7bd76aeadef33f0519b417ce--