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 44861DC8C for ; Thu, 15 Nov 2012 11:59:38 +0000 (UTC) Received: (qmail 84052 invoked by uid 500); 15 Nov 2012 11:59:38 -0000 Delivered-To: apmail-jackrabbit-oak-dev-archive@jackrabbit.apache.org Received: (qmail 83986 invoked by uid 500); 15 Nov 2012 11:59:36 -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 83957 invoked by uid 99); 15 Nov 2012 11:59:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Nov 2012 11:59:35 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of stefan.guggisberg@gmail.com designates 209.85.214.170 as permitted sender) Received: from [209.85.214.170] (HELO mail-ob0-f170.google.com) (209.85.214.170) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Nov 2012 11:59:28 +0000 Received: by mail-ob0-f170.google.com with SMTP id wp18so3164020obc.1 for ; Thu, 15 Nov 2012 03:59:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=f2lDPKL2rF9yrG6P4aLYqxir6O1hfB+AD4uTtH6+bt0=; b=kacsBXTaERuvBBT5Qyqegvv5G0BjALWfUh3QjbrlKz1WzWhUHvvgnSg/uIjOYrs2in xe3J6xf9WVOcD5YAkhFd7A2fnFpj2mJkfdmIUgFo5eNFGJasEpw+dM7Gc3j7PdWOOU0r 6qHlMyFBxSRWhY6y0MSf0CjEt3JL/OEAA+7kVIRgMwe4CfEMjFl01YgfRM+6nWgK3Waj dwc4whxE2uM6OvxUmgMPCYwH2azbFSTmnzLAF80pmECFPvJIgqvO2Pgc4o8jtTAbnste 8twA4i+saPQQQvO7oWrDu/uwl6P2L/d/l51kIJsZMYsNP8+W8VZIpBFrgLx/dwu+nXid roIQ== MIME-Version: 1.0 Received: by 10.60.26.165 with SMTP id m5mr693483oeg.4.1352980747325; Thu, 15 Nov 2012 03:59:07 -0800 (PST) Received: by 10.76.73.129 with HTTP; Thu, 15 Nov 2012 03:59:07 -0800 (PST) In-Reply-To: References: Date: Thu, 15 Nov 2012 12:59:07 +0100 Message-ID: Subject: Re: Support for long multivalued properties From: Stefan Guggisberg To: "oak-dev@jackrabbit.apache.org" Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Nov 15, 2012 at 12:00 PM, Jukka Zitting wrote: > Hi, > > This came up earlier in the Berlin Oakathon and we're now facing it > also with the property index. Basically, do we want to add explicit > support for long (>> 1k values) multivalued properties? > > Currently such properties are possible in theory since there is no > hard limit to the size of the value array, but in practice accessing > such properties requires reading the whole array to memory and even a > simple update (like appending a single value) requires the whole array > to be rewritten. > > There are two ways of supporting use cases that require such long > multivalued properties: a) we can support it directly in the > repository, or b) we require the client to use more complex data > structures like in the BTreeManager in Jackrabbit trunk or the BTree > implementation in the wrapper-based index implementation Thomas wrote > for Oak. > > Supporting such use cases directly in the repository would be nice as > that would notably simplify affected clients. However, doing so would > require us to adapt some of our APIs. For example we'd need a way to > iterate over the list of values of a single property and to add, set > and remove individual values at specific locations. The > PropertyBuilder interface already has some of this, but neither the > Oak API nor the MicroKernel currently support such operations. > > WDYT, should we implement something along these lines or leave it up > to clients? I'm cautiously positive in that we should do this since > we'd in any case need similar code for the property index, but would > love to hear other opinions. personally i am not aware of real life use cases requiring 'large' mv properties. since the ultimate goal of oak is to provide a JCR implementation and the JCR API doesn't provide any methods to manipulate/access single members of a mv property i don't think we need to support it under the hood. cheers stefan > > BR, > > Jukka Zitting