Hacker News new | past | comments | ask | show | jobs | submit login

I went through this a short while ago for a new side project. You can totally use Mix and you'll be fine to get going with initially but you lose a lot of the benefits of BEAM. A proper BEAM "release" has several key advantages. Most of them are in the Elixir docs [1] but I'll point out the ones I like.

* You don't need to include the source code because you have the pre-compiled code in the release, that includes packages as well. No need to `mix deps.get` on production. They don't even require Erlang / Elixir on the production box because that's also baked directly into the release. As long as your architecture is the same as your build machine, you get a super light weight artifact and a simplified production stack.

* It's very easy to configure the BEAM vm from releases. I think most of this is possible through mix with everything installed on the box but using a release you get it put into the release artifact and there's no fussing around after that.

* It also makes life easier when you start using umbrella applications. You can keep your code together and cut releases of individual applications under the umbrella. That lets you scale your application while keeping it together in a single unit (if that's your thing).

There are other benefits, but ultimately it's the way the erlang/elixir/beam community seem to prefer. For me this was the selling point, as I expect tooling will continue in that direction rather than supporting mix in production.

[1] - https://elixir-lang.org/getting-started/mix-otp/config-and-r...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: