Return-Path: X-Original-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 397D29E38 for ; Tue, 20 Mar 2012 09:34:58 +0000 (UTC) Received: (qmail 65710 invoked by uid 500); 20 Mar 2012 09:34:58 -0000 Delivered-To: apmail-jackrabbit-oak-dev-archive@jackrabbit.apache.org Received: (qmail 65667 invoked by uid 500); 20 Mar 2012 09:34:58 -0000 Mailing-List: contact oak-dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: oak-dev@jackrabbit.apache.org Delivered-To: mailing list oak-dev@jackrabbit.apache.org Received: (qmail 65659 invoked by uid 99); 20 Mar 2012 09:34:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Mar 2012 09:34:58 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of julian.reschke@gmx.de designates 213.165.64.23 as permitted sender) Received: from [213.165.64.23] (HELO mailout-de.gmx.net) (213.165.64.23) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 20 Mar 2012 09:34:48 +0000 Received: (qmail invoked by alias); 20 Mar 2012 09:34:28 -0000 Received: from p57A6DA1A.dip.t-dialin.net (EHLO [192.168.178.36]) [87.166.218.26] by mail.gmx.net (mp037) with SMTP; 20 Mar 2012 10:34:28 +0100 X-Authenticated: #1915285 X-Provags-ID: V01U2FsdGVkX192IugVU4x2CuhVnSA9CgJrlAKBN7PTiTCrr/PBTw h0WCvXpZ1Ddkk3 Message-ID: <4F684F15.8010206@gmx.de> Date: Tue, 20 Mar 2012 10:34:13 +0100 From: Julian Reschke User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: oak-dev@jackrabbit.apache.org CC: Thomas Mueller , Jukka Zitting Subject: Re: MicroKernel API vs. protocol References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org On 2012-03-20 09:07, Thomas Mueller wrote: > ... >> about "flat or not". Forcing getNodes to return things as a hierarchy, >> when it also could be a list of objects, decorated with a path, will >> make it harder than it needs to be to process efficiently. > > So far I didn't think this is a problem, but I'm not sure if I understand > what you mean exactly. Could you give a example how an alternative > representation would look like? > ... Right now we return a tree, such as: "a" : { ":childCount" : 1, "title" : "foo", "b" : { ":childCount" : 0, "title" : "bar" } } The idea would be to return an array of leaf nodes, keyed by their identifiers. Such as [ "a" : { ":childCount" : 1, "title" : "foo" } ], [ "a/b" : { ":childCount" : 0, "title" : "bar" } ] etc... The benefit is that it's slightly easier to process in a streaming way, because it's just an iterator over node infos, instead of a tree. Best regards, Julian