Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 40367 invoked from network); 13 Dec 2008 20:43:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Dec 2008 20:43:02 -0000 Received: (qmail 31893 invoked by uid 500); 13 Dec 2008 20:43:14 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 31860 invoked by uid 500); 13 Dec 2008 20:43:14 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 31685 invoked by uid 99); 13 Dec 2008 20:43:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Dec 2008 12:43:14 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of elecharny@gmail.com designates 209.85.134.185 as permitted sender) Received: from [209.85.134.185] (HELO mu-out-0910.google.com) (209.85.134.185) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Dec 2008 20:42:52 +0000 Received: by mu-out-0910.google.com with SMTP id i10so1570949mue.5 for ; Sat, 13 Dec 2008 12:42:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:user-agent :mime-version:to:subject:references:in-reply-to:content-type :content-transfer-encoding:from; bh=wF+JDzbVrukSM1tKpT6eM235Tiq02fHQFHxxHqK8ZB8=; b=SdJ2AA0b1KkqvNt2PdCQcPgqq5fNeBEQYiz1uDp2r8H1a9G/crsYbTmtK8EN1LqWpB h/T2UTohNmAL+KKPmSdKc4ZKbOpqPJZKl0LK2OjefJukZyw6KJRi+DC23TlGdSqiy1iY gC1hPzgHZZSZq0w/1DXuRTjhyb91bC7EExeps= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding:from; b=tIYdNxOmpXIVF4fk3JkCLLy+8VWUyb5sXNfO+y/89yyaiA0ehEkHFMaXDIcLthU2vx 2NlDeQyhnIuIqXUmm8t3Cl9bukQ3d4z1hd+HdYq6iQOfHcFJprQLLFYL2W3pnXV6ydxD DMYB/WvGh1fCBBGvmV2iJmkgdxdqNZ+f3OlBk= Received: by 10.102.234.18 with SMTP id g18mr2366783muh.102.1229200950848; Sat, 13 Dec 2008 12:42:30 -0800 (PST) Received: from ?192.168.0.11? (vol75-3-82-66-216-176.fbx.proxad.net [82.66.216.176]) by mx.google.com with ESMTPS id w5sm966368mue.25.2008.12.13.12.42.28 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 13 Dec 2008 12:42:29 -0800 (PST) Message-ID: <49441E36.3090100@nextury.com> Date: Sat, 13 Dec 2008 21:42:30 +0100 User-Agent: Thunderbird 2.0.0.18 (X11/20081125) MIME-Version: 1.0 To: Apache Directory Developers List Subject: Re: Paged Search Control questions References: <4943B7B3.6040604@nextury.com> <49441BA3.6070703@apache.org> In-Reply-To: <49441BA3.6070703@apache.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit From: Emmanuel Lecharny X-Virus-Checked: Checked by ClamAV on apache.org Stefan Seelmann wrote: > Emmanuel Lecharny schrieb: > >> Hi guys, >> >> as I'm busy implenting this control, >> > > Cool > > >> 1) considering that we have a server sizeLimit, a request sizeLimit and >> a page size limit, I'm wondering if we can simply ignore the request >> size limit. The page size limit can change, even if the paged result is >> being processed, but the RFC says "If the page size is greater than or >> equal to the sizeLimit value, the server should ignore the control as >> the request can be satisfied in a single page". Should I consider that >> the 'sizeLimit' is the request sizeLimit ? My personnal bet is : yes. >> > > Yes, I would say the 'sizeLimit' is the request sizeLimit. > > I think we should not ignore the requst sizeLimit, I would consider it > as client-side limit for the complete search over all pages. > > Say the request sizeLimit is 10 and the page size is 8 for both requests > then the first result contains 8 entries and the second contains 2 > entries plus a LDAP error #4. > Makes perfect sense. So we will have to remember the number of already returned entries, and compare it to the sizeLimit. Fine. >> 3) regarding the search request immutability : it's pretty hard to check >> that the filter hasn't changed, as it may be a complex one, with a >> different structure and a a different order. I think that this >> constraint is fully absurd, as the client will obviously create one >> request, and send a null cookie every time it will send a new paged >> search, so I don't see the validity of such a check. Nevertheless, >> should we try to implement such a check ? My personal guess, again, is >> that it's useless. >> > > To check if the filter changed logically is really complex. I think you > could just check if the string representation or the bytes the are > received were changed. > This is what I currently do. There is nothing more I can do... > >> I'm also interested to have some feedback about how this control is >> handled by the other ldap servers, considering the many factors >> influencing this control : >> - internal server size limit >> > > Here different implementations are different. > - OpenLDAP just stops if the server side limit is exceeded. > I thought you can define soft and hard limit... I have to check in my favorite OpenLDAP book 'Mastering OpenLDAP'. > - For MS AD has a default server side limit of 1000, but when this > control is used you could get more > Which violates the spirit of this limit... Thanks, AD ! > >> - how many of such paged search can be handled for a single client >> > Infinite? > Costly ... Currently, we don't have any limit, but at some point, we will need to discard some old searches, as each of them eat a big chunk of memory. I would say that a circular list of 10 paged search request should be a valid default. It may be configurable, too. The main issue I have atm is that I have to implement a mechanism to discard timeout-ed requests. > >> - what happens when we send a bad cookie to the server >> > Either start a new search or return an error > I think that sending an error is better. > >> - what happen when we play with the sizeLimit parameter >> > You mean the request sizeLimit? If it is changed it should be considered > as a new search. > You're right ! > >> Last, not least, as we are using cursors to get the entries from the >> backend, we are able to move forward or backward. It would be >> interesting to extend this control to allow a backward pagedSearch (for >> instance, providing a negative paged size). Would it be interesting ? >> > > There is another control for this: VLV, see [1]. But is also need > server-side sorting. > True ! I forgot about this guy... Thanks Stefan, very interesting responses ! I was running in circles, I start to see the light now :) -- -- cordialement, regards, Emmanuel L�charny www.iktek.com directory.apache.org