<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, May 5, 2014 at 1:18 PM, Torben Hoffmann <span dir="ltr"><<a href="mailto:torben.hoffmann@erlang-solutions.com" target="_blank">torben.hoffmann@erlang-solutions.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><br>
Vlad Dumitrescu writes:<br>> Just a thought that connects with the patterns discussion: linking to<br>
> another process is usually permanent, that is we don't unlink from it.<br>
> Process monitoring can be more dynamic. In any case, it is possible to have<br>
> links/monitors that are dynamic and thus runtime properties. IMHO, one<br>
> might want to handle these differently than the static ones. On the other<br>
> hand, this might be an anti-pattern?<br>
><br>
</div>Ai, ai, ai!<br>
<br>
Dynamic linking/monitoring is far from trivial.<br>
<br>
The idiomatic danger of unlinking is that you can end up with processes that are no<br>
longer associated with the supervision tree of your application.<br>
<br>
In most cases you would probably have some naïve link in the supervision tree and<br>
then add linking/monitoring from a different place in the tree to the processes you<br>
are interested in.<br>
<br>
Do you have a good example of where you use dynamic linking/monitoring that we could<br>
base the discussion on?<br>
<br>
I'd hate to provide notation for anti-patterns, but if we are missing something on<br>
the dynamic front then now is a good time to get it in.<br>
<br></blockquote><div><br></div><div>No, I don't have a full example at the moment. Of course, when using linking with supervision trees, then the linking should be static, i.e. for the lifetime of the process. I have in the past used linking outside supervision, but nowadays I would have used monitors instead.</div>
<div><br></div><div>As a simplified example, let's take a tree of processes where parents monitor their children and the children their parents. When moving a child to another parent, the monitors will change. </div>
<div>
<br></div><div>It might not be something that is used often in systems, but since it is a possibility, I think that the architecture description should have a way to describe it. Or it should be decided that such monitors have nothing to do in the architecture diagrams, which is perfectly acceptable IMHO.</div>
<div><br></div><div>regards,</div><div>Vlad</div><div> </div></div></div></div>