3 ms·
Yea, I am tackling Elixir to avoid learning tech specifically designed for solving scaling issues with languages not made for scaling. Elixir is wonderful for t
by zwnow 1y ago
Yea, I am tackling Elixir to avoid learning tech specifically designed for solving scaling issues with languages not made for scaling. Elixir is wonderful for this. How's Ruby considering scaling and performance? I always compare Ruby on Rails to Laravel for some reason
- freedomben 1y agoI did Ruby on rails professionally for many years, and have also done elix Phoenix professionally for many years now, and I would advise you to continue with Phoenix. Getting really good at elixir and Phoenix can make you an extremely powerful and employable developer. Should you find yourself in a situation where you need to switch to Ruby and rails, you will have a huge leg up because rails follow as many of the same patterns as Phoenix, and the Ruby language is very simple to learn for someone coming from elixir. Just my two cents of course
- afavour 1y agoYou typically choose Ruby on Rails because you want to get up and running fast, not because you want performance. That said, in most RoR codebases the performance bottleneck is networking, database etc not the language itself. As and when e.g. the database becomes a bottleneck there are various mitigations available to you.
- ljm 1y agoIn a way, Rails is the OG for rapid application development considering its influence and impact on tech startups over the 2010s. These days you'd build a blog in 20 minutes by vibe coding it in Cursor and deploying it on to some serverless edge compute platform or something. Almost 20 years ago you'd build a blog in 20 minutes by installing rails and running a few commands on the terminal to generate the UI, backend, DB schema/migrations and all that, and then `git push heroku master` to see it deployed on the web. Quickly enough you'd git gud and wouldn't need to lean on the scaffolding tools. At least in London there's still a pretty strong market for it, and the overlap in syntax between Ruby and Elixir is enough that you could take your pick (the Elixir shops I know of will look for experienced Ruby engineers by default because the pool of Elixir engineers is much smaller).
- Lio 1y ago20 minutes? Who’s got time for that? The original DHH demo video[1], from 19 years ago, was a blog in 15 minutes. AI is clearly rubbish! :P 1. https://m.youtube.com/watch?v=Gzj723LkRJY https://m.youtube.com/watch?v=Gzj723LkRJY
- ezekg 1y agoShopify, GitHub, Intercom, among others are built on Ruby/Rails. I think it'll scale fine.
- dismalaf 1y ago> How's Ruby considering scaling and performance? Shopify, Github, AiBnB, Square, Instacart, etc... There's more big apps/websites using Rails than Elixir or Phoenix...
- zwnow 1y ago> There's more big apps/websites using Rails than Elixir or Phoenix... Sure, but thats a weak argument considering Ruby on Rails is considerably older than Phoenix and adoption is in decline while Phoenix grows.
- dismalaf 1y agoIt's proof that it works. The things exist.
- aeonflux 1y agoCould you point out where do you get your data from? Anything to back-up your claims that Rails is in decline and Elixir/Phoenix is growing? For a time not long ago I was heavily into looking for an Elixir gig, but couldn't really find offers, while there were still tons of offers for Rails development.
- pmontra 1y agoYou scale Rails by adding servers (or containers) behind a load balancer and by scaling up the database server in the same ways you would do it for another server technology, including Phoenix. By the way, I've seen many more Rails projects than Phoenix ones but they share the same general architecture: (server or containers) + db. The only difference is that we usually run Ruby jobs inside sidekiq and we use Tasks or GenServers for Elixir jobs. We wrote our own code to restart and try again jobs that eventually failed (we can't lose a job because of a deploy or a reboot.)
- zwnow 1y agoWell most Javascript based apps ive seen utilize stuff like Redis for scaling, this for example isn't needed with Elixir.
- pmontra 1y agoYes, Redis is usually the backing store for Rails' Sidekiq. With Elixir we stored the job data in a PostgreSQL table and started a process with the id of that record as argument. When we had to restart the BEAM (deploy, reboot, anything) a process would look at that table and start a process for every record not marked as complete. If a process failed too many times and its supervisor gave up on it, we could restart it manually by calling a function in the console with the record id as argument. Or we could start all the processes of a given type at once, or all of them. So we basically wrote a small subset of Redis and of Sidekiq admin.