Help why is Mix really only a dev tool?

Playing devil’s advocate here, it’s possible to start named node using mix, something like MIX_ENV=prod elixir --name myapp@127.0.0.1 --cookie secret -S mix phx.server or similar. There is also wobserver https://github.com/shinyscorpion/wobserver which might work with any setup and one can use systemd to supervise the mix process (Elixir apps as systemd services - info & wiki). Not trying to say that it’s the way to go, but it’s not that bad (we tried both ways and exrm back then).

One problem with lazy loading that wasn’t mentioned though: Erlang VM has atoms which should not be generated dynamically, people tend to learn it sooner rather then later and use String.to_existing_atom to create atoms safely. Now with lazy loading it’s possible to have atoms in code that wan’t loaded yet which would break the perfectly fine call to the above function, using releases would make sure it never happens.

2 Likes