xgeek116
Hello,
We have been using Elixir and Phoneix for creating REST APIs for a few months now.
But I can’t see the benefits of this switch (from nodejs / Nestjs) in terms of performance, speed etc ?
So :
- Can you please tell me why are you using it ? (did you switch from another technology ?)
- What are the major benefits ? To explore them
- Is there a specific domain to used it in ? (AI, mailing etc.) ?
- In terms of deployment, scaling etc. Do you find it efficient ?
Many thanks
Trending in Questions
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
Hi everyone.
My team and I have been working on a fairly modest app based around video streaming and chat, but we’ve landed a customer t...
New
Hello,
I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind.
However, when I launch mix phx.server, I get an error...
New
I really like the adapter patterns that ecto, nebulex, waffle, etc. use and would love find something similar for a key management servic...
New
Hello folks!
So at work, we are seeing some situations where we have to define some “fixed” strings that are used across the codebase in...
New
How Can I Optimise Compile Time Dependencies
I have been building an elixir application for about 2 years now. Many modules and files ha...
New
Other Trending Topics
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
New
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with.
But I don’t use it anymore.
Serverless was the promis...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #ai
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixirconf-us
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
cmo
It’s a joy to develop in. Switched from F#/C# and Python (part way through the project).
The concurrency model of the BEAM. Speed/ease of development, documentation, REPL, community.
Pretty much whatever domain you like. Web, distributed, data, orchestration, embedded, machine learning, desktop, mobile (mobile is in it’s infancy).
Yes it’s efficient. It’s no Rust/C, but you can use those from Elixir. Deployment is fairly trivial.
webuhu
It’s fun. Its design paradigm (or better say the groundwork of Erlang) fits better with my worldview.
It feeds me. As a single developer, deciding most things on my own, nobody ever complained why I’m using it. (switched from former PHP to Ruby / Node.js; & I have never regretted)
I really like dynamic typing for the benefit of fast progress.
I manage to do less bugfixing and more time for progress.
Documentation is wonderful compared to other languages.
Everything network related it’s perfect. But also for IoT (nerves) and starting in AI there are valid options.
You can scale very very far without really thinking about it.
If you really need to scale beyond that, you’ve got a perfect groundwork.
Energy efficient - probably not the best option.
Efficient in terms of development speed - definitely.
Efficient in general - it does its job very good.
kanishka
I switched from other functional languages because Elixir has a larger ecosystem with an emphasis on supporting practical engineering tasks like database backed web applications. Both Ecto and phoenix are nice to use. Mix has also been pleasant.
I would choose it over node/nest because I can spend more time developing and less time upgrading and migrating within churning ecosystem.
dimitarvp
Elixir and Phoenix are good for:
webpack,rollup,esbuildand others.You can use Elixir for likely no less than 80% of all possible projects out there.
It’s at least as fast as the hot paths in JS, so it’s pretty fast. We’re talking average 15-35 milliseconds per request in a web app even when DB is involved.
As others mentioned it’s no C/C++ or Rust but (a) you can use these in your super hot paths if you want, and (b) most apps don’t need such a beastly speed so you’re 98% likely to get away with pure Elixir.
Elixir is a secret weapon. Many people can’t see that because they want to arrive at an already super popular ecosystem. Rest assured however, companies using Elixir are very happy with their choice, and they can get away with hiring less devs, too.
derek-zhou
I am just curious, why switch then? You must be hoping for something, right? What is that something you were hoping for, but didn’t get? Speed? I am not sure an Elixir stack can beat NodeJS for throughput, but I am quite confident that a Elixir stack shall have a better latency histogram, like 99% percentile latency. Is that something you want?
tj0
I think the biggest benefit that no one has mentioned yet is maintainability over multiple years.
The ecosystem is stable yet steadily improving. And you may have noticed already that the language lends itself to making easier to understand code which means less bugs or maintenance headache.
If you want to have a long-running stable system with minimal maintenance cost, I’m not sure how the JS ecosystem can compete.
wanton7
Why are you creating REST APIs? Is it for web app? If that’s the case have you looked at Phoenix LiveView? With it you could avoid creating any kind web facing API and save huge amount of dev time and save even more with simpler web app development model. Also you would be mostly working with Elixir when it comes to UI, so pretty much full stack Elixir.
NaN
I came to Elixir / Erlang from Rust that said…
Concurrency… Previously I worked in fin tech, privately. I built highly concurrent permutation testing / modeling applications. In Rust you can use C bindings and control thread affinity, and must to get a 1-1 model to avoid context switching, etc. BEAM does that for you.
As with any language spinning up threads in Elixir has some overhead with that under consideration… its not as heavy as OS threads. The smaller you can break down a set of problems the more concurrent you can become and provided you don’t loose efficiency due to the cost of threading you can tackle real world problems very quickly.
For example, notwithstanding bloat for piping through Phoenix among other things, I build a file parser that takes semi structured .log files at 11.1gb and can extract data in 33 seconds with ~6 delimiters. (Hardware : 32gb ram, Intel© Core™ i9-10885H CPU @ 2.40GHz × 8, m,2 drive)
Ive not tested this in Rust… but building such an architecture would take much more work… and it still may not be as fast..
dimitarvp
I do both Elixir and Rust, a lot (especially Rust async +
tokiolately), and I know Rust can do this 2.5x - 3.0x faster but yeah, having in mind that it would take longer to develop then it’s not certain it’s worth it to develop such a toy problem in Rust – unless such payloads have to be ingested several times per minute.Nicoo
During 20 years of development, coming from PHP → Node.js → Go → Crystal lang, a little bit of Flutter/Dart, Rust and others. I feel Elixir to be a good middle ground for productivity, maintainability, robustness, ecosystem, community and fun to code.
I find in it the main qualities I liked in other languages, plus the things specific to Elixir / Phoenix / Erlang. There is a lot to do with Elixir.
It’s some benefits but it’s not exclusive, nothing prevents you from doing some Node.js / Next.js for some projects and Elixir for others (this is what I do).