I have the following scenario and I'm not really sure of how to represent it with OTP. I have an application (appmod) running within Yaws that has to create a worker process every time it receives an HTTP request.The worker process is created for a specific ID that comes with the request and for different requests that contain the same ID, the same worker process must be used. Once instantiated, the worker process must remain up and until it is explicitly stopped.<br>
<br>I want to monitor the worker processes with an OTP supervisor, but so far I'm not completely sure of what the correct approach should be. Should I call supervisor:start_link() the first time I get a request for a specific ID and then supervisor:start_child() for the following ones? Or should I just create one supervisor process per worker process I have? Can anyone share some tips with me on how to design a solution for this problem within OTP?<br>
<br>Thanks.<br><br>