Hi Everyone,

I wanted to start a discussion about the default database shipped with magnolia:

What do you think about switching from Derby to H2?

Both are pure Java embedded Databases with similar features, and both are 
supported by Jackrabbit with dedicated bundle-persistance-manager 
implementations.

Based on its license H2 could be shipped with magnolia (both community and 
enterprise) without causing any restrictions or licensing issues.

Switching to H2 would have some pretty significant advantages:


-          H2 is considerably faster than Derby

-          H2 uses only one file per database - magnolia's "too many open 
files" problem under linux/macos/unix would be history

In particular the second point would be a big advantage for easy deployment of 
the bundle releases - setting the ulimits to increase the max file handles can 
be a bit tricky on some distributions, and is a "stumbling block" for many new 
users (esp. those more used to windows than unix systems) and a regularly 
recurring question on the mailing lists. Getting rid of this problem will make 
the magnolia bundle easier to deploy and use.

I have installed the new magnolia 5.0 release with H2 DB, and was able to start 
without errors - everything seems to be working as expected. My first 
impression is that the initial startup was faster than with Derby. I have 
attached my jackrabbit config file to this message, in case anyone wants to 
give it a try...

Of course I understand that there would have to be more extensive tests, but 
what do people think of this idea?

Regards from Vienna,

Richard




----------------------------------------------------------------
For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 2.0//EN" "http://jackrabbit.apache.org/dtd/repository-2.0.dtd";>
<Repository>
  <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
    <param name="path" value="${rep.home}/repository" />
  </FileSystem>
  <Security appName="magnolia">
    <SecurityManager class="org.apache.jackrabbit.core.DefaultSecurityManager"/>
    <AccessManager class="org.apache.jackrabbit.core.security.DefaultAccessManager">
    </AccessManager>
    <!-- login module defined here is used by the repo to authenticate every request. not by the webapp to authenticate user against the webapp context (this one has to be passed before thing here gets invoked -->
    <LoginModule class="info.magnolia.jaas.sp.jcr.JackrabbitAuthenticationModule">
    </LoginModule>
  </Security>
  <DataStore class="org.apache.jackrabbit.core.data.FileDataStore">
    <param name="path" value="${rep.home}/repository/datastore"/>
    <param name="minRecordLength" value="1024"/>
  </DataStore>
  <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default" />
  <Workspace name="default">
    <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
      <param name="path" value="${wsp.home}/default" />
    </FileSystem>
    <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.H2PersistenceManager">
      <param name="url" value="jdbc:h2:${wsp.home}/db" />
      <param name="schemaObjectPrefix" value="${wsp.name}_" />
    </PersistenceManager>
    <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
      <param name="path" value="${wsp.home}/index" />
      <param name="useCompoundFile" value="true" />
      <param name="minMergeDocs" value="100" />
      <param name="volatileIdleTime" value="3" />
      <param name="maxMergeDocs" value="100000" />
      <param name="mergeFactor" value="10" />
      <param name="maxFieldLength" value="10000" />
      <param name="bufferSize" value="10" />
      <param name="cacheSize" value="1000" />
      <param name="forceConsistencyCheck" value="false" />
      <param name="autoRepair" value="true" />
      <param name="queryClass" value="org.apache.jackrabbit.core.query.QueryImpl" />
      <param name="resultFetchSize" value="100" />
      <param name="extractorPoolSize" value="3" />
      <param name="extractorTimeout" value="100" />
      <param name="extractorBackLogSize" value="100" />
    </SearchIndex>
    <WorkspaceSecurity>
      <AccessControlProvider class="info.magnolia.cms.core.MagnoliaAccessProvider" />
    </WorkspaceSecurity>
  </Workspace>
  <Versioning rootPath="${rep.home}/version">
    <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
      <param name="path" value="${rep.home}/workspaces/version" />
    </FileSystem>
    <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.H2PersistenceManager">
      <param name="url" value="jdbc:h2:${rep.home}/version/db" />
      <param name="schemaObjectPrefix" value="version_" />
    </PersistenceManager>
  </Versioning>
</Repository>

Reply via email to