[erlang-questions] Erlang nodes, connections and sockets

Vlad Dumitrescu vladdu55@REDACTED
Mon Mar 3 11:39:13 CET 2014


Hi David,

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?

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.

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.

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.

I hope I explained it clearly enough.

regards,
Vlad



On Mon, Mar 3, 2014 at 11:23 AM, David Welton <davidnwelton@REDACTED>wrote:

> Hello,
>
> We have a question here about exactly how Erlang decides to send what
> where, via which mechanisms.
>
> We have a Java node J, and an Erlang node E.
>
> J can make rpc calls to E without problems.  This always works.  J
> opens an Erlang connection via JInterface, calls what it needs to, and
> things are fine.
>
> Sometimes E can send messages to J, seemingly utilizing the connection
> that J opens when it starts up.
>
> Sometimes J does *not* receive messages from E.  Initially we found
> out that epmd was required and started working on implementing enough
> of that to route requests through to a server socket on J
>
> But it's important to know why it uses one connection over the other -
> why does it sometimes decide to contact epmd, do a lookup, and open a
> connection from E to J - and other times, simply use the existing,
> open connection?
>
> We haven't had problems like this with C nodes, although our node J
> resides on a tablet that is not physically connected to E, so the
> networking is not quite as fast/clean/robust, although it is a local
> network and there should not be any huge problems.
>
> Thanks,
> --
> David N. Welton
>
> http://www.welton.it/davidw/
>
> http://www.dedasys.com/
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140303/3d902c7b/attachment.htm>


More information about the erlang-questions mailing list