From commits-return-9741-apmail-jackrabbit-commits-archive=jackrabbit.apache.org@jackrabbit.apache.org Mon Mar 15 13:43:40 2010 Return-Path: Delivered-To: apmail-jackrabbit-commits-archive@www.apache.org Received: (qmail 82052 invoked from network); 15 Mar 2010 13:43:40 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Mar 2010 13:43:40 -0000 Received: (qmail 92854 invoked by uid 500); 15 Mar 2010 13:42:51 -0000 Delivered-To: apmail-jackrabbit-commits-archive@jackrabbit.apache.org Received: (qmail 92818 invoked by uid 500); 15 Mar 2010 13:42:51 -0000 Mailing-List: contact commits-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 commits@jackrabbit.apache.org Received: (qmail 92787 invoked by uid 99); 15 Mar 2010 13:42:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Mar 2010 13:42:51 +0000 X-ASF-Spam-Status: No, hits=-1009.5 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.130] (HELO eos.apache.org) (140.211.11.130) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Mar 2010 13:42:50 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id 23CEA17621 for ; Mon, 15 Mar 2010 13:42:30 +0000 (GMT) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Apache Wiki To: Apache Wiki Date: Mon, 15 Mar 2010 13:42:29 -0000 Message-ID: <20100315134229.20164.13992@eos.apache.org> Subject: =?utf-8?q?=5BJackrabbit_Wiki=5D_Update_of_=22MicroKernelPrototype=22_by_T?= =?utf-8?q?homasMueller?= Dear Wiki user, You have subscribed to a wiki page or wiki category on "Jackrabbit Wiki" fo= r change notification. The "MicroKernelPrototype" page has been changed by ThomasMueller. http://wiki.apache.org/jackrabbit/MicroKernelPrototype?action=3Ddiff&rev1= =3D2&rev2=3D3 -------------------------------------------------- = The Jackrabbit 3 !MicroKernel prototype consists of the following compone= nts: = - * Test Application - use the JCR 2.0 API to talk to Jackrabbit. + * Test Application - uses the JCR 2.0 API to talk to Jackrabbit. = * Package j3 contains the JCR API implementation and core classes. = * Package j3.mc contains the !MicroKernel implementation. = = - * Packages j3.mc.jdbc and j3.mc.mem contains Storage engines implementat= ions + * Packages j3.mc.jdbc and j3.mc.mem contain Storage engines implementati= ons. = =3D=3D=3D Core =3D=3D=3D = - * Each !RepositoryImpl has a read-only cache of !NodeData objects. It al= so references the !MicroKernel Storage and keeps a list of open !SessionImpl + * Each !RepositoryImpl has a read-only cache of !NodeData objects. It al= so references the !MicroKernel Storage and keeps a list of open !SessionImp= l. = - * Each !SessionImpl has a weak-reference map of !NodeState objects. It c= ontains a reference to the !StorageSession. + * Each !SessionImpl has a weak-reference map of !NodeState objects, to e= nsure multiple !NodeImpl point to the same data. The transient space change= s are currently kept in a (hard reference) map of !NodeState as well as a l= ist of Change objects. The plan is: if there are too many transient changes= , the least recently used ones are stored in the !MicroKernel (possibly in = the same storage as the regular persistent data, so that a commit will only= update pointers; another option is to store transient changes and other pa= rts of the cache in a "temporary repository" if !MicroKernel remoting is us= ed). A session references one !StorageSession. It also references the !Repo= sitoryImpl. = - * A !NodeImpl object represents a node with a path. The object contains = no data, but it references a parent (for the path) and a !NodeState. + * A !NodeImpl object represents a node with a path. The object contains = no data, but it references a parent (for the path) and a !NodeState. Multip= le !NodeImpl objects can reference the same !NodeState (shareable nodes, an= d if the client application requested the same node multiple times). = - * A !NodeState is a wrapper for an unmodified or modified !NodeData obje= ct. If the data gets modified, a new !NodeData object is created (read-only= !NodeData objects are immutable). For each shareable node, there is only o= ne !NodeState and one !NodeData object. + * A !NodeState is a wrapper for an (unmodified or modified) !NodeData ob= ject. If the data gets modified, a new !NodeData object is created (read-on= ly !NodeData objects are immutable). For each shareable node, there is at m= ost one !NodeState and one !NodeData object per session. !NodeState objects= also keep a reference to a !SessionImpl. = - * A !PropertyImpl contains the !NodeImpl reference and the property name= . It does not contains data. + * A !PropertyImpl contains the !NodeImpl reference and the property name= . It does not contain data. Almost each method calls a method in !NodeImpl = or !NodeState. = - * For each modification, a Change object is created. This Change is then= added to the session, and applied. A Change can be re-applied afterwards i= f storing the changes fails. A Change object is also the base for event log= ging and observation. + * For each modification, a Change object is created. There are multiple = Change subclasses (!ChangeAddNode, !ChangeRemoveNode, !ChangeSetProperty). = After each modification, a Change object is added to list in the session, a= nd then the change is applied. If storing (Session.save) fails because of a= concurrent update, the list of changes can be re-applied automatically if = required (so that changes are automatically merged). A Change object is als= o the base for event logging and observation. = =3D=3D=3D Micro Kernel =3D=3D=3D = * There is one Storage object per repository. = - * !NodeData objects contain the actual data in for of Val objects + * Each !StorageSession represents a session. A session may or may not ha= ve 'state'. For example, a session of a JDBC-based storage engine may refer= ence a JDBC connection, but it doesn't have to (possibly there is only one = connection, or each request could open a new connection from a connection p= ool). + = + * !NodeData objects contain the actual data in form of Val objects. A !N= odeData object is mainly a collection of Val objects. = * A Val object represents a value and a property type. It is immutable. = - * Each !StorageSession represents a session. A session may or may not ha= ve 'state'. For example, a session in a JDBC storage may references a JDBC = connection, but it doesn't have to. + * A Bundle object contains the serialized form of one or multiple !NodeD= ata objects (a byte array) for those storage engines that serialize the dat= a (which is probably all except for in-memory storage and possibly plain-te= xt persistence if somebody wants to implement that). If the !MicroKernel is= accessed remotely (which is just an idea for now), the Bundle will most li= kely also be used to serialize data between the Core and the !MicroKernel. = - * A Bundle object contains the serialized form of one or multiple !NodeD= ata objects. + * There are currently two Storage / !StorageSession implementations: an = in-memory storage, and a prove-of-concept JDBC storage. = - * There are currently two Storage / !StorageSession implementations: an = in-memory storage, and a JDBC storage. -=20