jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Guggisberg" <stefan.guggisb...@day.com>
Subject Re: Database backed repositories
Date Thu, 24 Apr 2008 15:15:46 GMT
On Thu, Apr 24, 2008 at 4:32 PM, Jared Graber <jared.graber@iaccap.com> wrote:
> Stefan,
>
>  If I only have 1 workspace (no dynamic creation of new ones) and I
>  register the node types and namespaces on startup of my application are
>  the local workspace files recreated if they are missing or do I lose
>  everything?
>
>  Let's say I use a DB persistence manager but a local file system.
>
>  2 scenarios:
>  1.  I create a new application that will access the repository and put
>  it on a brand new server.  The application registers the namespaces and
>  node types on startup.  Do I need to copy files from another server to
>  access the data in the repository or will everything work smoothly?

not sure whether i understand you correctly here. do you mean you start
with an empty repository? where would you copy the files from?

registered namespaces and node types will always be persisted on the
(repository) server.

>  2.  My hard drive crashes so I lose the files for the local file system
>  but the database is unharmed.  I start from scratch, deploy an
>  application that needs to access the repo, and as before the application
>  registers the namespaces and node types.  Will it work smoothly or do I
>  need to go to my backups to get the lost files?

the problem is that namespaces and node types are referenced from the
data in the db. there could be a problem that during the bootstrap process
data from the db is read before you get to register the namespaces and
node types. that's just a guess.

furthermore, the 'bundle' db PMs store name/ns hashes in the file system.
those hashes/indices are referenced from within the serialized node/property
data. AFAIK those can't get automatically recreated.

therefore, you'd probably need to get the backups of the lost files.

cheers
stefan

>
>  Thanks,
>
>  Jared
>
>
>
>
>
>  -----Original Message-----
>  From: stefan.guggisberg@gmail.com [mailto:stefan.guggisberg@gmail.com]
>  On Behalf Of Stefan Guggisberg
>  Sent: Thursday, April 24, 2008 6:26 AM
>  To: users@jackrabbit.apache.org
>  Subject: Re: Database backed repositories
>
>  hi jared
>
>  On Wed, Apr 23, 2008 at 6:14 PM, Jared Graber <jared.graber@iaccap.com>
>  wrote:
>  > I'm trying to find some best practices for repository configuration:
>  >
>  >
>  >
>  >  I need my data (nodes, properties, ,etc) to be stored in a DB so
>  >  obviously I would use a database persistence manager.
>  >
>  >  Does it matter if I use a local file system or db file system?  What
>  >  gets stored in the "filesystem"?
>
>  repository content (i.e. nodes & properties) are persisted through the
>  PersistenceManager abstraction.
>
>  repository 'meta data' and configurations (e.g. registered namespaces,
>  custom node type definitions,  locks, workspace configurations)
>  are persisted through the FileSystem abstraction.
>
>  the only notable exception is the lucene index which is always persisted
>  in the local file system (for performance reasons and since it's
>  recoverable).
>
>  WRT to using DbFileSystem:
>
>  pro: if you configure jackrabbit to store everything in a single db you
>  can
>  backup an entire repository easily.
>
>  con: since config files etc are stored in the db it's not that easy
>  anymore to
>  manipulate/edit them (should you ever need to do so ;)
>
>  hope this helps
>  stefan
>
>  >
>  >
>  >
>  >  What are the pros and cons of the different approaches?
>  >
>  >
>  >
>  >  The wiki says:
>  >
>  >  If you want to store your data in a RDBMS, use
>  >  BundleDbPersistenceManager
>  >  <http://wiki.apache.org/jackrabbit/BundleDbPersistenceManager>  +
>  either
>  >  LocalFileSystem or DbFileSystem.
>  >
>  >
>  >
>  >  But doesn't mention when to use LocalFileSystem vs DbFileSystem.
>  >
>  >
>

Mime
View raw message