Are Supervisors themselves GenServers? I am trying to have a Supervisor starting multiple worker processes, and the worker processes will periodically send its progress back to the Supervisor, and the Supervisor will aggregate the progress, probably do some more processing and send it to another process…so on and so forth. But I am confused by the fact that Supervisor’s only callback function is init (args)
, which will clash with GenServer’s init
method I am trying to use the Supervisor as a GenServer process.
Is this even the right way to think of this? Or is supervision the only job of a Supervisor, and I should have a separate “aggregator” GenServer instances that is also supervised by this Supervisor which aggregates the data from the workers?
Thanks