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 14CA67CBA for ; Thu, 29 Dec 2011 17:19:42 +0000 (UTC) Received: (qmail 58526 invoked by uid 500); 29 Dec 2011 17:19:41 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 58474 invoked by uid 500); 29 Dec 2011 17:19:41 -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 58467 invoked by uid 99); 29 Dec 2011 17:19:40 -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 17:19:40 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of michid@gmail.com designates 64.18.1.33 as permitted sender) Received: from [64.18.1.33] (HELO exprod6og114.obsmtp.com) (64.18.1.33) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Dec 2011 17:19:30 +0000 Received: from outbound-smtp-2.corp.adobe.com ([193.104.215.16]) by exprod6ob114.postini.com ([64.18.5.12]) with SMTP ID DSNKTvyhDJd7nhgb5xtNVxl4ixSBRosBR0Ku@postini.com; Thu, 29 Dec 2011 09:19:10 PST Received: from inner-relay-1.corp.adobe.com (inner-relay-1.corp.adobe.com [153.32.1.51]) by outbound-smtp-2.corp.adobe.com (8.12.10/8.12.10) with ESMTP id pBTHJ7lQ007723 for ; Thu, 29 Dec 2011 09:19:07 -0800 (PST) Received: from nacas03.corp.adobe.com (nacas03.corp.adobe.com [10.8.189.121]) by inner-relay-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id pBTHJ6L7005109 for ; Thu, 29 Dec 2011 09:19:06 -0800 (PST) Received: from eurhub01.eur.adobe.com (10.128.4.30) by nacas03.corp.adobe.com (10.8.189.121) with Microsoft SMTP Server (TLS) id 8.3.192.1; Thu, 29 Dec 2011 09:19:06 -0800 Received: from susi.local (10.136.137.76) by eurhub01.eur.adobe.com (10.128.4.111) with Microsoft SMTP Server id 8.3.192.1; Thu, 29 Dec 2011 17:19:05 +0000 Message-ID: <4EFCA108.4080201@gmail.com> Date: Thu, 29 Dec 2011 17:19:04 +0000 From: =?ISO-8859-1?Q?Michael_D=FCrig?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Subject: [jr3 =?ISO-8859-1?Q?microkernel=5D=A0New_transient_space_i?= =?ISO-8859-1?Q?mplementation?= Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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]. 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 hierarchy. Furthermore with the ChangeTree approach no untouched nodes need to be kept in memory. Finally the list of operations reconstructed from a ChangeTree is minimal. That is, all cancelling operations are reduced as much as possible: 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-microkernel/ [2] http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/ChangeTree.java?view=markup [3] http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientSpace.java?view=markup