MMO - Best non-sql DB to store data
What do you think 开发者_如何学Pythonwould be the best non-sql database for storing info of players in a real-time MMO game that runs on a C++ server?
Man, take your pick :)
Currently, I'm using MongoDB for info about users. MongoDB is very fast, and will perform especially well if you have enough memory to store everything (at which point it's like MemcacheD with a file backing). However, MongoDB does make some concessions on "durability" to attain its speed.
If you're operating an MMO, the stuff you'll really want to look at is sharding and replica pairs. These two technologies will allow you to scale out the DB horizontally while still providing an "hot backup" for when a node fails. Replica Pairs will help you to get around the typical durability concessions by allow you to force important updates to replicate.
However, the numbers I've read on TokyoCabinet are also very impressive.
Of course, the TokyoCabinet docs have been painful. So it's really your call.
If you think you "model" very well, I would recommend Redis. You have to think your model very well because redis as well as tokio cabinet, kyoto, hamsterdb, bdb are all key value stores, that normally don't have a way to make queries. If you need queries, probably you should test mongodb or couchdb.
Redis it's very fast, all in memory but with support for saving to disk, it's very well documented and it's implemented in c++.
Do a search in slideshare and you will see a lot of big names using redis
tokyo cabinet, hamsterdb, berkeleydb
my best bet would be tokyo cabinet, you should be aware that most k/v DBs doesn't came with update feature which is crucial for mmo server.
精彩评论