On Fri, Feb 26, 2010 at 19:18, Premkumar Stephen <[email protected]> wrote: > Can there be a persistence manager that generally does not need to be > optimized but could persist just the tree structure as shown on the API > side?
This is difficult because of: - you need to find a way to map properties to the file system (needs special "hidden" files or resource forks) - current persistence interface is a simple key-value store, with the key being the UUID of the node and the value all data of a node (properties, child node pointers, parent pointer, metadata); the PM does not know about the JCR level hierarchy - ensuring consistency/transactionality is difficult w/o a log, index and thus often a custom file format (*) (*) the XmlPersistenceManager is probably the simplest, storing nodes as XML files, but not based on the original hierachy, but splitting up the UUID to generate the file system structure. And it's not safe whatsoever, hence not recommended at all. Note that Jackrabbit is much more than just a document (file-oriented) storage and allows for much finer granularity (good for eg. CMS) with many small properties. A normal file system is not very much suited for that. Regards, Alex -- Alexander Klimetschek [email protected]
