3 ms·
2.5 years, a Phoenix webapp. It's the backend of a marketplace for invoices. The frontend is a React SPA. It interfaces a number of third party JSON and SOAP AP
by pmontra 7y ago
2.5 years, a Phoenix webapp. It's the backend of a marketplace for invoices. The frontend is a React SPA. It interfaces a number of third party JSON and SOAP APIs. It's still well within the limits of a medium low server on GCP. No need for fancier environments.
Coming from Rails I like that I don't have to go through separate job handlers, everything we need is in the language. I don't like much ecto (too complicated for our need.) I dislike the configuration, build and deployment process (it's definitely not snappy). By the way, it's great that Phoenix autodetects changes and recompiles them without the need of an IDE.
Compared to another Django project I've been working on in parallel, the Elixir one feels more robust and easier to expand upon. Compared to Rails ones, it's about the same but with less third party libraries.
- nickjj 7y agoWhat I found interesting is the author of Phoenix said in a podcast[0] that most of the apps he deploys don't use releases. They just run things inside of a Docker container using mix straight up. [0]: https://soundcloud.com/elixirtalk/episode-157-feat-chris-mccord-liveviewphoenix-part-deux https://soundcloud.com/elixirtalk/episode-157-feat-chris-mcc...
- pmontra 7y agoI know at least one company doing the same. I'm not sure it's a big advantage. Currently we install a server using ansible once (debian, apt-get erlang and elixir.) We run tests on Travis and make it start a build process on a server of us, create a release and deploy it using distillery. Configuration is compiled at build time with secrets installed on the build server. Erlang/Elixir don't play very well together with systemd (not easy to detect if they're running) but what we setup is okayish and keeps us running. With docker I imagine we still need the build server, secrets would still be there, compilation must be done there before we create the image (mix phx.server on uncompiled sources is going to take minutes and eat up the CPU of the production server.) Then we must push the image to a registry and pull it. Probably docker would interact better with systemd but I never tested it with a BEAM project. Finally we need something to switch connections from the old container to the new one. Distillery takes care of that now. All summed up I see some pros a cons, both are still cumbersome. Btw, we're on Elixir 1.7. We didn't check yet the new release and configuration features of 1.9. Too busy with new business features. Customer's decision.
- nickjj 7y agoI'm not an Elixir expert but doesn't not using releases come with pretty big down sides? I vaguely remember reading that a release will pre-load all of your modules at boot up time so that by the time the app is running, everything is as optimized as it can be. But if you use mix without releases then everything is lazily loaded, so unless you had extra code that gets run on deploy to curl all of your endpoints (to warm up the VM) then users would experience slower load times as your app's endpoints were naturally discovered? It makes me wonder why the creator of Phoenix still decides to not use releases. Unfortunately he didn't go into detail.