|
|
|
|
|
by inferiorhuman
2641 days ago
|
|
I cut my teeth on Ruby and Rails, I've screwed around with Phoenix, and I'm currently infatuated with Rust. Earlier on I thought that, yeah, Rust is a great replacement for C and not something want to write a web app in. So, sure, I've got a bunch of little doodads written in Rust (mostly CLI tools). Now? The fluff I've written in Elixir is getting ported to Rust. The Rust tooling and community are just that good. I'd rather have to work on some extra verbosity and maybe even maintain my own helper library in Rust than deal with with Elixir/Phoenix at this point. The number one reason is that Elixir deployments are nothing short of a nightmare. I've found the community not particularly helpful or knowledgeable about how things work (and given how many moving pieces are in an Elixir deployment, and how brittle Elixir deployments are, this is a terrible thing). And you're definitely not going to write CLI tools in Elixir (it straight doesn't work with escript in the first place). Compiling down into a single "static" binary like Rust (and Go) do by default is a huge win for things like this. The quick startup time of a Rust or Go app compared to Ruby or anything JVM based is great for rapid iteration and testing. The tooling around Rust is, in general, fantastic. Being that much of a pleasure to use really makes up for how inappropriate it is to use Rust for most high level web app things. Phoenix had a lot of promise, but these days I'd much rather go back to Rails or Django (with an eye towards how to migrate to a compiled language) if I needed to churn something out quickly. |
|
If you run mix in production, then it's just like running Rails or Node. You don't get certain features like hot upgrades in production while keeping what's in memory on the server, but you don't get that from Rails/Node/PHP/Python either.
If you want those BEAM releases, then you have to use the Elixir (or Erlang) tools for them. I also encountered a great deal of frustration when working from a different OS, but no more than I did when building Rails apps several years ago.
Now I generally, build with Gitlab CI/CD and deploy from that Gitlab container to my server with Distillery and Edeliver. It lets me use the standard CI/CD tools and have stateful upgrades. I am running Ubuntu on the server, though:
https://www.youtube.com/watch?v=-mm44ADU3kc