jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <mreut...@adobe.com>
Subject RE: [jr3] Tree model
Date Mon, 05 Mar 2012 13:13:09 GMT
> On 5.3.12 12:36, Marcel Reutegger wrote:
> >>      /**
> >>       * Returns the number of child nodes of this node.
> >>       *
> >>       * @return number of child nodes
> >>       */
> >>      int getChildNodeCount();
> >
> > this doesn't work well when you have concurrent child node
> > operations. e.g. one session adds a child node while another
> > session removes the child nodes. IMO it would be better if
> That interface represents an immutable state. So the child node count
> will never change but rather reflect a snapshot in time.

ah, now I understand the confusion.

I was not talking about a problem to provide the value in the
context of the MK and MVCC with immutable state. that's
clearly not an issue. I was talking about the problem to 
maintain this value further down the layer(s).

the basic problem I see is when we'd like to support efficient,
concurrent and distributed child node operations (add/remove)
on large sets of child nodes, then the data structure that keeps
the number of child nodes will be an area of contention.


View raw message