I am building an Elixir app for prod. It has a
:observer.start layout as given below
My app’s flow is as follows.
Step 1: Workers under
Elixir.AppName.MQTT.Supervisor receive some message.
Step 2: This message is sent to
Elixir.AppName.Server starts a worker dynamically under
Step 4: The worker receives the message and acts accordingly
Let us call the worker, which is a GenServer, WORKER
My problem is that every time I have to perform some task in WORKERs I end up using
send self(), message and having a corresponding
handle_info in the WORKER.
I feel there is some issue with my current approach as I cannot utilize functions like
How should I remodel the application so that it makes use of other
GenServer functions and callbacks?