Advertisement

Distributed transaction & message queue

Started by November 26, 2014 10:08 AM
11 comments, last by hplus0603 9 years, 11 months ago

You are forgetting that ACID databases do not lock reads while you have a transaction open.

Locking the data from read access while you are writing to it in a transaction is not the default action of ACID databases. You have to manually lock it.


This is not a true statement.

The DEFAULT behavior of MySQL might be "REPEATABLE READ" transaction isolation level, which has some of the behavior you're suggesting. However, this does *not* count as ACID, because it's missing the "I" value.
In MySQL, you should make sure to run all transactions in "SERIALIZABLE" transaction isolation level, which does fully implement ACID and behaves properly with regard to read-after-read hazards (and all other hazards described here.)
More documentation on MySQL transaction isolation levels: http://dev.mysql.com/doc/refman/5.0/en/server-options.html#option_mysqld_transaction-isolation

Other databases (Postgres, Oracle, DB/2, SQL Server, etc) mostly have similar trade-offs available, although some of them may default to different levels.

Note that, at the DBA level, there are many other things that could turn your "durable" transaction non-durable. Hard disks with caches that don't survive power loss (this may include SSDs) and disk chipset drivers that play fast and loose with out-of-order command queueing come to mind for example.
Running a real, online, system of any kind (game or not) requires a separate set of knowledge, skill, and actions that are totally different from developing a game or application. Arming developers (and operators) with understanding of both sides of this equation is what the DevOps movement is about.
enum Bool { True, False, FileNotFound };


This is not a true statement.

The DEFAULT behavior of MySQL might be "REPEATABLE READ" transaction isolation level, which has some of the behavior you're suggesting. However, this does *not* count as ACID, because it's missing the "I" value.

But you see my frustration with the popular opinion that a developer can be completely ignorant of whats going on inside of the magical RDBMS software because it magically handles everything.

Considering EVERY triple-A online game has struggled with duping exploits you'd think more attention would be paid to this issue.

Advertisement

Considering EVERY triple-A online game has struggled with duping exploits you'd think more attention would be paid to this issue.


Traditional game development studios have previously had a culture that rewards and attracts different skills.

Once FarmVille made its billion, however, I think we're seeing that starting to shift. Like all cultural shifts, this will take time.
enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement