<story><title>Rails adds support for Fiber-safe ActiveRecord ConnectionPools</title><url>https://blog.saeloun.com/2022/02/23/rails-fiber-safe-connection-pools.html</url></story><parent_chain><item><author>midrus</author><text>I really hope some sanity comes back to this industry. Rails and Laravel are the best tools by far to build like... 90% of what we build on the internet (Other 10% being offline first apps and stuff like figma, etc).&lt;p&gt;It just hurts to see how my team, and previous teams I worked with struggle with all the SPAs and microservices, and Go backends and GraphQL nonsense when what we&amp;#x27;re doing are just fancy crud forms with maybe one or two really interactive widgets overall.&lt;p&gt;So much time and money wasted just for following fashion.</text></item><item><author>nickjj</author><text>This is really exciting news. Lots of folks slam Rails for being slow and inefficient despite there being massive sites using it at scale (Shopify, GitHub, etc.) with very commendable response times and uptime.&lt;p&gt;At the same time you can still run a single $20 &amp;#x2F; month server for &amp;quot;smaller&amp;quot; apps even with Rails + Sidekiq + Action Cable + Postgres + Redis all running on the same server to power your solo developed SAAS app with thousands of customers while having a p95+ response time of &amp;lt;= 100ms.&lt;p&gt;PRs like this just mean things are going to get even better than they already are and is probably a precursor to converting a bunch of Rails internals to use Fibers over time. The best part about it is I as an end user don&amp;#x27;t need to know the details, I just know my CPU and memory usage will go down over time while runtime performance continues to get better than it already is.&lt;p&gt;I wonder how long it&amp;#x27;ll take before the pendulum swings so hard back into the direction of Rails that it shatters even the original growth spikes of Rails from all those years ago. With Hotwire Turbo being a thing now it&amp;#x27;s very possible to build very nice feeling apps without writing a ton of JS while leveraging good old HTML and HTTP with sprinkles of Stimulus and WebSockets.&lt;p&gt;The more I think about it, the more I talk myself into believing Ruby &amp;#x2F; Rails really are a once in a generation combination. It&amp;#x27;s truly that good for getting real shit done in a pleasant way.</text></item></parent_chain><comment><author>berkes</author><text>There is no &amp;quot;sanity&amp;quot; lost, nor are the masses &amp;quot;following fashion&amp;quot;. That is unfair to those who put real thought, time and effort in their software.&lt;p&gt;Rails has its strong sides. And its weak sides. Trade-offs are to be investigated. An extremely weak side of Rails, is how it is very tightly coupled to the database. Which -its strong side- is perfect for &lt;i&gt;simple&lt;/i&gt; CRUD applications. But it falls down quickly when you have much more event-driven or domain-logic heavy applications.&lt;p&gt;And yes, I &lt;i&gt;know&lt;/i&gt; Rails can be used for this. But just like I can, potentially write a web-app in Bash, it&amp;#x27;s not where it shines and it will bring you pain.&lt;p&gt;For Rails, the pain quickly becomes evident when a lot of business-rules are spread out through &amp;quot;Validators&amp;quot;. Or when migrations become a pain to manage. Or when you have more and more complexity moved into async jobs. All of these are signs that the CRUD-nature and&amp;#x2F;or the tight database-coupling is harming you more than helping you.&lt;p&gt;Choosing some other architecture that better fits your domain is not &amp;quot;following the latest fashion&amp;quot;. It&amp;#x27;s sane, proper due-diligence.</text></comment>
<story><title>Rails adds support for Fiber-safe ActiveRecord ConnectionPools</title><url>https://blog.saeloun.com/2022/02/23/rails-fiber-safe-connection-pools.html</url></story><parent_chain><item><author>midrus</author><text>I really hope some sanity comes back to this industry. Rails and Laravel are the best tools by far to build like... 90% of what we build on the internet (Other 10% being offline first apps and stuff like figma, etc).&lt;p&gt;It just hurts to see how my team, and previous teams I worked with struggle with all the SPAs and microservices, and Go backends and GraphQL nonsense when what we&amp;#x27;re doing are just fancy crud forms with maybe one or two really interactive widgets overall.&lt;p&gt;So much time and money wasted just for following fashion.</text></item><item><author>nickjj</author><text>This is really exciting news. Lots of folks slam Rails for being slow and inefficient despite there being massive sites using it at scale (Shopify, GitHub, etc.) with very commendable response times and uptime.&lt;p&gt;At the same time you can still run a single $20 &amp;#x2F; month server for &amp;quot;smaller&amp;quot; apps even with Rails + Sidekiq + Action Cable + Postgres + Redis all running on the same server to power your solo developed SAAS app with thousands of customers while having a p95+ response time of &amp;lt;= 100ms.&lt;p&gt;PRs like this just mean things are going to get even better than they already are and is probably a precursor to converting a bunch of Rails internals to use Fibers over time. The best part about it is I as an end user don&amp;#x27;t need to know the details, I just know my CPU and memory usage will go down over time while runtime performance continues to get better than it already is.&lt;p&gt;I wonder how long it&amp;#x27;ll take before the pendulum swings so hard back into the direction of Rails that it shatters even the original growth spikes of Rails from all those years ago. With Hotwire Turbo being a thing now it&amp;#x27;s very possible to build very nice feeling apps without writing a ton of JS while leveraging good old HTML and HTTP with sprinkles of Stimulus and WebSockets.&lt;p&gt;The more I think about it, the more I talk myself into believing Ruby &amp;#x2F; Rails really are a once in a generation combination. It&amp;#x27;s truly that good for getting real shit done in a pleasant way.</text></item></parent_chain><comment><author>hellcow</author><text>Calling it &amp;quot;fashion&amp;quot; is disingenuous.&lt;p&gt;I ran Rails in production years back and swore it off then. We had constant memory leaks that seemingly came from Rails itself, and the only solution we had was &amp;quot;just restart the server.&amp;quot; We also had no typing then, so every bug was a runtime bug. Hopefully it&amp;#x27;s improved in the years since...&lt;p&gt;I&amp;#x27;ve been happily running Go backends for the past 7 years now, and they&amp;#x27;re stable and fast and easy to refactor.</text></comment>