jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Thrasher <ja...@coachthrasher.com>
Subject Re: hybrid Hibernate(JDBC)/OCM Objects
Date Fri, 17 Jul 2009 17:03:11 GMT

Christophe,
Thanks for your response.  You read my mind: my use-case falls into your #3
description: a hybrid financial/content app.

There's really no clear way to pull the financial tables into a JCR scheme,
and it makes sense to leave them in the relational system allowing for
common financial data practices.  On the other hand, the content has two
flavors: 1) gigabyte-size binary content files, and 2) string-based content
data that changes frequently, while both must be versioned.  My use-case
requires some bridge between those tables and content.

I like your idea of a secondary, content-only app, as it makes a lot of
sense.  I am boiling it down to an content-interface that allows access to
the content data from the primary app.  The secondary app just implements
the interface, and the primary app doesn't need to know how it's stored.

However, I'm a lazy engineer, and Hibernate has spoiled me.  I like being
able to walk the whole object graph from the financial side, into the
content side, and back, without thinking [much] about the storage on the
backend.  LazyInitializers and proxies in Hibernate allow for that.  I don't
want the business logic aspects of the system to know how the data is
stored, which has motivated my exploration of low-level Hibernate code
accessing Jackrabbit.

Thanks for pointing out Sling, I'll check it out.

regards,
Jason


Just my point of view :
1/ If your are using Jackrabbit/OCM for just storing Blobs and use Hibernate
for your object mapping, you will add more complexicity in the code for
almost nothing. If it is mandatory to keep a RDBMS, use Hibernate (with blob
support).

2/ If your application is an heavy content application, replace Hibernate by
Jackrabbit and if needed use OCM.

3/ For "mutant RDBMS/JCR" applications (eg. a financial application which
needs one or more content modules), it is more complex. Try to make a clean
distinction between both database and if possible use 2 different
applications :
1. the first application will use the RDBMS (eg. the core financial
application in my example).
2. The second one is a content repository based on JCR. Of course, in a such
situation you have to find the best API to make requests from the first
application to the second one. Personally, I think that Sling [1] becomes a
great help because others applications can access easily to the content
repository through HTTP requests.

Later, you will see that your users (or customer) will find other
applications that can use the second application (the content repository).

[1] http://sling.apache.org/site/index.html

HTH
Christophe

2009/7/17 Jason Thrasher <jason@coachthrasher.com>

-- 
View this message in context: http://www.nabble.com/hybrid-Hibernate%28JDBC%29-OCM-Objects-tp24526110p24538182.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message