[erlang-questions] Mnesia vs. ets+dets
Charles Hixson
charleshixsn@REDACTED
Sun Nov 9 21:00:49 CET 2014
I'm going to be running on a single node, at least for the foreseeable
future, if that matters.
I expect the data to grow to be too large to fit into RAM, OTOH, only a
small subset will be needed at any one time. Also I expect active items
to have frequent updates, but most items to rarely be updated (only when
a purge is contemplated). There doesn't seem to be any way to control
the frequency with which Mnesia synchronizes to disk...but I also don't
see any information about how often it does so. Once every few minutes
wouldn't be a problem, but on every change would be prohibitive. On the
plus side, Mnesia will automatically handle splitting the data between
tables (when the data grows too large to fit into one dets file).
One way of handling the problem is to operate out of an ets database
which pulls in data as needed from various dets files and occasionally
synchronizes with them. This starts looking complex, and Mnesia is
clearly intended to solve problems *like* this. I just can't determine
that it will handle *this* problem. If I could set the rate of
synchronization between RAM and disk, it would be the clear best
approach...but I haven't even found any documentation on that.
OTOH, I'm quite new to Erlang (I've just written one successful
program) so I could easily be missing something that's extremely obvious
to someone more experienced.
Any comments or suggestions?
More information about the erlang-questions
mailing list