3 ms·
Also says at the end: The only caveat is that it doesn't work with Ruby on Rails, because ActiveRecord doesn't support async gem. You can still use it with Rai
by rajangdavis 5y ago
Also says at the end:
The only caveat is that it doesn't work with Ruby on Rails, because ActiveRecord doesn't support async gem. You can still use it with Rails if ActiveRecord is not involved.
- hiyer 5y agoOh, sorry I missed that. Hopefully it will show up in Rails 7 then.
- rajangdavis 5y agoYou're not wrong. If you have external services that are accessible via HTTP, there is some potential to get some performance gains there. You're just limited in terms of some of the core Rails utilities.
- DangitBobby 5y agoI don't understand. Is this misleading then? Did HTTParty have to implement Async for their example to work? > You probably have your preferred HTTP gem, and you may be asking "will it work with Async"? To find out, here's an example using HTTParty, a well-known HTTP client. They then go to show that your "preferred HTTP gem" will just work. How is the ActiveRecord situation different?
- ioquatix 5y agoActiveRecord does work but it’s hugely limited because they have explicit per-thread resource pools which we can’t get around very easily.
- DangitBobby 5y agoOkay, that makes sense.
- joelbluminator 5y agoI'm guessing this problem also applies to Action Cable?