<div dir="ltr">Hi,<br>In my application I have simple_one_for_one supervisor for handling incoming<br>external requests (HTTP). Each request has some command and its arguments. <br>Each command has its own workflow and that is why commands handler is <br>implemented as gen_statem. This gen_statem handles all commands and <br>I don't like that kind of a code mess inside of it. <br><br>I have two thoughts in my mind about resolving this problem, but I don't like<br>them either:<br>1. Create multiple simple_one_for_one supervisors, one for each type of command.<br>   I don't think that so many supervisors is a good idea;<br>2. Create "general" gen_statem for supervisor and multiple handling modules<br>   which then be passed as arguments to supervisor's init.<br>   I don't like general over general and so on (yuck!).<br><br>Is there any elegant way to solve this kind of a problem and keep this nice<br>pair of simple_one_for_one supervisor and gen_statem?<br></div>