<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 13, 2013 at 1:01 PM, Dmitry Kolesnikov <span dir="ltr"><<a href="mailto:dmkolesnikov@gmail.com" target="_blank">dmkolesnikov@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">* Use external DB layer but make asynchronous checkpoint of process statusĀ </blockquote></div><br>One way is to sync checkpoint at "big moments" in game. Say you've just slain Giant Behemoth Kraken Lurker In The Sky (GBKLITS). At this point, it makes sense to write your state back. After all, GBKLITS is hard to kill. In turn, you need a database with a very high write speed, since you will mostly be checkpointing data back to disk and very rarely read in state. In principle, you could just scan a disk_log file at startup, but this is unfeasible for searching.</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">Good stores for this kind of data are either column stores (Kdb, Vertica, Cassandra), "SSTable"-variants (LevelDB), or certain "NewSQL" stores (VoltDB comes to mind). Given enough cluster size and enough sharding the write speed of a VoltDB cluster approached a million writes a second, albeit for rather simple stores/updates. But this means you can keep up, even for very big MMO-worlds with this solution.</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">Mnesia could be used to hold certain in-memory state which has to be shared amongst users. But as a write-heavy store, I would avoid it[0]</div><div class="gmail_extra">

<br></div><div class="gmail_extra">[0] Incidentally, I am currently looking at a mnesia db taking some 7000 writes per second, but I AM NOT RECOMMENDING YOU DO THAT :P</div><div class="gmail_extra"><br></div></div>