jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@day.com>
Subject Re: DM Rule #4: Beware of Same Name Siblings.
Date Tue, 09 Feb 2010 11:00:17 GMT
On Tue, Feb 9, 2010 at 09:41, Thomas Müller <thomas.mueller@day.com> wrote:
>> I'm still not convinced that SNS are bad.
>> If they are inefficient, that is an implementation issue that should be
>> addressed in the proper place.
> That's complicated. SNS means a node name index could change (because
> a sibling was added or removed). If you have many SNS then removing
> the first one will change the index of all others. This is like
> removing the first element of a large array.

To further underline that: the problem is that the path to a node,
that you might store as a reference somewhere else, could change
"silently" without that node being touched at all. Just because a
sibling was added or removed.

For example: /documents/current/image[2] could become
/documents/current/image[3] if some other image was added as sibling
before. This effectively disables the use of paths as simple and exact
identifiers for that node and you are either required to use UUIDs
(has drawbacks itself, see rule #5 and #7) or some other custom
mechanism (even more worse).

So this is a conceptual problem of SNS in JCR, independent of any
implementation, and is what makes them generally "bad".


Alexander Klimetschek

View raw message