So, we are developing a high concurrency web application that is a great multiplayer game.
Our server uses data from spring MVC, spring, MySQL and JPA.
Now we are discussing the methodology that we should use regarding concurrency.
One of the suggestions that came to my mind took me out of my comfort zone:
I'm used to using the good old-fashioned orme style:
@Transactional
@public void doSomeMagic() {
User user = userDao.findById(id);
user.setStuff(stuff);
...
}
now the sentence that appeared said the following:
since the above methodology is subject to concurrency errors (and probably mitigated by the locking mechanism), why not use SQL \ JPQL updates? why even bother user selection if our only goal is to update its fields?
- :
userDao.updatePlayer(stuffParameters); // "update Player p set stuffParameters...."
:
1) ORM?
2) ?
3) ? , ?
4) -, , /, ?
!