[erlang-questions] C nodes and OTP
Robert Raschke
rtrlists@REDACTED
Wed Jan 16 18:44:45 CET 2013
Hi David,
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
disconnected.
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 ;-)
Robby
--
Sent from a mobile device, please excuse the typos.
On Jan 16, 2013 11:03 AM, "David Welton" <davidnwelton@REDACTED> wrote:
> Hi
>
> 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:
>
>
> http://stackoverflow.com/questions/4749693/can-i-get-erlang-otp-behaviors-in-c-nodes
>
> Any other tips/tricks/best practices/pitfalls to avoid would be welcome.
>
> 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/20130116/b31b996b/attachment.htm>
More information about the erlang-questions
mailing list