4 ms·
Absolutely! But that doesn't need to be the app's job. It's the role of an orthogonal process, the monitoring or init daemon, to say "Hey, this process bailed.
by davidbanham 11y ago
Absolutely! But that doesn't need to be the app's job. It's the role of an orthogonal process, the monitoring or init daemon, to say "Hey, this process bailed. I should restart it."
That way all your app has to worry about is "Every time I get started, I should try and connect to my dependent services. If it doesn't work, bail."
And the monitoring process gets to worry about things like "I should retry X times before giving up. There need to be at least Y instances of this process running."