TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Elixir and Phoenix after two years

264 pointsby bfmabout 4 years ago

12 comments

blunteabout 4 years ago
To add to the author&#x27;s experience, I spent 18 months of production time with Elixir and Phoenix.<p>As he says, the templates are compiled and are blindingly fast compared to Rails.<p>Pattern matching is really really nice when used in the right places (and you&#x27;ll miss it if you go back to Ruby); but it can be overused. There&#x27;s a faction of Elixir folks who attempt to avoid all conditionals and instead seem to prefer multiple dispatch&#x2F;multi-methods to handle different cases. That&#x27;s nice and very concise, because then you can simply call a function and let the pattern matching resolve which of the various implementations you&#x27;ve defined handle it. The big downside here is, as a reader of the code, you have to basically mentally imagine what all cases are covered and what they mean. Sometimes simply reading a switch statement or if&#x2F;else&#x2F;then is much clearer.<p>The super special magic is in the Erlang VM. If you put more energy into learning it and its capabilities, and using it where appropriate, it can shape the structure of your greater system beyond just one webapp; and it can provide a lot of features without you having to cobble together many other (good but independent) solutions.<p>Lastly, single thread performance is basically a dog. In my anecdotal experience, the same external service written with Elixir+Ecto was 25-50% as performant as a Python+SQLAlchemy program. So the lesson there is, find ways to parallelize or otherwise scale your process if it is batch oriented and handling a large volume of data.<p>If you asked me today if I would prefer to use Elixir (and Phoenix) over Ruby and Rails, I would say yes... but honestly mostly just because it&#x27;s a new fascination with different tradeoffs and a better functional story. Function is the past and the future, and it makes your life easier and simpler. Elixir as a language... borrowed too much from Ruby and has too much syntax. It is noisy in a Perl-like way, and perhaps there could be a more concise enhancement of Erlang which would get the job done and not have you spending time visually parsing code.
评论 #26704242 未加载
评论 #26703932 未加载
评论 #26707027 未加载
评论 #26704102 未加载
评论 #26704612 未加载
评论 #26706136 未加载
评论 #26703878 未加载
评论 #26703860 未加载
AlchemistCampabout 4 years ago
It&#x27;s always interesting to read these and I completely agree with the author&#x27;s comments on productivity (both on Phoenix and Rails). It&#x27;s a major reason why I learn and teach Elixir, even though it&#x27;s niche. I genuinely want the skills!<p>One thing to that stood out was how the author found deployment easy, the same as I first did 5 years ago:<p>&gt; &quot;The deployment of Phoenix can be as easy as copying the Mix release I already mentioned to the remote server. You can then start it as a systemd service&quot;<p>I was using Distillery to make the release, but the workflow was virtually identic. Back then, the command to make a Distillery release was even &quot;mix release&quot;, just as this author types for Elixir 1.9+ mix releases now.<p>&gt; &quot;Of course, you can make a light way Docker container too, but maybe you don’t even need to. Mix releases are entirely self-contained (even better than a Java’s JAR)!&quot;<p>Also true!
评论 #26706770 未加载
nichocharabout 4 years ago
I wrote elixir for a couple years in a high scale environment, and I agree with OP on most of what he described. My favorite aspects, ranked: 1) immutable data &#x2F; actor model paradigm 2) mix (super modern build tool that does it all) 3) pattern matching
waynesonfireabout 4 years ago
i&#x27;m not a web developer but enjoy paying attention to this space from the sidelines.<p>elixir and phoenix are wonderful. the phoenix liveview is a fantastic piece of technology; it moves the processing to the backend and allows the web application to be developed in the same language (mostly).<p>i just recently discovered microsoft blazor and it seems like it&#x27;s an even better improvement. compared to liveview, the computation is moved back to the client while the development experience is still a single language. there is no more javascript (at least that&#x27;s the claim) and the platform takes advantage of webassembly to deliver a high performance UX. really compelling stack. I hope it continues to drive the innovation in web development. I&#x27;m so excited to see the javascript eat dust. Maybe light at the end of the tunnel to a horrible 10+ year period of web development.
评论 #26705530 未加载
davidwabout 4 years ago
What are people finding as the real sweet spots for Phoenix?<p>I have used Erlang very successfully in a semi-embedded context, but that&#x27;s quite different from a web server that can usually be scaled horizontally pretty easily.<p>One obvious one is if you have to hold open a lot of concurrent connections like web sockets. It&#x27;d be great for that. Others?
评论 #26703907 未加载
评论 #26703777 未加载
评论 #26703790 未加载
评论 #26703791 未加载
评论 #26704006 未加载
评论 #26705166 未加载
评论 #26706475 未加载
评论 #26704885 未加载
评论 #26703811 未加载
connorlayabout 4 years ago
At work I am building a new internal project in Phoenix Live View and the developer experience so far is sublime. The entire Elixir ecosystem is an absolute joy to use. In the early life of an application, you get the incredible productivity of Ruby on Rails, while building on the battle-tested OTP platform that can scale with your business. The language itself combines the best of Erlang, Clojure, and Ruby all under one roof.
sbaildonabout 4 years ago
Big fan of Elixir. First and third party libraries are typically very high quality; community support is great; and documentation is best in class.<p>Right now, I’m trying to find a way to speed up builds in CI because they’re the biggest bottle neck to deploying. Building an umbrella with 5 apps, 3 of which are phoenix, leveraging parallelised docker buildkit, will still take 8~ minutes.
评论 #26705407 未加载
datavirtueabout 4 years ago
&quot;Elixir is not an object-oriented language. We practically only write modules and functions. This helps tremendously in understanding code...&quot;<p>Sign me up. I hold hope that Elixer is the thing that starts pushing the knife into OOP. Microsoft has added a ton of features to make functional style a thing in C#, and nearly everyone hates Java...so maybe the stars are aligning.
评论 #26707206 未加载
mstipeticabout 4 years ago
I have a dream that one day most of our software will be built with something like elixir and most of the saas products we&#x27;re using now (octa, zapier, newrelic...) will be just installable modules with a simple api
JediPigabout 4 years ago
last hype train i joined, was scala... this language reminds me of scala... a HORRIBLE developer experience, yet we zerglings are happy to be lemmings to someone&#x27;s &quot;best idea evah&quot;<p>This brings up the pain of scala... only this time im not going to join the fan club.
nesarkvechnepabout 4 years ago
I wish more Node.js people shake off their Stockholm syndrome and check out Elixir and Phoenix.
评论 #26705004 未加载
评论 #26709963 未加载
joelbluminatorabout 4 years ago
Oh no same crap of mixing hash symbol and string keys as in ruby? You didnt have to borrow that Elixir! Does Elixir also have HashWithIndifferentAccess?
评论 #26704293 未加载
评论 #26704569 未加载
评论 #26706848 未加载
评论 #26704076 未加载
评论 #26704289 未加载