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
Hello!
Suppose you are building workflow (order / task / payment) processing system with the following requirements:
Each workflow con...
New
Hey guys,
I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly
Do you guys have any suggestions what is the best prac...
New
Hello!
Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app.
I creat...
New
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
Hello,
I’m developing a online persistent chat system (what’s app) like using elixir/dynamodb/aws for a mobile app(flutter).
The diffic...
New
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New
I think I’ve found a small improvement I could contribute to <%= web_namespace %>.CoreComponents (installer/templates/phx_web/compo...
New
Other Trending Topics
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
There are three potential reasons for members of this forum to have a look at https://vutuv.de
You are tired or annoyed of LinkedIn.
Yo...
New
Aludel - LLM Evaluation Workbench
Aludel is an embeddable Phoenix LiveView dashboard for evaluating and comparing LLM prompts across mult...
New
Latest Phoenix Threads
Latest on Elixir Forum
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #ai
- #elixirconf-us
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #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).