9 ms·
You should try phoenix and elixir, only been playing with them for less than a week and as a long time rails/ruby developer this is what it feels like again.
by jfabre 5y ago
You should try phoenix and elixir, only been playing with them for less than a week and as a long time rails/ruby developer this is what it feels like again.
- Toutouxc 5y agoI'm also a Rails dev, currently doing Advent of Code in Elixir, I haven't tried Phoenix yet, but writing Elixir feels a lot like writing Ruby for the first time. It's the same kind of sexy, of-course-you-can-do-that feeling.
- dnautics 5y agoThat's really funny, my perception of Elixir is generally the sentiment "of course you can't do that". (that's a good thing).
- Toutouxc 5y agoFunny, you're also right. Of course you can't do that weird hacky thing you could totally do in Ruby but maybe shouldn't. I meant something more like "of course there's a function for that with the name you'd expect".
- AlchemistCamp 5y agoFor me Elixir didn't feel too much like Ruby, but Phoenix sure felt a lot like Rails. YMMV since Phoenix has gradually become more and more of its own thing than it felt like in 2016 when I learned it. There's really nothing I miss about Ruby for web dev and Elixir feels like a complete win to me these days. Ruby is still far nicer for unix-y scripting, though.
- bgroat 5y agoIn terms of ease of hosting? I'm considering migrating to Phoenix and my biggest concern is ease of deployment
- SkyPuncher 5y agoI've deployed Rails at a few different companies. I wouldn't quantify it has hard by any means, there's just a lot of configurations to read through and verify every time. Realistically, the defaults are complete sane and could be deployed as is without much change.
- cutler 5y agoAgreed. Immutable functional Elixir is the very opposite programming model of mutable state Ruby OOP.
- dnautics 5y agoI hear fly.io is good.
- jfabre 5y agoI've just tried heroku so far and took me about 30 min to deploy my prototype, but I read there are limitations. Go take a look at fly.io and I think there's also another one that specialize in elixir hosting. Once I understand elixir/erlang better, I will probably want to host there.
- lostcolony 5y agohttps://www.gigalixir.com/ https://www.gigalixir.com/ is likely what you're referencing. Since they're focused on Elixir first it supports a buncha the nice things the BEAM supports, such as native clustering, hot upgrades, and opening a REPL to a running cluster.
- jamil7 5y ago
- dqv 5y agoIt really is a nice experience. The BEAM family of languages was the first for me where doing multiple things at once came natural. It doesn’t require pulling in a library or adding redis or having to worry about shared state. You just add a process to a supervisor.
- machiaweliczny 5y agoYeah and then how do you deploy new version? In practice you still need Redis for most stuff. Also if anyway you have to deploy containers then value of BEAM is dimnished and provably better go with Go.
- sph 5y agoYou don't need Redis if you learn the BEAM and OTP. Elixir runs on top of a distributed VM with builtin clustering. Use it. And I see nothing wrong with having the BEAM run in Docker or K8s. There's some overlap in concepts, but they work at totally different layers. Using the BEAM is like having resilient microservices _inside_ your app with none of the downsides.
- innocentoldguy 5y agoCould you be more specific about the issue you're having with deployments? I've never used Redis in any of my Elixir/Phoenix apps. In cases where I might need something like Redis to store state, I'd reach for a GenServer or maybe Mnesia instead. I've never had an issue with deployments using this strategy. Also, K8s and BEAM work together just fine using libcluster. I'm not a fan of K8s or Docker and don't use either one, but you easily can. The benefit of BEAM is that it can surgically handle a vast array of failures without restarting the node. K8s, on the other hand, will take the pod down and restart it. In many cases, solving a problem with BEAM is like using tweezers to remove a splinter whereas K8s is more like using a sledgehammer.
- cultofmetatron 5y agoas someone on his 3rd year on a startup built on elixir, you're making the right choice. Our system is faster than an equivalent node setup while building features is almost as productive as rails. In some ways better. Plus, if you're goal is realtime or anything heavily websocket based, its going to easily outperform node or rails.
- proxyon 5y agoI simply cannot understand why people care about "fast" anymore with cheap containerization, CI/CD infra and no more dedicated servers. Who cares if its fast? Just add another box. I have this suspicion that anyone who still cares about backend speeds is stuck in the vertical scaling mindset where they need to keep adding cores and processes to a single machine
- coldtea 5y ago>I simply cannot understand why people care about "fast" anymore with cheap containerization, CI/CD infra and no more dedicated servers. Who cares if its fast? People who pay for those extra boxes? Not everybody has your budget (especially when they're building things themselves, on the side, so they aren't even paid).
- montblanc 5y agoGetting to that scale on the side is a nice problem to have. Maybe it shouldn't be on the side anymore.
- proxyon 5y agoA cheap micro container is $5 a month. A cheap dedicated server can be had for $20 a month. Budget is not the issue here.
- true_religion 5y agoAn expensive dedicated server can also be had for $1300 a month. Scaling vertically can take you a long long way before you actually have to start separating services.
- jspash 5y agoI bounced from Rails to Phoenix and couldn't be happier. I've done lots of functional programming before my Ruby days but never saw it coordinated in such a way that made sense to me. And since I only do web dev it was a perfect fit. That said, I'm _really_ excited to get into all the goodness that Rails 7 has to offer. I really thought they lost their way with the whole webpacker debacle. I recently installed a fresh Rails 7 app and the word webpack doesn't even exist anymore! It's like a breath of fresh air to be done with that. Those were some dark days. (I'm exaggerating only a little)
- aantix 5y agoCurrently using Jumpstart Rails ( https://jumpstartrails.com/ https://jumpstartrails.com/ ) with esbuild for a personal project and it's so fast..
- montblanc 5y agoElixir and Ruby have nothing in common as languages and ecosystems, I really don't get why the 2 keep being brought up together. Oh I do get it - whenever someone mentions Ruby some Elixir user will say - hey have u tried Elixir?
- regularfry 5y agoRuby and Elixir do have surface syntax in common, and Rails and Phoenix are clearly from the same conceptual direction. They're more similar than, say, Rails and Spring Boot. This is not surprising: the Elixir folks were fairly high-visibility in the Ruby community before they did Elixir and Phoenix.
- montblanc 5y agoI'll give you surface syntax in common, other than that not much. I think a Rails dev would have a much easier time picking up Django or Laravel than Phoenix. How hard is the switch from Rails to Django? Probably trivial. But Ruby to Elixir is a mind shift.
- deleted 5y ago[deleted]
- eropple 5y agoRuby to Elixir is a mind shift. Rails to Phoenix...I don't think so. But most Rails programmers write Rails, not Ruby, and it's important to differentiate them. Ruby is a big playground. Rails is...not, by design. (This is why I do not like Rails, personally--if I am choosing to write code in Ruby, it's because I expect to need to get weird with it.) Rails->Phoenix omits a lot of the stuff that makes Elixir cool, both in itself and in OTP, but that's not a bad thing and I do think the transfer isn't too onerous for somebody coming purely from Rails.
- montblanc 5y ago> But most Rails programmers write Rails, not Ruby You're really exaggerating.
- danjac 5y agoWhat's Phoenix/Elixir like for deploying these days? When I last seriously played with it a few years ago the development was a lot of fun (and Elixir has influenced how I write and architecture on other platforms) but I remember deployment to production being a pain.
- ch4s3 5y agoIt's pretty easy if you use something like fly or render, anything dockerized really.
- OkayPhysicist 5y ago"mix release" makes it pretty much a breeze. I find myself spending more time setting up a Postgres server than mucking about launching my backend.
- 1_player 5y agoIt's not harder to Dockerise than any other language.