[erlang-questions] Distributed Erlang

27 views
Skip to first unread message

Matthew Evans

unread,
May 23, 2012, 5:29:12 PM5/23/12
to erlang-q...@erlang.org
Hi,

I am wanting to create a distributed mesh of Erlang nodes (all nodes will be configured with dist_auto_connect set to false). There could potentially be lots of nodes in the mesh, so to prevent the mesh from getting too big I want to have the ability to disconnect a node. Is this possible?

Something like: net_kernel:disconnect_node('node@foo').

Thanks

Matt

Matthew Evans

unread,
May 23, 2012, 6:19:45 PM5/23/12
to erlang-q...@erlang.org
I guess I can use the undocumented function net_kernel:disconnect/1




From: mattev...@hotmail.com
To: erlang-q...@erlang.org
Date: Wed, 23 May 2012 17:29:12 -0400
Subject: [erlang-questions] Distributed Erlang
_______________________________________________ erlang-questions mailing list erlang-q...@erlang.org http://erlang.org/mailman/listinfo/erlang-questions

Richard Carlsson

unread,
May 23, 2012, 11:54:29 PM5/23/12
to erlang-q...@erlang.org
Looking at the source code, disconnect/1 is simply implemented as the
dual to connect_node/1, whereas connect/1 (also undocumented) is doing
some extra stuff on top of what connect_node/1 does. I suggest
submitting a patch that implements net_kernel:disconnect_node/1 as doing
exactly what disconnect/1 does today, and add it to the documentation.
This allows disconnect/1 to stay undocumented so it can be tweaked for
whatever internal purposes OTP are using it for in the future without
affecting user code.

/Richard

On 05/24/2012 12:19 AM, Matthew Evans wrote:
> I guess I can use the undocumented function net_kernel:disconnect/1
>
>
>
> ------------------------------------------------------------------------
Reply all
Reply to author
Forward
0 new messages