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 01EBF9009 for ; Thu, 1 Mar 2012 13:53:52 +0000 (UTC) Received: (qmail 28753 invoked by uid 500); 1 Mar 2012 13:53:51 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 28706 invoked by uid 500); 1 Mar 2012 13:53:51 -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 28698 invoked by uid 99); 1 Mar 2012 13:53:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Mar 2012 13:53:51 +0000 X-ASF-Spam-Status: No, hits=-1.3 required=5.0 tests=FRT_ADOBE2,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mmarth@adobe.com designates 64.18.1.27 as permitted sender) Received: from [64.18.1.27] (HELO exprod6og111.obsmtp.com) (64.18.1.27) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Mar 2012 13:53:42 +0000 Received: from outbound-smtp-2.corp.adobe.com ([193.104.215.16]) by exprod6ob111.postini.com ([64.18.5.12]) with SMTP ID DSNKT09/USffASLnHVRGmdkSjW3RdF9xmm/3@postini.com; Thu, 01 Mar 2012 05:53:22 PST Received: from inner-relay-1.corp.adobe.com (ms-exchange.macromedia.com [153.32.1.51]) by outbound-smtp-2.corp.adobe.com (8.12.10/8.12.10) with ESMTP id q21DrKN3000427 for ; Thu, 1 Mar 2012 05:53:20 -0800 (PST) Received: from nacas02.corp.adobe.com (nacas02.corp.adobe.com [10.8.189.100]) by inner-relay-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id q21DrJMM004782 for ; Thu, 1 Mar 2012 05:53:19 -0800 (PST) Received: from eurhub01.eur.adobe.com (10.128.4.30) by nacas02.corp.adobe.com (10.8.189.100) with Microsoft SMTP Server (TLS) id 8.3.192.1; Thu, 1 Mar 2012 05:53:18 -0800 Received: from eurmbx01.eur.adobe.com ([10.128.4.32]) by eurhub01.eur.adobe.com ([10.128.4.30]) with mapi; Thu, 1 Mar 2012 13:53:16 +0000 From: Michael Marth To: "dev@jackrabbit.apache.org" Date: Thu, 1 Mar 2012 13:53:15 +0000 Subject: Re: [jr3] implicit assumptions in MK design? Thread-Topic: [jr3] implicit assumptions in MK design? Thread-Index: Acz3sqZ+1ofxImkhTumKMOAPEX2iHQ== Message-ID: <947F2A67-7520-4C2A-BA61-615F26077855@adobe.com> References: <2E8E5970-1EDE-4125-AE70-E5B7D56686FE@adobe.com> In-Reply-To: <2E8E5970-1EDE-4125-AE70-E5B7D56686FE@adobe.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Hi Dom, > Are you suggesting, that cluster sync will be provided purely by the unde= rlying NoSQL database? Yes, that's what I meant. Michael=20 -- Michael Marth | Engineering Manager +41 61 226 55 22 | mmarth@adobe.com Barf=FCsserplatz 6, CH-4001 Basel, Switzerland On Mar 1, 2012, at 2:25 PM, Dominique Pfister wrote: > Hi Michael, >=20 > Are you suggesting, that cluster sync will be provided purely by the unde= rlying NoSQL database? Until now, I always assumed that all cluster nodes e= xpose an MK interface, and that changes are transmitted to other nodes via = calls on this MK interface. So in your example, cluster node 2 would see a = "delete /a/b" and the question of a broken tree never arises. >=20 > Regards > Dominique >=20 > On Mar 1, 2012, at 1:53 PM, Michael Marth wrote: >=20 >> Hi, >>=20 >> I have thought a bit about how one could go about implementing a micro k= ernel based on a NoSQL database (think Cassandra or Mongo) where a JCR node= would probably be stored as an individual document and the MK implementati= on would provide the tree on top of that. Consider that you have two or mor= e cluster nodes of such an NoSQL db (each receiving writes from a different= SPI) and that these two cluster nodes would be eventually consistent. >>=20 >> It is easy to imagine cases where the tree structure of one node will be= temporarily broken (at least for specific implementations, see example bel= ow). I am not particularly worried about that, but I wonder if the MK inter= face design implicitly assumes that the MK always exposes a non-broken tree= to the SPI. The second question I have if we assume that a particular vers= ion of the tree the MK exposes to the SPI is stable over time (or: can it b= e the case that the SPI refreshes the current version it might see a differ= ent tree. Again, example below)? >>=20 >> I think we should be explicit about these assumptions or non-assumtption= s because either the MK implementer has to take care of them or the higher = levels (SPI, client) have to deal with them. >>=20 >> Michael >>=20 >> (*) example from above: consider node structure /a/b/c. On on cluster no= de 1 JCR node b is deleted. In order to implement that in a document db the= MK on cluster node 1 would need to separately delete b and c. The second c= luster node could receive the deletion of b first. So for some time there w= ould be a JCR node c on cluster node 2 that has no parent. >=20 >>=20 >> example regarding tree version stability: suppose in the example above t= hat tree version 1 is /a/b/c and tree version 2 is /a. Because deleting b a= nd c will arrive on cluster node 2 as separate events there must either be = some additional communication between the cluster nodes so that cluster nod= e 2 knows when tree version 2 is fully replicated. Or cluster node 2 will e= xpose a tree version 2 that first looks like /a/b and later as /a (i.e. the= same version number's tree will change over time) >=20