Erlang: Distributed Application Strange behaviour

后端 未结 2 1487
栀梦
栀梦 2020-12-31 16:08

I\'m paying with distributed erlang applications.

Configuration and ideas are taken from:
http:/www.erlang.org/doc/pdf/otp-system-documentation.pdf 9.9.

相关标签:
2条回答
  • 2020-12-31 16:59

    Chances are the oddity you're seeing is likely to do with you restarting your application entirely on nodes n1/n2 while n3 is still running under the initial application initialisation.

    If your application starts any system-wide processes and uses their pids rather than using registered names set with global, pg or pg2 for example, then you may be working with two sets of global state.

    If this is the case, the recommended approach to take is to focus on adding/removing nodes from an existing application rather than restarting an application in it's entirety. This way nodes are leaving and joining into an existing set of initialised values.

    0 讨论(0)
  • 2020-12-31 17:02

    As explained over at Learn You Some Erlang (scroll to the bottom), distributed applications only work well when started as part of a release, not when you start them manually with application:start.

    0 讨论(0)
提交回复
热议问题