Tell me more ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

my question is about situation when there is action between players at game (like items exchange, players money/tokens billing change). I know this depends on many factors, but please look at one of solutions below.

Game state is persisted at sharded database cluster (so no one server transactions possible). When user interact with other (like buy something from second one) there is created transaction at transaction manager (disturbed transactions - when money comes to gaming then some ACID is "must have").

This is heavy solution but ensure synchronization of resources, also serialize operations. Scalablity depends on transaction manager, but each transacion is very expensive (also in request latency). If transaction manager will be another component (not integrated in engine) then on each request (even non transactional) comes another request to ensure resource synchronization (latency penalty again).

How does game engines resolve this kind of problems?

share|improve this question
In my experience the term "game engine" is usually limited to the client. It might be better to use the phrase "distributed game servers" or something. – Tetrad May 26 '12 at 15:05
1  
You sorely underestimate what databases are capable of. – Patrick Hughes May 26 '12 at 15:08
@PatrickHughes are you suggesting, that transaction manager approach is the right one for sharded/clustered database environment? No other patterns are avaliable to handle it different way? – inquisitor May 26 '12 at 17:52
I'm mostly suggesting that database configuration and performance is complex and a DBA is called for. I don't know how to transfer to different stacks so I'd suggest asking dba or overflow since this isn't really a "game" question at all. – Patrick Hughes May 26 '12 at 18:23
Transactions within games are usually very specific to the game itself. All you really need is a database and some kind of UI to show the trade between the players. – Nic Foster May 26 '12 at 18:45

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.