jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@day.com>
Subject Re: Browse Jackrabbit repository using UUID
Date Wed, 13 Oct 2010 14:43:14 GMT
On Tue, Oct 12, 2010 at 17:31, kazim_ssuet@yahoo.com
<kazim_ssuet@yahoo.com> wrote:
> I want to use UUID and not path, because, I think somewhere in memory whole
> path needs to be created if you fetch documents by path and fetching by UUID
> is supposed to be faster.
> I also read somewhere that performance starts degrading when there are alot
> of child nodes under a parent. In my application documents will be added
> pretty rapidly through automated procedures. I assume too many child nodes
> will not have an effect while fetching by UUID.

No, I don't think so. Once a node has been fetched, operations are
executed the same way (eg. looking up child nodes, access control,
etc.), regardless how it was fetched.

To make imports fast, do this:
- larger batches of session.save()
- if you have more than a few thousand / 10k child nodes per node,
rethink your content structure and introduce additional layers (like
the date structure you mention)

> I know there are suggestions to use dates in path to overcome the problem of
> too many child nodes gathering under one parent, but it might not be
> possible in my case.

Why not? Also, dates are just one suggestion that often works, but you
can use any other element from your domain model. Like categories,
people names, site names, customer names, etc.

> About the "References considered harmful" link that you suggested... I am
> not referencing the mix:referencable node from anywhere, I am just making it
> mix:referencable to assign it a UUID and it is a node of type
> JcrConstants.NT_FILE which is child of a node type JcrConstants.NT_FOLDER,
> while folder node is not referencing file node, so no referencial intigrity
> involved I guess.

Ok, referential integrity comes into play when you use the REFERENCE
property type only. But still, paths are much better:

- backup and copy to a different repository, where the UUIDs are
different, makes the references useless
- compare looking at a reference of
"35ee780f-343e-418b-a6e2-f069acd45921" vs.
- you can search for references of a subtree: jcr:like(@pathprop,
- the path is already the primary key for each node


Alexander Klimetschek

View raw message