[erlang-questions] Mnesia local_content tables as transaction manager?

Paul Mineiro <>
Wed Jul 22 20:25:32 CEST 2009


global:trans/3 will let you lock a resource across multiple nodes.  if
your problem is simple this is sufficient.  this won't help you with
problems like "B dies while you are holding the global lock so you need to
undo the operation on A", you'll have to roll stuff like that yourself.

-- p

On Tue, 21 Jul 2009, Jim McCoy wrote:

> I want to perform some transactions over processes (but will handle
> persistence via another channel) such that if process A and B are on
> the same node I can be certain that once a "transaction function"
> returns successfully both A and B have had the specified state
> transformation applied to them.  Ideally this would also work if A and
> B were on different nodes, but I am content to move them both to the
> same node to perform the transaction.  Is this something that mnesia
> local_content tables would be suitable for?  Would
> mnesia/local_content be overkill for this task? Am I better off
> looking at another tool or example for this task?
>
> I guess what I am basically looking for is a distributed transaction
> manager and I am hoping that there might be some part of mnesia or
> other built-in facility that can be re-tasked for this purpose.  Any
> thoughts?
>
> jim
>
> ________________________________________________________________
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org
>
>



More information about the erlang-questions mailing list