I want to scale my
java application by spreading it across a cluster. All nodes will share a common DB.
How can I ensure DB consistency? Is there a way to implement it without using any third party library?
I am trying to solve putIfAbsent kind of scenario. If one node is in middle of read-then-update a table row then all other nodes should stay away until first node is done.
What is the best and most simple way to implement this?
Cheers,
Ravi