jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Aemisegger <develo...@pagnolia.ch>
Subject Best practice for Asset management
Date Wed, 16 Mar 2005 20:41:40 GMT
Dear list,

encouraged by Stefanos point of view that this list is also considered to be a 
user list, I present my questions.

I'd like to introduce asset management to the magnolia CMS R2.1 (0.16.2 
compliant). The purpose of asset management is to be able to centrally define 
assets which can be referenced multiple times at different places.

First, I wanted to use the predefined nodetype 'nt:resource' which would fit my 
needs. This predefined nodetype slightly counteracts the existing magnolia 
repository structure because it doubles the property 'jcr:lastModified' which 
is already present in magnolia metadata. So, I dropped 'nt:resource'.

To get started, I decided to extend the existing magnolia custom node types. I 
added mixin="true" and the new property 'mgnlReference' of type 'Reference' to 
all mgnl:xxx nodetypes. The custom_nodetypes.xml for the website repository now 
looks like this:

     <!-- custom node types -->
     <nodeType name="mgnl:content" mixin="true" orderableChildNodes="false">
         <supertypes>
             <supertype>nt:hierarchyNode</supertype>
         </supertypes>
				<propertyDef name="mgnlReference" type="Reference" autoCreate="false" 
mandatory="false" multiple="false" onParentVersion="COPY" primaryItem="false" 
protected="false"/>
         <childNodeDef name="*" defaultPrimaryType="" autoCreate="false" 
mandatory="false" onParentVersion="VERSION" protected="false" 
primaryItem="false" sameNameSibs="false">
             <requiredPrimaryTypes>
                 <requiredPrimaryType>nt:hierarchyNode</requiredPrimaryType>
             </requiredPrimaryTypes>
         </childNodeDef>
     </nodeType>
     <nodeType name="mgnl:contentNode" mixin="true" orderableChildNodes="false">
         <supertypes>
             <supertype>nt:hierarchyNode</supertype>
         </supertypes>
				<propertyDef name="mgnlReference" type="Reference" autoCreate="false" 
mandatory="false" multiple="false" onParentVersion="COPY" primaryItem="false" 
protected="false"/>
         <childNodeDef name="*" defaultPrimaryType="" autoCreate="false" 
mandatory="false" onParentVersion="VERSION" protected="false" 
primaryItem="false" sameNameSibs="false">
             <requiredPrimaryTypes>
                 <requiredPrimaryType>nt:hierarchyNode</requiredPrimaryType>
             </requiredPrimaryTypes>
         </childNodeDef>
     </nodeType>
     <nodeType name="mgnl:nodeData" mixin="true" orderableChildNodes="false">
         <supertypes>
             <supertype>nt:hierarchyNode</supertype>
         </supertypes>
				<propertyDef name="mgnlReference" type="Reference" autoCreate="false" 
mandatory="false" multiple="false" onParentVersion="COPY" primaryItem="false" 
protected="false"/>
         <childNodeDef name="jcr:content" defaultPrimaryType="" 
autoCreate="false" mandatory="true" onParentVersion="COPY" protected="false" 
primaryItem="true" sameNameSibs="false">
             <requiredPrimaryTypes>
                 <requiredPrimaryType>nt:base</requiredPrimaryType>
             </requiredPrimaryTypes>
         </childNodeDef>
     </nodeType>


An exemplary hierarchal node tree looks something like this:
mgnl:content
|--mgnl:contentNode
|  |-mgnl:nodeData
|  |-mgnl:nodeData
|  |-mgnl:nodeData
|
|--mgnl:content
|  |--mgnl:contentNode
|  |  |-mgnl:nodeData
|  |  |-mgnl:nodeData
|  |
|  |--mgnl:contentNode
|     |-mgnl:nodeData

mgnl:content corresponds to pages
mgnl:contentNode corresponds to paragraphs on a page
mgnl:nodeData corresponds to actual user data like text, images and the like


And here are my design and performance related questions:
a) Is it wise to add mixin="true" to all nodetypes?
b) What are the performance consequences for ensuring referential integrity all 
over the repository?
c) Is there a best practice to do asset management?

I'm sorry for the fuzzyness of my questions, but I still lack experience with 
JCR. I guess the performance related questions depend heavily on the 
combination used for FileSystem and PersistenceManager implementations, and of 
course OS, and .... Still, can you share experience in this area? I'm 
particularly interested in experience with plain jackrabbit configuration 
(LocalFileSystem & XmlPersistenceManager) and ORM configuration 
(HibernatePersistenceManager), ceteris paribus.

Cheers,
Michael


Mime
View raw message