<div dir="ltr">When using hidden nodes, the basic distribution semantics will work, but node discovery is disabled. I.e. the hidden node will not appear in the nodes() list of other nodes.<div><br></div><div>This means that some applications that rely on nodes being visible will not work. Global and mnesia, for example.</div><div><br></div><div>If all nodes are hidden, they will still have names, and can still connect to each other, but will not appear in the connection list.</div><div><br></div><div>Example:</div><div><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">uwpro:otp uwiger$ erl -name a -hidden</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">Erlang/OTP 18 [erts-7.3.1] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;min-height:13px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">Eshell V7.3.1 (abort with ^G)</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">(a@uwpro.lan)1></span></p></div><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div><span style="font-variant-ligatures:no-common-ligatures"><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">uwpro:~ uwiger$ erl -name b -hidden</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">Erlang/OTP 18 [erts-7.3.1] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;min-height:13px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">Eshell V7.3.1 (abort with ^G)</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo">(b@uwpro.lan)1> net:ping('a@uwpro.lan').<br></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">pong</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">(b@uwpro.lan)2> nodes().</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">[]</span></p><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div></span></div><div><span style="font-variant-ligatures:no-common-ligatures"><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">(a@uwpro.lan)1> register(me, self()).</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">true</span></p><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div><span style="font-variant-ligatures:no-common-ligatures"><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">(b@uwpro.lan)3> {me, 'a@uwpro.lan'} ! hello.</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">hello</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">(b@uwpro.lan)4> </span></p><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div><span style="font-variant-ligatures:no-common-ligatures"><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">(a@uwpro.lan)2> flush().</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">Shell got hello</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">ok</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">(a@uwpro.lan)3> </span></p><div><br></div><div>You can write code that understands this, e.g. relying on some configuration database, but many existing components are likely to expect nodes to be visible.</div><div><br></div><div>BR,</div><div>Ulf W</div></span></div></span></div></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-09-20 17:16 GMT+02:00 Frank Muller <span dir="ltr"><<a href="mailto:frank.muller.erl@gmail.com" target="_blank">frank.muller.erl@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi everyone<div><br></div><div>I've a simple OTP-compliant release, and I want to make it distributed on two nodes.</div><div><br></div><div>Following the steps here, it was pretty simple to achieve:</div><div><a href="http://erlang.org/doc/design_principles/distributed_applications.html" target="_blank">http://erlang.org/doc/design_<wbr>principles/distributed_<wbr>applications.html</a><br></div><div><br></div>as long as my application is not "hidden".<div><br></div><div>My constraint is that I need to keep my node "hidden" because it connects to other critical nodes in our infrastructure.<br><div><div><br></div><div>If I set "-hidden" in "vm.args", the distribution breaks and the two nodes (the master and the backup) become both active, which is not desired :-( </div><div><br></div>Anyone knows how to benefit from the distribution feature while keeping my node<span></span> "hidden"?<div><br></div><div>Any other alternative(s) to solve my issue?<br><div><div><br></div><div>Regards</div><span class="HOEnZb"><font color="#888888"><div>Frank</div></font></span></div></div></div></div>
<br>______________________________<wbr>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/<wbr>listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>