I've created a JIRA for explicit distributed locking with some
preliminary notes.
https://jira.jboss.org/jira/browse/ISPN-48
Cheers
Manik
On 7 Apr 2009, at 15:51, Jason T. Greene wrote:
Mircea Markus wrote:
> Hi,
> As we do support serializable isolation level in horizon, a an
> approach for supporting certain amount of concurrency is by using
> an optimistic concurrency control strategy (this is the way Oracle
> implements it).
> This way we still allow a degree of concurrency, also maintaining
> the 'serializable' semantics.
It's funny that you mention that, as Oracle is known for getting
Serializable wrong. If someone is using Serializable, they can't
design a concurrent app, and they dont care about performance.
Instead, if people need explicit serialization semantics, they
should be using write-locks on a read. You can do this today by
writing to a bogus attribute. However, a lock() method which
supports eager and lazy (eager = aquire lock on the cluster now,
lazy = aquire it as part of repl like today) locking would be more
efficient and intuitive.
Example:
cache.lock(total-cash);
sum = // calculate new total
cache.put(total-cash, sum);
--
Jason T. Greene
JBoss, a division of Red Hat
_______________________________________________
horizon-dev mailing list
horizon-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/horizon-dev
--
Manik Surtani
manik(a)jboss.org
Lead, JBoss Cache
http://www.jbosscache.org