[erlang-questions] Mnesia or memcached?

Yariv Sadan <>
Sat Apr 12 06:38:46 CEST 2008


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



More information about the erlang-questions mailing list