[erlang-questions] [erlang-patches] Running mnesia across a firewall

Serge Aleynikov saleyn@REDACTED
Wed Mar 5 13:09:21 CET 2008

Ulf Wiger (TN/EAB) wrote:
> Serge Aleynikov skrev:
>> The main culprit is the net_kernel's dist_auto_connect option that is 
>> an all or none setting that cannot vary depending on connecting 
>> attempt to a given node.  The attached patch (for R12B-1) solves this 
>> issue by introducing an additional kernel option:
>>     {dist_auto_connect, {callback, M, F}}
> Have you thought about solving it with an application that
> periodically tries calling net_kernel:connect(Node)?

On which node, though?  If this is one of the "master" nodes A holding a 
disk copy of a table X, then the node must have {dist_auto_connect, 
once} set.  If the firewall prohibits inbound access to this node A from 
some other node C that uses remote mnesia interface to access table X, 
then the only way to establish connection to node C is to do on node A 
net_kernel:connect(C).  However if that connection drops, there's no way 
to reestablish that connection without restarting node A.  Remember that 
in case of {dist_auto_connect, once} net_kernel checks if a connection 
is barred and if it is it won't allow to connect to a node that 
previously was connected.


More information about the erlang-questions mailing list