[jboss-dev-forums] [Design of JBossCache] - Re: Optimistic locking doesn't scale well with large 'flat'

manik.surtani@jboss.com do-not-reply at jboss.com
Tue Oct 16 12:14:14 EDT 2007


bringing this up again.  I spent some time investigating this and the way it is currently implemented (in trunk) is as such:

* Child map copied to workspace node.
* Map of child deltas ALSO maintained.
** Child deltas used when children and added/removed
** Child map also updated
* When nodes are requested using get(), etc., the actual nodes are queried and copied to the workspace.  child map not used for this
* When merging back changes at commit time, the child deltas are used.
** child map not used, for performance reasons.

So looking at the above, the actual child map only really is needed in 2 places:

1.  getChildrenNames()
2.  move()

And I think for both of the above this can be loaded lazily, effectively giving us the scalability we need (except in the cases where the above 2 API calls are made).

What do you think?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4095714#4095714

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4095714



More information about the jboss-dev-forums mailing list