[erlang-questions] idiomatic way to do hot code reloading with erlang.mk + relx
Jesper Louis Andersen
Thu Mar 6 21:01:08 CET 2014
On Thu, Mar 6, 2014 at 3:08 PM, t x <txrev319@REDACTED> wrote:
> * how do I:
> 1) give it a -sname so I can attach to it from another erlang node?
> 2) do hot code reloading on something that is already running via relx
Okie, you normally have something like this in relx releases:
if you have given your original app node a name (I often pick app@REDACTED).
This allows you to have a remote console on the Erlang node and you can
then hot-deploy modules into the running node by placing a .beam in the
load path of the project and then executing l(Module). For more general
perusal of this consult the appropriate man-page:
erl -man code
For development, you might consider something like
which is an even faster development path.
This was 1), now for 2) and further on. There is also a concept called
release upgrades. Fred did an amazing job at handling them:
they allow you to upgrade systems which you for some reason cannot shut
down between upgrades. There are a few places where this is necessary, but
I would recommend designing your system in a way to avoid them if possible.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions