4 ms·
I think better for him to use Node (or really, any language that will simply fall over in the case of failure), unless extremely familiar with a supervisor para
by lostcolony 13y ago
I think better for him to use Node (or really, any language that will simply fall over in the case of failure), unless extremely familiar with a supervisor paradigm. Given the warnings he prefaces everything with, including not to toggle a relais(?) more than 10/min, it seems all too easy to accidentally have a supervisor strategy that in the face of failure could surpass that.
- davidw 13y agoWell, he seems interested in trying different things, and Erlang is very well suited to something like what he's doing. He certainly needs to take adequate steps to ensure that things don't blow up, but long term, having something that's stable and doesn't fall over is going to be a more dependable solution.
- toast0 13y agodon't toggle too fast -> gen_server per relay -> sleep for 6 seconds in init().
- klibertp 13y ago"including not to toggle a relais(?) more than 10/min" That's actually exactly what the latter two configuration parameters for OTP supervisors are for - to tell the supervisor how many failures in what unit of time it should consider "normal".
- lostcolony 13y agoI know. Does -he- know, though? That was my point. Per the original comment, Erlang -would- be perfect for it. It would not, however, be perfect for someone who is not knowledgeable about OTP to use it as a learning project, because any oversight that leads to unexpected behaviors could burn his house down (or whatever toggling a relais too much does).