<div dir="ltr">Hi David,<div><br></div><div>What do you mean exactly by "sometimes J does not receive messages from E"? Does it happen haphazardly, during the same "session"? Does it happen with the J epmd running?</div>

<div><br></div><div>For two nodes to connect, they have to know about each other, which is why epmd exists. If the nodes are connected, epmd is no longer required, the existing connection is used. As you discovered, epmd must run on the machine where the target of the first connection attempt runs.</div>

<div><br></div><div>Without a "J epmd", if the first contact is initiated by E, then J is not found. But if J makes a contact after that, then subsequent E->J works fine because the connection has been established.</div>

<div><br></div><div>If there is some network hick-up that makes the J node look disconnected or the tablet goes to sleep, then E forgets about it and what happens next depends again on who initiates the contact first.</div>

<div><br></div><div>I hope I explained it clearly enough.</div><div><br></div><div>regards,</div><div>Vlad</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 3, 2014 at 11:23 AM, David Welton <span dir="ltr"><<a href="mailto:davidnwelton@gmail.com" target="_blank">davidnwelton@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
We have a question here about exactly how Erlang decides to send what<br>
where, via which mechanisms.<br>
<br>
We have a Java node J, and an Erlang node E.<br>
<br>
J can make rpc calls to E without problems.  This always works.  J<br>
opens an Erlang connection via JInterface, calls what it needs to, and<br>
things are fine.<br>
<br>
Sometimes E can send messages to J, seemingly utilizing the connection<br>
that J opens when it starts up.<br>
<br>
Sometimes J does *not* receive messages from E.  Initially we found<br>
out that epmd was required and started working on implementing enough<br>
of that to route requests through to a server socket on J<br>
<br>
But it's important to know why it uses one connection over the other -<br>
why does it sometimes decide to contact epmd, do a lookup, and open a<br>
connection from E to J - and other times, simply use the existing,<br>
open connection?<br>
<br>
We haven't had problems like this with C nodes, although our node J<br>
resides on a tablet that is not physically connected to E, so the<br>
networking is not quite as fast/clean/robust, although it is a local<br>
network and there should not be any huge problems.<br>
<br>
Thanks,<br>
<span class="HOEnZb"><font color="#888888">--<br>
David N. Welton<br>
<br>
<a href="http://www.welton.it/davidw/" target="_blank">http://www.welton.it/davidw/</a><br>
<br>
<a href="http://www.dedasys.com/" target="_blank">http://www.dedasys.com/</a><br>
_______________________________________________<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" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</font></span></blockquote></div><br></div>