So fibers are a lot like threads but they're more scoped to a task that can be paused and resumed, that's kinda cool
It’s more like goroutines or other lightweight concurrency mechanisms. If threads are OS-level concurrency primitives, fibers are scheduled within Ruby itself, which makes them much more efficient than threads. In fact, I got the following results in HTTP benchmark tests: Go: * Latency under stable load: p95 0.25–5.32 ms, p99 2.20–9.92 ms * Memory: 23–31 MB RSS across HTTP scenarios Ruby: * Latency under stable load:…
Solid Queue 1.6.0 now supports fiber workers
31–40 of 41 posts
Re: Solid Queue 1.6.0 now supports fiber workers
#32Re: Solid Queue 1.6.0 now supports fiber workers
#33Earlier quoted context omitted.
Same path & agreed. The amount of things you do not have to care about with BEAM/Elixir compared to Rails is really interesting.
>BEAM/Elixir compared to Rails Compared to Ruby. Elixir land doesn't have something similar to Rails, and phoenix is not it.
Re: Solid Queue 1.6.0 now supports fiber workers
#34Re: Solid Queue 1.6.0 now supports fiber workers
#35Re: Solid Queue 1.6.0 now supports fiber workers
#36This is a nice update. Is it possible to either have multiple ractors dispatching jobs with fibres or to set up multiple queues with different strategies? E.g. one for IO bound and one for CPU bound? With Sidekiq I’ve had luck having workers running on Truffleruby but generally don’t use it for my main rails apps.
You can, and Carmine (who coded this update) wrote exactly about this on this blog post: https://paolino.me/solid-queue-doesnt-need-a-thread-per-job/ From his article: One backend, two modes Fiber mode isn’t universally better. CPU-bound jobs get nothing from it, and blocking libraries or C extensions that do not cooperate with Ruby’s fiber scheduler stall the reactor. And that’s fine – you don’t have to pick one. As…
Re: Solid Queue 1.6.0 now supports fiber workers
#37As someone who spent 15+ years doing Ruby/Rails, it’s nice to see this land. That said, these days you’ll pry the BEAM from my cold, dead hands. It’s hard to go back to any other concurrency story.
Took me sometime to get used to the magic imports and metaclasses (ruby I know not rails). Curious how well llms navigate this
Re: Solid Queue 1.6.0 now supports fiber workers
#38Re: Solid Queue 1.6.0 now supports fiber workers
#39As someone who spent 15+ years doing Ruby/Rails, it’s nice to see this land. That said, these days you’ll pry the BEAM from my cold, dead hands. It’s hard to go back to any other concurrency story.
How has agentic coding been with rails? What has your experience been like? Took me sometime to get used to the magic imports and metaclasses (ruby I know not rails). Curious how well llms navigate this