News for hackers. Stuff that matters.
Re:Rails adds support for Fiber-safe ActiveRecord Connection... by tiffanyh on Thursday February 24, 2022 @09:02AM (#30454755)
Have you looked at Phoenix?

A ton of new Rails features/development you mentioned is inspired by work the Phoenix team built, who were also once core Rails contributors.

https://www.phoenixframework.org/

Re:Rails adds support for Fiber-safe ActiveRecord Connection... by weatherlite on Thursday February 24, 2022 @09:08AM (#30454826)
What does Phoenix have to do with it? The guy can't say anything good about Rails without us talking about Phoenix? Have you looked at Django? Have you looked at Laravel? Have you looked at Go? Rust? Node? We get it everyone is doing web frameworks noawdays, Rails isn't unique.
Re:Rails adds support for Fiber-safe ActiveRecord Connection... by throwamon on Thursday February 24, 2022 @09:29AM (#30455103)
Sheesh, why so much hostility? Elixir and Phoenix were created precisely to address Ruby's and Rails' shortcomings, and by noteworthy Rails contributors no less. They're incredibly good (paradigm-shifting even), the community is great, etc. They're also not mainstream yet, so it makes perfect sense to mention them. Just because you're tired of hearing about something it doesn't mean there aren't (lots of) people who have never heard about it. (See https://xkcd.com/1053/)

In fact, if you're tired of hearing about this, you might want to expand your bubble a little bit.

(I have no involvement with them, just a passerby.)

Re:Rails adds support for Fiber-safe ActiveRecord Connection... by dnautics on Thursday February 24, 2022 @09:52AM (#30455370)
For starters, phoenix has had "support" for the equivalent of fiber-safe database connection pools forever, and it's advanced enough that you can concurrently run tests that checkout database "sandbox" transactions and you can spawn a task off it "that runs in another fiber" which will still know which database sandbox to use and with about 10LOC you can make it so your integration test can issue an http request to the server and the "fiber" that handles the request operates in the same sandbox. Oh, and this pattern is part of the standard library so it will work with just about any other thing that needs to share global state (like mocks), not just databases.
Re:Rails adds support for Fiber-safe ActiveRecord Connection... by brightball on Thursday February 24, 2022 @09:33AM (#30455139)
The reason he mentions Phoenix and Elixir is because it differentiates from every other language and framework due to its concurrency and memory models. Those models make hard things easy that you simply cannot do in other web frameworks.

That is why he mentions it. It’s not “another web framework”, it’s changing the expectations for what you should be able to do without all of the crazy plumbing that was mentioned earlier.

He replied with that because it’s quite literally the answer to the problems pointed out. Not “another web framework, k thanks”.

Re:Rails adds support for Fiber-safe ActiveRecord Connection... by tempest_ on Thursday February 24, 2022 @09:24AM (#30455034)
Phoenix is often mentioned in conjunction with Rails because Elixir's syntax is often described as "Ruby like" and the guy who made Elixir is(was?) a member of the rails core team.
Re:Rails adds support for Fiber-safe ActiveRecord Connection... by gregors on Thursday February 24, 2022 @02:13PM (#30458899)
As someone who uses and likes Elixir and Ruby, the syntax is more accurately described as Erlang and Ruby in a car crash.
Re:Rails adds support for Fiber-safe ActiveRecord Connection... by weatherlite on Thursday February 24, 2022 @09:25AM (#30455063)
Yeah I get it, thanks. I still think it would be nice to stop it.
Re:Rails adds support for Fiber-safe ActiveRecord Connection... by RexM on Thursday February 24, 2022 @10:48AM (#30456034)
Stop discussing technologies that were made specifically to address the short-comings of the topic of the article?
Re:Rails adds support for Fiber-safe ActiveRecord Connection... by robertlagrant on Friday February 25, 2022 @04:18AM (#30465250)
> Yeah I get it, thanks. I still think it would be nice to stop it.

It would be nice for the rest of us to have informed, considered responses in comments rather than little rants. But it seems as though no one's getting what they want today.