[erlang-questions] Mnesia or memcached?

Anders Nygren anders.nygren@REDACTED
Sun Apr 13 04:03:21 CEST 2008


On Fri, Apr 11, 2008 at 11:38 PM, Yariv Sadan <yarivsadan@REDACTED> wrote:
> Hi,
>
>  I need for an Erlang app a caching solution that does essentially what
>  memcached does:
>
>  1. You tell it the max memory it can use or each node.
>  2. You insert, lookup and remove objects by primary key.
>  3. When you look up an object its time stamp is updated to the current time.
>  4. When you insert an object and the max memory is exceeded, the
>  oldest object(s) is (are) removed to make room for the new object.
>  5. The cache is distributed. Each key/value pair exists on only one
>  node in a cluster and is accessible by all nodes.
>
>  Should I try to use Mnesia for this (I don't need transactions --
>  dirty operations are fine) or should I go with memcached?  I know
>  Mnesia can take care of 1, 3 and 5 but I'm not sure about 1 and 4.
>  I'll appreciate any feedback.
>
>  Thanks,
>  Yariv

Take a look at this paper
Concurrent Caching by Jay Nelson
http://www.duomark.com/erlang/publications/acm2006.pdf

/Anders



More information about the erlang-questions mailing list