[erlang-questions] supervisors & slow init's
Thu Dec 5 17:39:11 CET 2013
Rereading Ferd's article, this jumps out at me:
> You could force a connection during initialization if you know the database is on the same host and should be booted before your Erlang system, for example. Then a restart should work. In case of something incomprehensible and unexpected that breaks these guarantees, the node will end up crashing, which is desirable: a pre-condition to starting your system hasn't been met. It's a system-wide assertion that failed.
That's what we want! If the "A" system does not start, things should
be retried a few times, then everything but a small core which will
provide a "fail politely" (
) error message to the user should probably not start either. The
system should not bring up "not really started B" and "not really
started C" just to send them start messages (from where?) when A
finally does start 20 seconds later.
Incidentally, what's the best way to start this whole subtree so that
a small core of the application will survive its death?
David N. Welton
More information about the erlang-questions