On 12 Nov 2009, at 08:38, danisevsky wrote:
Hallo, I am thinking about learning and using Jackrabbit instead of
(or
with) relational database (+ Hibernate) in my new web application. I
would
like to store some data to JCR (on filesystem) and some data to
database.
But question is for which kind of data si better JCR. My opinion is
that
data like photos, blogs, comments is better storage JCR and data
like users,
roles, classifiers is better database.
What do you think, is it right?
Yes, right :)
I/We have been following a similar route, put everything in JCR and
build relational indexes via JPA where necessary. (we use Eclipse Link
since it works on its own on OSGi, we also use Apache Sling since it
already does 90% of what we need from a webapp).
So we have event listeners in JCR that trigger the indexing of items
into relational tables via JPA. We can then query using JPA and
retrieve sorted ordered list of pointers to items in JCR. I say we
have this, but in fact we haven used it yet. Development has been
going 6 months, we have close to 80% of the code us cases for the back
end covered and all our query needs so far have been served by JCR
queries. I am going to leave the functionality in place since who
knows when someone might come up with a massive relational join that
cant be answered in JCR.
Looking back, I think the reason we haven't used it is we have taken
time over modeling the structure of the content in JCR so that access
is either direct, or there is sufficient metadata to allow JCR queries
to work. The one massive benefit in all of this has been the
assumption that we have no SQL schema and don't need to maintain all
the code base that that entails. Everything is much more direct.
HTH (all IMHO)
Ian
Thanks