Return-Path: X-Original-To: apmail-jackrabbit-dev-archive@www.apache.org Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0760C7B18 for ; Thu, 29 Dec 2011 20:50:08 +0000 (UTC) Received: (qmail 68997 invoked by uid 500); 29 Dec 2011 20:50:07 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 68943 invoked by uid 500); 29 Dec 2011 20:50:07 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 68936 invoked by uid 99); 29 Dec 2011 20:50:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Dec 2011 20:50:07 +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.210.170 as permitted sender) Received: from [209.85.210.170] (HELO mail-iy0-f170.google.com) (209.85.210.170) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Dec 2011 20:50:00 +0000 Received: by iafj26 with SMTP id j26so48354999iaf.1 for ; Thu, 29 Dec 2011 12:49:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=D4xvv6yponJX/cb9MJbE3bagX6JXWieDiTThq+PDbLY=; b=g616u0s28qqgkDriJmRxCnaEszhyEMg+fbWN5J9GWOyT0zHrMfemUZaj8PStTOOBiE m95Gk4lnFs3KS+9XqJRivJ6bCcaG/HLzrMQJQ44PP/HmF1OUElgJqbjlGB/PlOd5/8yl gngLX79s5kftxmvUYb9M8DJL1l/F2gc8Nnxg0= MIME-Version: 1.0 Received: by 10.50.187.226 with SMTP id fv2mr42900282igc.20.1325191779154; Thu, 29 Dec 2011 12:49:39 -0800 (PST) Received: by 10.42.19.136 with HTTP; Thu, 29 Dec 2011 12:49:39 -0800 (PST) Date: Thu, 29 Dec 2011 21:49:39 +0100 Message-ID: Subject: Re: [jr3 microkernel] New transient space implementation From: Stefan Guggisberg To: dev@jackrabbit.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Dec 29, 2011 at 6:19 PM, Michael D=FCrig wrote: > Hi, > > Over at the sandbox [1] I implemented a new (AFAIK) approach for the JCR > transient space. The gist of it is in the ChangeTree class [2] while some > more Microkernel specific things are factored out into the TransientSpace > class [3]. great work! it's good to see a fresh take on jcr client implementation. some comments from the peanut gallery follow inline ;) > > The key idea is to only store changes to the node hierarchy in the > ChangeTree and to do that in a way which allows reconstructing a list of > corresponding operations (add, remove, move for nodes and set for > properties) from that ChangeTree. This differs from other implementations > where the list of operations is kept *together* with the modified hierarc= hy. > Furthermore with the ChangeTree approach no untouched nodes need to be ke= pt > in memory. that's also true for the existing jackrabbit-core implementation. > Finally the list of operations reconstructed from a ChangeTree is > minimal. That is, all cancelling operations are reduced as much as possib= le: same here, jackrabbit-core does consolidate transient changes as well. cheers stefan > add followed by remove of the same item results in no operations, add > followed by move of the same node results in the node being added at the > target of the move, move followed by remove of a node results in the node > being removed at the source of the move and move followed by another move= of > a node results in a single move from the original source to the eventual > target. More details are in the class comment of ChangeTree and even more > details in the implementation ;-) > > Michael > > > [1] http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkerne= l/ > > [2] > http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/sr= c/main/java/org/apache/jackrabbit/state/ChangeTree.java?view=3Dmarkup > > [3] > http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/sr= c/main/java/org/apache/jackrabbit/state/TransientSpace.java?view=3Dmarkup