[erlang-questions] Architectural quandaries

David Welton davidnwelton@REDACTED
Wed Sep 17 11:54:14 CEST 2014


On Tue, Sep 16, 2014 at 12:42 PM, Daniel Abrahamsson
<daniel.abrahamsson@REDACTED> wrote:
> To me it seems like what you want is a circuit breaker (like Jesper's fuse
> [0], or breaky [1]) in front of the hardware module. Construct your Erlang
> code so that it does not crash on hardware errors, but instead melts the
> fuse. The supervisor is thus only involved when something strange happens in
> your code and where a restart will bring you back to known state. We use
> something similar (managed by [2], the name collision with [0] is purely
> coincidental) for graceful degradation if our HSMs go down. We also use [2]
> for managing database connections. In fact, you can use this strategy for
> dealing with any kind of external service without risking taking down your
> supervision tree.
>
> //Daniel
>
> [0] https://github.com/jlouis/fuse
> [1] https://github.com/mmzeeman/breaky
> [2] https://github.com/ulfl/fuse-lb

Aha!

Yes, that's probably what I want, or very close to it.  It's a pity
the concept is not more widely documented, as it's very important for
dealing with external services that may be down at some point that
should not, however, pull Erlang down with them.  If it were up to me,
I'd even put something like it in OTP, because it seems very likely
that any large enough project will encounter a need like it.

Thank you
-- 
David N. Welton

http://www.welton.it/davidw/

http://www.dedasys.com/



More information about the erlang-questions mailing list