Advertisement

question about items

Started by June 25, 2014 07:05 PM
0 comments, last by frob 10 years, 7 months ago

Hello,

got a question about items.

Should I run query every 3-5 minutes which safe all user data with items. Or should I save items inside database right after user picked up an item or traded items with other player?

^ question about MMORPG

If it is truly an MMO, your architecture's demands of world hierarchy an caching define the answer.

MMO has a meaning. The term was created to refer to online persistent worlds that had crossed the 100,000 concurrent users boundary. If you are asking in For Beginners, you are not working on an MMO.

The key to your question is the number of concurrent users you will have.

For an online persistent world, look at the technology you are using. In big systems the stuff that is being actively used is not directly connected to a traditional database. (I mean a traditional database to be an SQL-driven transaction based relational database system, or RDBMS.) While an RDBMS is good for looking up certain account information, it is extremely slow for the rapid processing required for complex world management. Large game systems do not keep active data inside an RDBMS because they simply cannot keep up. Data is loaded, used in memory for all kinds of uses, and periodically portions of the data -- enough to restore from save -- is recorded.

If your system is very small supporting a small number of users, perhaps a double-digit number of concurrent users, then a regular RDBMS can keep up. If you get into triple digits of concurrent users then you will be approaching the limits of an RDBMS, most of them max out around 10,000 transactions per second per server under good conditions. For that size of world, keeping all of that information immediately synchronized with the database is a design decision to make.

Once you exceed roughly 500 concurrent users you will exceed the transaction limits of a simple RDBMS and you'll need to rethink your architecture so it scales up.

This topic is closed to new replies.

Advertisement