Hacker News new | ask | show | jobs
by lenary 5529 days ago
doesn't heart kinda solve the cyclic "who restarts who thing". I think heart (if enabled) sits there until the erlang process exits, restarts the erlang vm, which in turn also brings up an instance of heart. yeah, complicated and not perfect, but it works.
1 comments

Heart does solve it in a way, yes. Any Master/Slave pattern where a masterless slave becomes a master also solves it. The complex cases I had in mind happen when you dynamically add more workers and try to set up crazier links (A is the master of B, B is the master of C, C is the master of A), although there are few practical uses of that. You'd have to try to shoot yourself in the foot I guess. I see it as a bit hard to provide a generic OTP pattern to do that kind of thing past the standard takeover/failover setup (and heart for VMs)