[erlang-questions] atomic read+delete operation on ETS record

Igor Ribeiro Sucupira igorrs@REDACTED
Fri Apr 16 16:45:34 CEST 2010


With Mnesia on top of ets, you can use transactions and record-locks
(fun mnesia:read/3). But I realize Mnesia may not be good enough for
what you want (not as simple, not as fast, doesn't support
duplicate_bag etc.).

Igor.

On Fri, Apr 16, 2010 at 9:06 AM, Pablo Platt <pablo.platt@REDACTED> wrote:
> ETS has atomic operations like update_element and update_counter.
> Is there a way to read a record and delete it in the same operation without using a gen_server that manage the table?
>
> Is there a way to update a list inside a record in an atomic way?
> For example, mongodb and redis let you add and remove items from the beginning and end of lists.
> ETS records are Erlang terms so it might be possible and will be very useful.
>
> Thanks


More information about the erlang-questions mailing list