[erlang-questions] ets+dets

Vlad Dumitrescu vladdu55@REDACTED
Thu May 11 22:20:11 CEST 2017


On Thu, May 11, 2017 at 10:01 PM, Anders Ramsell <anders@REDACTED>
wrote:

> 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.
>

Hi!

That is a straight use, but the point in my case would be to be able to not
keep everything in memory at the same time. A two-level cache, I think is
the right concept. Thanks!

best regards,
Vlad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170511/7ad4de4b/attachment.htm>


More information about the erlang-questions mailing list