[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 Jul 3 09:27:40 EDT 2007


Listeners may not be necessary - the WorkspaceNodeImpl could do something like:

1)  Load child nodes lazily.  I.e., when the base node is loaded into the workspace, don't load child map.

2)  Changes made to child node map maintained as a delta in the workspace (e.g., adds, modifications, removes) with lazy loading of children.

3)  trying to get a child node will cache a null in the workspace if the child node doesn't exist - to maintain repeatable_read

4)  Merge back changes on commit time.

The drawback here is that it allows for s slight difference in semantics from pessimistic locking, due to the lazy locking (copying into workspace) of children ... 

Is this approach workable?

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

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



More information about the jboss-dev-forums mailing list