Does MNesia support synchronization after a disconnected operation?

I am starting to architect a project with the following requirements:

  • The common system will be distributed among several physical nodes in the WAN
  • Each node will use and manage a common set of data records.
  • Operations on these records must be robust against network outages.

I consider using Mnesia / Erlang as the base platform for this project, but I would like to know how well it (Mnesia) can handle the simultaneous disconnected conflicting operations in the data set.

Illustrative scenario:

  • Nodes A and B have connectivity and an empty dataset.
  • Node Adds a record (1, ABC).
    • Here, the recordset should transparently synchronize, and now node B also has a record (1, ABC).
  • The network connection between them is lost.
  • Node A changes the entry to (1, DEF).
  • Node B (later timestamp) changes the entry to (1, GHI).
  • Network connection is restored
    • Expected
    • : after transparent synchronization, both nodes contain a record (1, GHI).

To simplify, suppose that a complete change history is not required (for example, it is not important that record 1 is used to store ABC or DEF, it is only important that it now contains GHI).

Is this the finished (or trivial) ability of Mnesia?

+4
source share
2 answers

Ulf Wieger last spoke at the Erlang Factory in San Francisco (2010) on this topic. Here you can find his slides: http://www.erlang-factory.com/upload/item/7/UlfWiger-10minutetalk.pdf

They provide an overview of problems, as well as pointers to some source code that may be useful to you.

+5
source

Steps 1-5 should work. Automatic conflict resolution (step 6): no.

+2
source

Source: https://habr.com/ru/post/1340251/


All Articles