论坛首页 综合技术论坛

Hidden Nodes的用处

浏览 3797 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2009-03-04   最后修改:2009-03-04
11.5 Hidden Nodes

In a distributed Erlang system, it is sometimes useful to connect to a node without also connecting to all other nodes. An example could be some kind of O&M functionality used to inspect the status of a system without disturbing it. For this purpose, a hidden node may be used.

A hidden node is a node started with the command line flag -hidden. Connections between hidden nodes and other nodes are not transitive, they must be set up explicitly. Also, hidden nodes does not show up in the list of nodes returned by nodes(). Instead, nodes(hidden) or nodes(connected) must be used. This means, for example, that the hidden node will not be added to the set of nodes that global is keeping track of.

This feature was added in Erlang 5.0/OTP R7.

设计的目的是减少节点见互联互通的通讯成本,不用global模块去跟踪这个节点的名字同步等。特别适合于用ei写的c程序, 因为ei是轻量的,没有这么多资源和必要去做无必须的事情。ei一般用作client, 去请求别的节点做复杂的运算!

   发表时间:2009-03-04  
恩, hidden node可以做为某些"特殊"应用的提供者.
如果指定 -connect_all false 这个节点也不会自动的加入global的网络.
再这一点是否和 -hidden有些相同呢?
0 请登录后投票
   发表时间:2009-03-04  
litaocheng 写道
恩, hidden node可以做为某些"特殊"应用的提供者.
如果指定 -connect_all false 这个节点也不会自动的加入global的网络.
再这一点是否和 -hidden有些相同呢?

hidden和connect_all false处理不同:
1. 结果来看的话都是节点不全联通。
2. nodes() 是默认不返回hidden节点的 但是返回正常节点尽管connect_all false
3. rpc什么的都依赖nodes()
4. 系统统计也会不同
5. hidden是在erts实现的 connect_all是在global模块实现的

0 请登录后投票
   发表时间:2009-03-07  
EI越来越清晰了
0 请登录后投票
   发表时间:2009-03-08  
erl_call 设计思路不错  hidden节点还是很容易用ei实现的
0 请登录后投票
   发表时间:2009-08-04  
用于对节点发出控制指令 erl和erl_call都可以, 但是erl启动的速度太慢,而erl_call是非常轻量的 瞬间就执行完毕。
0 请登录后投票
论坛首页 综合技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics