[erlang-questions] pattern to augment a release with a plugin system

Benoit Chesneau bchesneau@REDACTED
Mon Nov 30 05:43:56 CET 2015

On Sun, Nov 29, 2015 at 11:49 PM Michael Truog <mjtruog@REDACTED> wrote:

> Having Erlang applications started and stopped dynamically can be contrary
> to having the system fail-fast.  So, that is a danger, since you are not
> always starting from a known starting state, the dynamic actions are
> dealing with state that is unknown due to the point in time during the
> runtime when the actions execute.  There is only one boot file which the
> Erlang VM accepts on its command line, and that contains the list of
> actions which are suppose to provide a successful startup of the release,
> and if not, it should crash due to validation during initialization.
Right. then maybe "plugins"  in Erlang world should be seen as a way to
augment a release from binary packages and provide some tooling around to
make the experience easy for non Erlang users.

Another way could be sending remotely the packages and regenerate locally
the boot script. Not sure how crazy it is. I can see the possible
uncertainty on reboot if any problem happen during a deployment it can
creates though. But how much it would be different from a bad release

> However, it is helpful to be able to dynamically start and stop Erlang
> applications, if the system has dynamic functionality it needs to support
> (hopefully with careful validation in isolation, so it doesn't cause
> instability).  I have functions for this at
> https://github.com/okeuday/reltool_util .  You might like
> reltool_util:application_remove/3 since that handles dependencies too, if
> they aren't shared with other applications.  I prefer
> reltool_util:application_start/3 instead of application:ensure_started/1
> since it handles module loading too.  The reltool_util module also contains
> functions for handling release boot and script files.

Thanks this is useful :) With the help of setup, i have some working code
right now to enable/disable dynamically the applications using remote

- benoit

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20151130/68c706d9/attachment.htm>

More information about the erlang-questions mailing list