For the elixir programmers who are going to read this: do you use it professionally ? If so, for what purpose ?
I'm interested in learning this language but I don't really know what can be built with it ? It is a general purpose language or a more specialised one ?
General purpose for anything that is long-running. I mean more than a few seconds.
In my case, we use it to power web api, backend systems, databases, IOT devices. Anything that is not a "cli" thing basically. It is not the best for desktop GUI app because it lacks a deep framework for that, but it works well with it if you can make past that hump.
It is not good at:
- smartphone app. That is mostly due to the walled garden that these devices are
- CLI tools
- Systems engineering
- on the fly scripting
- That basically is it
I've been using it professionally for a little over two years as well. At a basic level, it's doing basic API / CRUD pages but, combined with the Phoenix framework, it feels like my time is much more effective (maybe 10% boilerplate, 90% business logic).
On a more advanced level, it also drives websocket communication for our web app, making two-way communication both simple and fast. We also take advantage of its multi-process facilities to drive long running tasks (cron jobs, long-running HTTP requests to slow services, data batching and analysis...) all within the same tool.
It's paid dividends distilling what would otherwise be a complex setup of various tools, each with their own communication interfaces and failure modes, into one simpler system.
Elixir is not "general purpose" like C, Python, or Rust might be, but it doesn't pretend to be. But for writing maintainable, robust, distributed and fault-tolerant systems that do networking, I love it.
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.
What 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.
I 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.
I'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.
We use it at our company for our inventory system. We make hundreds of concurrent http requests per minute and parse json and soap responses that are up to 8 MB in size. We're a tiny team, so while its possible to accomplish this in many tech stacks, functional programming, pattern matching, immutable variables and other Elixir/Erlang features make it easy to release a stable product quickly. This project has been in production for 2.5 years and has been working beautifully.
I've been using Elixir professionally for the last ~5 years on over a dozen projects.
I was originally drawn to it because of its superior support for websockets. It can trivially handle shitzillions* of simultaneous connections and thus make fully realtime, dynamic web applications within reach of small teams of developers. Other languages _can_ do this, but with much more complexity and cost to host and develop.
Currently I'm working on a fintech API that doesn't use websockets :). Elixir is a great choice because its syntax is the perfect balance of being expressive but not dense. I find that describing a solution in my head translates almost perfectly to a series of functions. It's my go-to language for any task outside of scripting.
I'd compare the experience of using Elixir to drinking a glass of lemonade on a warm summer day. Everything seems to happen very easily.
I've been using Elixir for personal projects for the last 2 years; The syntax is refreshing coming from C#/Java world. I learnt so much while learning to program in Elixir especially Pattern matching, functional programming and Actor-model concurrency. Highly recommended
I use it professionally about 90% of the time, and for my own projects almost 100% of the time now. I’ve been in the community for about 6 years and still absolutely love it.
If you want, you can write scripts in it. Just like Python, but that isn't the sweet spot. It is much more suitable for long-running things.
But Nerves is a cool project for Elixir + embedded Linux.
Scenic is a neat project for OpenGL UIs in Elixir.
It can do a lot of different things. You can pick it for the concurrency, the durability or the distributed nature of it. Tons of potential applications. So general purpose-ish. But not as general as some others.
Oh, and the Lumen project is looking to get it to compile to WebAssembly rather than run on a VM which seems like it will also provide a more lightweight way of running it. That both adds a new use-case and potentially improves the places where it can be suitable.
I developed 2 simple web APIs. Built-in caching and background processes simplified development and deployment. The server just needs PostgreSQL and the application release, which is a self-contained deployable artifact. No need for redis, cron or celery...
Now as a team we're developing a more involved application allowing to schedule jobs and services dynamically.
Background processing and real-time updates are among the typical use cases for Elixir/Phoenix.
I used to program professionally in Elixir where we talked to a ton of external providers. So, our app was heavy on the network (http) and Elixir was a really good fit for it. Now, I use it on personal projects.
I'm interested in learning this language but I don't really know what can be built with it ? It is a general purpose language or a more specialised one ?
Thanks for your input