[erlang-questions] Desing of MVC models

Jesper Louis Andersen jesper.louis.andersen@REDACTED
Fri Sep 13 13:37:20 CEST 2013

On Fri, Sep 13, 2013 at 1:01 PM, Dmitry Kolesnikov

> * Use external DB layer but make asynchronous checkpoint of process status

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.

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.

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]

[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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130913/f858609c/attachment.htm>

More information about the erlang-questions mailing list