How do the major MMOs out there store login and other information?

Started by
14 comments, last by hplus0603 15 years, 7 months ago
How do other MMO companies out there store things like usernames and passwords? Do they store them in SQL databases or something of that sort? And what about things like information on skills, items, etc.? Is that all stored and constantly written to a central database or is it just saved in a text file on the server? Thanks.
Advertisement
I suggest a MMO server is viewed like any other big server application. In which case, a database is the standard solution. You CAN use files but databases are designed for exactly this purpose.
Some things (like authentication) don't change much between applications.

However, the amount of mutating state for an MMO, and the real-time requirements, are actually fairly special to MMO games. The other app that may be similar is the stock market, but they have different trade-offs (consistency is more important, latency is less important, somewhat oversimplified). And different budgets :-)

The "vanilla" MMO architecture is that the simulation servers "check out" the state from the database server when a player logs in, and they "checkpoint" the state after important events and once in a while, to reduce the amount of data lost if the server should crash. Additionally, user trades and other "important" events should be done as a transaction in the database, to avoid the possibility of "dup" or "trade" hacks/corruption.
enum Bool { True, False, FileNotFound };
Well MMO's such as WoW are using SQL right now, it seems to be a big deal lol

I on the other hand like text files whn im making my games, much easier, although SQL is much mor effcient!
Quote:
The other app that may be similar is the stock market, but they have different trade-offs (consistency is more important, latency is less important, somewhat oversimplified). And different budgets


Latency for trading is crucial. Especially with all the automatic electronic trading going on today. There are trading solutions that count the response time in microseconds. MMO's also have fairly small budgets with few reaching the 100 million USD mark. Remember that this is the financial backbone of the world we're talking about where 100 million or so is nothing.

Quote:
I on the other hand like text files whn im making my games, much easier, although SQL is much mor effcient!

A RDBMS is extremely inefficient to be honest. It's more about relational models than a simple blob storage engine. I doubt authentication will ever be a bottleneck though since even if it would be a full RDBMS you'd be running extremely simple queries and the database files would be very very likely to fit in RAM. The most expensive part would probably be to reach out to the database server, compile the SQL and execute the SQL. However you'd have transactional safety and other guarantees that can be very hard to get completely right on your own. I would definitely go with simply using an existing RDBMS and then switch it out with a custom solution after doing load testing and seeing that it wouldn't be able to keep up. My bet is that you'll be able to log in many thousands of people per second even on a desktop computer.
Quote:Original post by asp_My bet is that you'll be able to log in many thousands of people per second even on a desktop computer.


But being logged in isn't particularly interesting, no matter how fast they log in.

It's what they do that matters.
Text files don't scale. Any MMO that expects more than a few dozen players (and if you're not it's not really an MMO. It's more a mMO :P) needs to be using a database of some sort.
[size=2]Darwinbots - [size=2]Artificial life simulation
Quote:Text files don't scale.


Shh! Don't tell the web. It hasn't heard yet! It'd be a shame if it suddenly collapsed because of the lack of scalability of text files.
enum Bool { True, False, FileNotFound };
Quote:Original post by hplus0603
Quote:Text files don't scale.


Shh! Don't tell the web. It hasn't heard yet! It'd be a shame if it suddenly collapsed because of the lack of scalability of text files.


Heh, I can't tell if you're being sarcastic or facetious :)
[size=2]Darwinbots - [size=2]Artificial life simulation
Quote:I can't tell if you're being sarcastic or facetious


Man, I don't even know anymore!

(bonus points if you know the source of that quote in context)
enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement