Re:How our users exploited concurrency and how we fixed it
by EvilTrout on Friday January 11, 2013 @12:54PM
(#5043922)
In the example code I gave, by default in Rails with Postgres (which supports MVCC) you'll still get the error. So it's not as simple as using a transactional database: you either use a trick like this one, an row-based version column, or you need to change your isolation levels which has other performance issues.
[ Parent
| on HN ]
Re:How our users exploited concurrency and how we fixed it
by delano on Friday January 11, 2013 @12:57PM
(#5043949)
You could wrap the transaction in a lock based on the player ID which you could do with Redis or Memcached with near-zero impact on performance.
A good reference: http://www.nateware.com/an-atomic-rant.html