[erlang-questions] ets+dets
Anders Ramsell
anders@REDACTED
Thu May 11 22:01:34 CEST 2017
Vlad Dumitrescu wrote:
> Hi all,
>
> I need to implement a simple key-value store that should be persistent
> (on disk) but have a fast in-memory cache for the recently used
> entries (possibly with a configurable policy) and with little
> concurrent access. I was thinking of an ets+dets combo, but it may be
> tricky to get the details right. Is there something like this out
> there? Would it be better to just use mnesia? I'd like to keep it
> lean, but if third-party databases fit the bill, I will look at them.
>
In our system we have a few cases that "combine" ets and dets in roughly
this way:
- on startup the process fills the ets table with all contents of the
dets table
- write is done in both ets and dets
- read is done from ets only
Perhaps not so good if there are a lot of writes but that is not the
case where we do this.
/Anders
More information about the erlang-questions
mailing list