Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Erlang Ets tables between Nodes

I've got an ejabberd server with a good amount of custom modules running. I have several mnesia tables and I know these can be easily copied between nodes without any change to the code at all. I was wondering if there's a similar way with ets tables?

Ideally it'd be nice to be able to have several machines running with exactly the same mnesia and ets data, without having to convert my ets tables into mnesia tables. (And thus rewriting a good amount of code.)

One though I had was doing an rpc:call on the ets tables for each node, but I was unsure about the impact this would have on performance.

If anyone has any answers please let me know.

like image 331
ewindsor Avatar asked Feb 11 '26 16:02

ewindsor


1 Answers

No, ets table contents can not be replicated for you.

Replication (and transaction safety) is the feature that the mnesia database application introduce, its implementation uses ets for ram_only tables.

like image 174
Christian Avatar answered Feb 15 '26 14:02

Christian



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!