Return-Path: Delivered-To: apmail-incubator-jackrabbit-commits-archive@www.apache.org Received: (qmail 75680 invoked from network); 9 Jun 2005 03:34:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Jun 2005 03:34:39 -0000 Received: (qmail 74715 invoked by uid 500); 9 Jun 2005 03:34:36 -0000 Mailing-List: contact jackrabbit-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jackrabbit-dev@incubator.apache.org Delivered-To: mailing list jackrabbit-commits@incubator.apache.org Received: (qmail 74652 invoked by uid 99); 9 Jun 2005 03:34:35 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from ajax-1.apache.org (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 08 Jun 2005 20:34:30 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id E262D12 for ; Thu, 9 Jun 2005 05:34:14 +0200 (CEST) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Apache Wiki To: jackrabbit-commits@incubator.apache.org Date: Thu, 09 Jun 2005 03:34:14 -0000 Message-ID: <20050609033414.22009.18679@ajax.apache.org> Subject: [Jackrabbit Wiki] Update of "PersistenceManagerFAQ" by edgarpoce X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Dear Wiki user, You have subscribed to a wiki page or wiki category on "Jackrabbit Wiki" for change notification. The following page has been changed by edgarpoce: http://wiki.apache.org/jackrabbit/PersistenceManagerFAQ New page: = PersistenceManager(PM) FAQ = The responses were mainly gathered from the jackrabbit mailing list. === What's a PM? === The PM is an *internal* Jackrabbit component that handle the persistent storage of content nodes and properties. Each workspace of a Jackrabbit content repository uses a separate persistence manager to store the content in that workspace. Also the Jackrabbit version handler uses a separate persistence manager. The PM sits at the very bottom layer in jackrabbits system architecture. Reliability, integrity and performance of the PM are *crucial* to the overall stability & performance of the repository. If e.g. the data that a PM is based upon is allowed to change through external means the integrity of the repository would be at risk (think of referential integrity / node references e.g.). === What's the PM responsibility? === The PM interface was never intended as being a general SPI that you could implement in order to integrate external datasources with proprietary formats (e.g. a customers database). the reason why we abstracted the PM interface was to leave room for future performance optimizations that would not affect the rest of the implementation (e.g. by storing the raw data in a b-tree based database instead of individual file). === How smart should be a PM? === A PM should not be 'intelligent', it should not 'interpret' the data. The only thing it should care about is to efficiently, consistently and reliably store and read the data encapsulated in the passed nodeState & propertyState objects. Though it might be feasible to write a custom persistence manager to represent existing legacy data in a level-1 (read-only) repository, I don't think the same is possible for a level-2 repository and i certainly would not recommend it. === What about ORM-backed PMs? === Persistence managers that store the item states in a complex schema are not the right way to go. Keep it simple, e.g. the objectPersistenceManager stores the item states as a raw stream of bytes. === What combination of FS and PM is the best choice? === It depends on your priorities. If you want to store your data in an accessible format (just in case ;), you might want to try XML PM + localFileSystem. If you use windows and performance is a must, you might want to try objectPersistenceManager + cqfs. === Which are the current options? What are the status, pros and cons of each implementation? === === objectPersistenceManager === * Status: mature * Simple * Not human readable * An inconsistency is hard to fix without a tool * easy to configure * Write operations are synchronized * if the jvm process is killed the repository might turn inconsistent * non transactional === xml persistenceManager === * Status: mature * not so simple but human readable * easy to configure * Write operations are synchronized * if the jvm process is killed the repository might turn inconsistent * non transactional === ORM persistenceManagers === * Status: work in progress * Unnecessary complexity * transactional * rdbms referencial integrity (possible, but not implemented yet) * not so easy to configure. * Multithreaded friendly. Write operations don't need to be synchronized. === localFileSystem: === * Status: mature * Slow on window boxes === CQFS file system === * Status: mature * Mysterious configuration options ;) * Mysterious proprietary binary format ;) * fast on windows * license issue, it's proprietary