mmo


What kind of database in regards to cap theorem should be used for an mmo?


Let's say an mmo was being created with the features of being first person view, having one world everyone plays in (like eve online), and being a sandbox game. What database would best suit it's needs in terms of cap theorem? CA, AP, CP and why?
All of the tenants of CAP theory must be worked around in MMOs. The DB is not going to do all the heavy lifting - the server application is just as important, if not more so.
Video games need faster response times than a DB is going to be capable of providing. That isn't to say that IT infrastructure and architectural work isn't in place at all levels to squeeze out bottlenecks wherever possible, but the DB is not the only piece responsible for a smooth MMO experience.
Most work in the MMO server process is likely committed to memory first, and only spooled out to the DB afterwards. You don't need your DB to have even a 200ms response time if you're just going to cache everything you need quick access for at application startup. If you don't do this caching, then you aren't going to get 200ms response times to the client, no matter how fast or aggressive your DB is. Memory with correct data structures is just faster.
With all that caching, most of the CAP guarantees become less meaningful and less important.
From the wiki article on CAP theorem:
...CAP is often taken to preclude consistency for services running in the highly elastic first-tier of a modern cloud computing system. These services are typically required to be stateless or to maintain only soft-state (cached data), and must be responsive even if inner-tier services are temporarily inaccessible...
This does not match the requirements of MMOs. MMO server processes are not stateless, and don't simply contain soft-state (cached data). They will aggressively pre-cache tons of world data in order to make up for the DB's lack of ability to provide guarantees of nearly instantaneous response time.
Examples of how MMOs will work around each of these (basically, caching):
Consistency - You can easily work around this with data locality. Most things in the MMO world won't have effects on anything else. You don't need to know what someone half the galaxy away is doing, let alone the mobs they're encountering, or what they're looting. So you don't need the DB to provide it. The data can thus be partitioned in a way that consistency between multiple DBs doesn't matter. Anything you need to remain consistent (not much - mostly your character/inventory/mail/bank/auction house) could stay resident in memory, so will have high consistency, or could stand to suffer on one of the other two CAP axes.
Availability - You can easily work around this with aggressive and algorithm-invasive caching. Some data is important, in which case you cache it. Other data isn't as important, in which case you don't always need it to be available (e.g. the things I mentioned under Consistency, which could stand to suffer availability lapses).
Partition Tolerance - You can easily work around losing access to portions of data by caching. Memory is always available, and you'd jam it full of anything important. Anything not important to always have access to could suffer a loss of access with a lower pain threshold for players (e.g. the things mentioned under Consistency).
So out of these, Consistency is the most valuable, as availability and partition tolerency will already be worked around with super-aggressive and algorithm-invasive caching. And even then, Consistency is only important for some pieces of data.

Related Links

Myth of Soma MMO game Bot - Memory Address for Items on floor contains garbage and constantly changing info
How to make a MMO (server side)?
how to implement a relative timer in a game
What kind of database in regards to cap theorem should be used for an mmo?

Categories

HOME
qlikview
gcc
virtual-machine
network-programming
mysqli
ebay-api
gaussian
magento-1.9.2.1
watson-iot
hiveql
mingw
aggregate-functions
opacity
liquidsoap
pyodbc
subprocess
oms
core-data
aws-sdk-cpp
adroitlogic
drush
browsermob
eclipse-orion
popup
jsfiddle
template10
md2
orange
project-structure
descriptor
ajaxcontroltoolkit
typedef
v4l2
ps
dynamic-memory-allocation
delphi-2010
vtd-xml
foxpro
directions
storefront
node-soap
incapsula
geocomplete
certbot
rythm
area
julia-jump
office-interop
rbac
google-chrome-console
glide-image-library
bzip2
test-kitchen
colorbox
qt-quick
python-venv
risc
ack
spring-webflow-2
spring-data-commons
react.rb
ng-class
riemann
pyautogui
qt3d
visual-web-developer
netlink
nimbus
stdlist
ideavim
alchemy
std
markerspiderfier
google-app-engine-php
imageicon
magnet-uri
angular-promise
taverna
notice
jain-sip
textblob
avrcp
pagecontrol
firewire
page-refresh
gcc-warning
firebase-tools
mri
xmla
caption
dojox.grid
jsonschema2pojo
conditional-comments
parsefloat
indic
oxygenxml
sigma-grid-control
slimscroll
raddatepicker
friendly-url
dd4t
google-checkout
cloudmade
tasklist
databus
jquery-ui-map
nude.js
datasheet
inserthtml
fileoutputstream
umfpack
parallel-python
recess
file-processing
functional-specifications
nscharacterset
nstoolbar
coderush-xpress
datadude
ihtmldocument2

Resources

Encrypt Message