4 ms·
Cool, I've been waiting for something like this to sprout out. I've been working on something similar, haven't yet looked at the code, but I wonder how well it
by revoltingx 17y ago
Cool, I've been waiting for something like this to sprout out. I've been working on something similar, haven't yet looked at the code, but I wonder how well it scales as far as number of users, since Mnesia supposedly doesn't support very large tables.
For this reason I chose to use PostgreSQL for things like areas, characters, items, etc. Because it's easier to shard and has a stable track record. However, for soft-realtime data (like area co-ordinates, velocity, etc.) in-memory Mnesia/ETS is the way to go.
- troystribling 17y agoMenasia tables are limited to 4GB on a 32bit OS but can get to 16 exabytes on a 64bit OS, p 294 Programming Erlang, http://books.google.com/books?id=Qr_WuvfTSpEC&pg=PT1&dq=erlang+programming+oreilly&ei=fIUdS6zjC6K4yQS8prTCAw#v=onepage&q=erlang%20programming%20oreilly&f=false http://books.google.com/books?id=Qr_WuvfTSpEC&pg=PT1&...
- troystribling 17y agodisc-only copies are actually limited to 2GB, so available RAM will place a limit on DB size. From Programming Erlang, For massive numbers of entries that you want to be able to access readily, you might be better off using CouchDB, MySQL, PostgreSQL, or Berkeley DB, all of which have open source Erlang drivers and APIs available. The upper limit of a Dets table is 2 GB. This means the upper limit of a Mnesia table is 2 GB if the storage type is disc-only copies. For other storage types the upper limit depends on the system architecture. In 32-bit systems the upper limit is 4 GB (4 * 109 bytes), and in 64-bit systems it is 16 exabytes (16 * 1018 bytes).
- flodihn 17y agoI use Mnesia mostly to store temporary distributed data. If you want to store persistent data with another database you can just replace the implementation module for libsave with your own. libsave is my library for storing objects to disk. So far I don't know how many users my servers scales to, with some rough test I can have about 2000 players in the same spot, I recently added a quad tree and with that in place I hope that will increase a lot if players are spread out in the area.