[erlang-questions] C nodes and OTP
Wed Jan 16 18:44:45 CET 2013
one potential pitfall with C nodes in general, regardless of pure message
based or erl_rpc, comes when your C node does something time consuming.
That is, your C node is not responding to ERL_TICK in a timely fashion. The
connected Erlang nodes will then think that the C node has become
It is possible to recognise this situation from within the C node and
explicitly reconnect to an Erlang node. I'm away from my work just now, but
if you want an example, let me know and I'll send something round tomorrow.
Alternatively, your C node can use threading to handle messages. That goes
beyond my abilities ;-)
Sent from a mobile device, please excuse the typos.
On Jan 16, 2013 11:03 AM, "David Welton" <davidnwelton@REDACTED> wrote:
> I'm trying to wrap my head around the "best" way to set up an
> OTP-based system that comunicates with a C node.
> My inclination so far is to set up a gen_server, and use handle_info/2
> to deal with messages coming from the C node.
> Looking at the C node example, it's all about messages, which seems to
> be "the simplest thing that could possibly work", which is good. I'm
> wondering, though, if it makes more sense to try and call directly
> into my gen_server's api with rpc, along the lines of what is being
> done here:
> Any other tips/tricks/best practices/pitfalls to avoid would be welcome.
> David N. Welton
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions