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 0F920185A2 for ; Sat, 4 Jul 2015 17:42:37 +0000 (UTC) Received: (qmail 35699 invoked by uid 500); 4 Jul 2015 17:42:37 -0000 Delivered-To: apmail-directory-kerby-archive@directory.apache.org Received: (qmail 35677 invoked by uid 500); 4 Jul 2015 17:42:37 -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 35665 invoked by uid 99); 4 Jul 2015 17:42:36 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Jul 2015 17:42:36 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 4961CD234A for ; Sat, 4 Jul 2015 17:42:36 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.102 X-Spam-Level: X-Spam-Status: No, score=-0.102 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 8yJx8S5PzFlC for ; Sat, 4 Jul 2015 17:42:35 +0000 (UTC) Received: from mail-pd0-f171.google.com (mail-pd0-f171.google.com [209.85.192.171]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 7D51D2095C for ; Sat, 4 Jul 2015 17:42:35 +0000 (UTC) Received: by pdbep18 with SMTP id ep18so81239549pdb.1 for ; Sat, 04 Jul 2015 10:42:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=ZB3a8eFJZBU3oOkOt0O2bczPDV9Z4xjtj/hT0uFURKo=; b=TKCgYG9a5UWBgcXnhAJzu0fb0XRIFXJs645LelfTzbdlFAe91Ps0TM0p5E558Aj0La 2Ip7kDHuj3sTUf3qCLS8m3M5+Bdu9V4fqYOS5l53yFz5AZw2xRY8R7MbI2onG3IL8pZZ BeV/1q2ySSiiZioV0N03Mm5o55TmFRBwUo00PeRPvthtxP5JDH4scajOfywB+tsxCvp1 vOUMfEUUhZRzEnckCMYchYffQjkS2l5CAO8CKFbCttcf5w1FLAxWtOMSPUvWm3ffEt0e gVNBbC+FPW2b6y1KbNFsBB+ykthDo1SkKmhzc7M1qSZMO6f6hXjTTj534enZRU40QOVD EDNA== X-Received: by 10.70.56.4 with SMTP id w4mr89646719pdp.148.1436031755195; Sat, 04 Jul 2015 10:42:35 -0700 (PDT) Received: from [192.168.1.29] (AMontsouris-651-1-215-219.w92-140.abo.wanadoo.fr. [92.140.6.219]) by mx.google.com with ESMTPSA id yp5sm12883103pbb.22.2015.07.04.10.42.33 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 Jul 2015 10:42:33 -0700 (PDT) Message-ID: <55981B07.4030800@gmail.com> Date: Sat, 04 Jul 2015 19:42:31 +0200 From: =?UTF-8?B?RW1tYW51ZWwgTMOpY2hhcm55?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: kerby@directory.apache.org Subject: Re: How to implement getIdentities(int start, int limit) more effectively References: <90DF6519509879499C9757E089E2D595940287@shsmsx102.ccr.corp.intel.com> <90DF6519509879499C9757E089E2D59594037C@shsmsx102.ccr.corp.intel.com> <55950D06.1060201@gmail.com> <559526C4.6060302@gmail.com> <90DF6519509879499C9757E089E2D595940564@shsmsx102.ccr.corp.intel.com> <8D5F7E3237B3ED47B84CF187BB17B66611B8E09B@SHSMSX103.ccr.corp.intel.com> <90DF6519509879499C9757E089E2D59594058C@shsmsx102.ccr.corp.intel.com> <55963F69.7020107@gmail.com> <8D5F7E3237B3ED47B84CF187BB17B66611B8E9F6@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <8D5F7E3237B3ED47B84CF187BB17B66611B8E9F6@SHSMSX103.ccr.corp.intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Le 04/07/15 15:27, Zheng, Kai a écrit : > Thanks Emmanuel for the further discussion. > >>> My percezption is that the getIdentities() method should be made specific, per backend. If a backend supports paged search and sort, fine, iyt can use it. If it's not, then it should use a default implementation. In any cases, the user should not be aware of what's going on behind the curtain. > Sounds good. One thing is we need a mechanism to let the client be able to aware what's the capabilities a backend is of, paged search, sort and etc. If the client isn't able to aware, how it make use of it. I don't think it's a good idea. That would make it more complex for the clinet that it needs to be. I do think that the cursor implementation should be responsible for the sorting of data, same thing for the paged search (or to implement it if the backend does not). > >>> The best way to acheive this is to have the getIdentities() return a Cursor, which can be handled by any client. > As I said before, the cursor or iterator (proposed by Stefan) looks good to have. My only question is, could we delay this to next release? You may be noted that it's not so easy for us in short time, we have quite a few backends, and quite a few client calls to use the related API. We should be able to get the most required things done and have the first release sooner and better. Please note backend APIs are internal ones, no worrying for admin and end users if we have. Ok, I see. Here is what I suggest : get the cursor used, no matter what, but don't implement specific cursors for backend that support paged search or sorting : instead define a DefaultCursor that do a full search, order the result, and return it. Every backend implementaion will use this DefaultCursor from now on, and after the release, we can improve the code by implementing smarter cursors.