Locks
Hello everyone!
Does Kundera supports Jpa locking? ( http://en.wikibooks.org/wiki/Java_Persistence/Locking#JPA_2.0_Locking )
Thanks!
Nope. Do you any thoughts to share how actually such locking mechanism should work over nosql databases?
-Vivek
http://wiki.apache.org/cassandra/Locking
Yep.
It's bit old thread. Does Cassandra support this?
-Vivek
Hard to say.
But AFAIK Hector support this: https://github.com/hector-client/hector/blob/master/core/src/test/java/me/prettyprint/cassandra/locking/HLockManagerImplTest.java
AFAIK, Cassandra doesn't.
Such custom implementation at client level may be possible, AFN Kundera doesn't support this.
-Vivek
Hi
There are no locking in Cassandra, but if you want to implement it please take a look at the Cages library - https://code.google.com/p/cages/ Note, that it requires ZooKeeper
Regards, Oleksandr
Locking in a variable-consistency and multiple-client (each with a possible lock) doesn't seem a sane idea.
actually that Cassandra now supports optimistic locking through lightweight-transactions - this could be implemented in Kundera. without such locking - how do you suggest to avoid persisting a stale entity?
Optimistic locking is one of the many advantages of lightweight transactions. IMHO handling it at higher level (modeling the databases accordingly) would be more appropriate than implementing it in a NoSql datastore mapper like Kundera.
This can be achieved using native querying on Cassandra through Kundera. Please let us know how important it is, your usecase and if we can discuss the best way to achieve it?
We can connect on Gitter
-Karthik