So having spent much time trying to get my head around supervisor behaviour and creating some kind of Erlang architecture that works, I wrote a architectural document for how one node type is implemented within that architecture.
What I describe is the function node that allows executing Erlang code within Erlang-Red - basically wrapping Erlang code around a message-passing flow-based paradigm.
Not to spoiler but in the end I came up with this process architecture:
Two features made it that complicated: dealing with supervisors and handling timeouts for a function node. Both now work and I’ll probably stick with that architecture.
I don’t use process links, instead I’m using monitor for one-way linking but that’s all described in the text above!