What do the blue lines in observer supervision tree drawing mean?

Hi, I’m just curious what the blue lines/edges mean in the supervision tree that observer draws. The dark lines I assume represent the links between the processes. In this example, significant_event_logger_worker is a poolboy “supervisor” or whatever the root process is classified as. Thanks! Screen Shot 2020-06-22 at 11.15.41 PM

1 Like

The two processes on the same blue line are linked to each other but not in a supervising-supervised way. Maybe the significant_event_logger_worker just wants to get notified whenever a child of <0.545.0> dies (by trapping exit), or maybe the system designer wants to kill the whole sub-tree from significant_event_logger_worker whenever one of its grandchildren dies.

1 Like

Unless I am gravely mistaken, the blue lines are monitors: whenever the lower-level process dies the higher-up process will get a notification. Monitors are usually used to allow some cleanup to be done when a process that is important to the efforts of the current process quits.
The difference with normal linking is that normal linking is bi-directional (where the behaviour can then be altered by one side to trap exits) whereas monitors are uni-directional (one-sided): the monitored process does not know/care that it is being monitored.
Monitoring is commonly used in pools, a very common supervision pattern. See the Process.monitor/1 documentation and also “the need for monitoring” in the ‘getting started’ guide for more information.

EDIT: I was mistaken. @Aetherus’s answer is correct: The blue lines indicate (bidirectional) links between processes that are ‘extra’ (on top of the normal child/parent links between a supervisor and its supervising processes).

Sorry to tell you that you are wrong. I did my experiment before I answer this question.

What I did

  • Create 2 GenServer processes, named :worker1 and :worker2, supervised by the top supervisor.
  • Link them together
  • Create a GenServer process named :monitor, also supervised by the top supervisor.
  • Make the :monitor process monitor the :worker1.
  • Open the observer

What I saw

5 Likes