Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 25959 invoked from network); 2 Oct 2006 12:36:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 Oct 2006 12:36:49 -0000 Received: (qmail 58437 invoked by uid 500); 2 Oct 2006 12:36:49 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 58416 invoked by uid 500); 2 Oct 2006 12:36:48 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 58384 invoked by uid 99); 2 Oct 2006 12:36:48 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Oct 2006 05:36:48 -0700 Authentication-Results: idunn.apache.osuosl.org header.from=michael.neale@gmail.com; domainkeys=good X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 Received: from [66.249.82.239] ([66.249.82.239:28205] helo=wx-out-0506.google.com) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id 3D/C8-16499-2D701254 for ; Mon, 02 Oct 2006 05:36:37 -0700 Received: by wx-out-0506.google.com with SMTP id t13so1766137wxc for ; Mon, 02 Oct 2006 05:36:20 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=Bw2+/HsPHo4rbG9kXCNNn0jE5/KqqyGrkXpzo1oMY/pq5e9uqt8fRLQqk6g7mXyPtePubbywGPmLOQ9/r1nSrqokti+IxWO3YTgK9GVf/qROU0geDHm5dplpTLMN8tM3PufPDTeKk2ozq2TfEF/GcX2jfdDEU62RoHRhWViSINg= Received: by 10.90.83.14 with SMTP id g14mr2583356agb; Mon, 02 Oct 2006 05:36:20 -0700 (PDT) Received: by 10.90.51.20 with HTTP; Mon, 2 Oct 2006 05:36:20 -0700 (PDT) Message-ID: <96ab3ced0610020536m3738d0c1jc3bfd06c70f75472@mail.gmail.com> Date: Mon, 2 Oct 2006 13:36:20 +0100 From: "Michael Neale" To: users@jackrabbit.apache.org Subject: Re: Comparing an RDBMS to JCR In-Reply-To: <6594059.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_78706_17158795.1159792580137" References: <6593713.post@talk.nabble.com> <3a9670a0610011609v7b1a376eg90fe93057ab862db@mail.gmail.com> <6594059.post@talk.nabble.com> X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_78706_17158795.1159792580137 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Well you have to ask if you want to use a CMS API, (or even a CMS) versus roll-your-own using a DB directly. A CMS and JCR provide a lot of value which you may not appreciate until you try to replicate some of the features in a DBMS based system. I am only new to JCR myself, but mostly I am finding that the "quirks" that are there make me use it in a way that is optimal for managing *content* - ie people who know more about content then me. I like that "opinionated" approach, as I don't know enough about CMS to build an API myself, so am happy to be shown the way by JCR. On 10/2/06, behrangsa wrote: > > > Doug, > > Thanks for the reply. Does it imply that using JCR has a __serious__ > performance penalty compared to direct access to the database via JDBC, > and > even using ORM tools such as EJB3? > > BTW - There's a good comparison of JCR to File Systems and DBs available > at > > http://www.day.com/site/en/index/products/content-centric_infrastructure/content_repository/crx_faq.html > > But I am still confused as to when one should consider using JCR* as a > fundamental component of an enterprise project? For what kind of projects > does it make sense to use JCR? Once we consider using JCR, should we > store/retrieve everything via JCR? Or only a portion of the project should > be so? > > *JCR or any other CMS (?) API > > Regards, > Behi > > > Doug Douglass-2 wrote: > > > > Behi, > > > > I think the only thing you're missing is locking. Many (most) RDBMS have > > some level of built-in/implicit locking of the table or, better yet the > > row, > > for write operations. This is not true of JCR, you must explicitly > > lock/unlock your nodes to prevent concurrent update attempts. > > > > HTH, > > Doug > > > > On 10/1/06, behrangsa wrote: > >> > >> > >> Hi, > >> > >> The concurrent update capability of JCR is a little bit confusing to > me. > >> > >> In an RDBMS, when I execute the following code sinppet simultaneously > by > >> a > >> few threads, no problem rises: > >> > >> tx.being(); > >> executeUpdate("insert into positions(id, name, parentId) values (?, > ?, > >> 1)"); > >> tx.commit(); > >> > >> In JCR, the equivalent to this seems to be: > >> > >> tx.begin(); > >> Node positions = session.getRootNode().getNode("positions"); > >> Node pos = positions.addNode("position"); > >> pos.setProperty("name", "some name"); > >> tx.commit(); > >> > >> But apparantly this throws an InvalidItemStateException (am I right?) > >> when > >> multiple sessions concurrently execute this snippet of code. If this is > >> true, then how can one handle the aforementioned SQL operation in JCR? > >> > >> Regards, > >> Behi (via Nabble :-) > >> -- > >> View this message in context: > >> http://www.nabble.com/Comparing-an-RDBMS-to-JCR-tf2366850.html#a6593713 > >> Sent from the Jackrabbit - Users mailing list archive at Nabble.com. > >> > >> > > > > > > -- > View this message in context: > http://www.nabble.com/Comparing-an-RDBMS-to-JCR-tf2366850.html#a6594059 > Sent from the Jackrabbit - Users mailing list archive at Nabble.com. > > ------=_Part_78706_17158795.1159792580137--