Mnesia Asynchronous Transaction

I would like to have a master-slave installation of Erlang nodes, where read and write operations are performed only on the master node. Slave nodes are only saved as hot backups.

As I understand it, the default behavior of Mnesia is to synchronize the lock on all nodes before performing a write operation. This will result in high latency, especially for geographically distributed nodes.

My question is: Does Mnesia support asynchronous transactions, where the locks are only on the master node, and the write operations then propagate to the sub nodes?

+3
source share
3 answers

, , , (, , rabbitmq), db . , , , . Erlang , , .

, db. . , .

Mnesia mnesia, , .

+2

Q A!

, , , , , , gen_server - . , : ! Mnesia , , , .

I'm still a little puzzled, however, given that mnesia uses transactional semantics, I tend to take it as a hint that you don't need to serialize access to yourself, especially since mnesia developers probably know the system better than me; )

I understand that this is not a direct answer to your question, however I would say using mnesia + memorynodes + disknodes. Memory for quick capture and decompression for disaster recovery / backup.

NTN, haavee

0
source

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


All Articles