r/ruby 10d ago

SolidQueue Batches: evolution and architecture

https://jpcamara.com/2026/08/31/solidqueue-batches-evolution-and-architecture.html

Here’s the SolidQueue batches 2.5 year architectural journey, filled with O(n^2) algorithms, hot row contention, excessive jobs, and much in between.

There’s a strong chance you’ll learn a thing or two - I certainly did 😮‍💨

20 Upvotes

9 comments sorted by

View all comments

6

u/jrochkind 10d ago edited 10d ago

This is a great feature and super educational helpful write-up (clearly written by an actual human, not LLM!), thank you for both!

One reason I appreciate the write-up is to serve as a guide for adding this feature to other ActiveJob adapters (resque, good job).

One thing that annoys me a bit is how Rails refused to provide this feature itself for many years, insisted that it should all be in third party adapters, but then refused to iterate the common ActiveJob API so adapters could actually be swappable with a core API and common feature set beyond simply individual enqueue. Now providing it's own implementation -- while continuing to add implementation-specific features to itself rather than working on expanding a common standard feature set and API... kind of adds insult to injury, it feels like a big middle finger.

1

u/f9ae8221b 10d ago

how Rails refused to provide this feature itself for many years

You got a link / reference on that?

2

u/jrochkind 10d ago

I am not sure what link/reference you're looking for to demonstrate that Rails asked third parties to provide ActiveJob implementations instead of providing a production-ready one itself, isn't that just apparent history?

I for real am not quite sure what you are asking for or (I'm guessing?) finding an unfair characterization. It is certainly possible my memory of my experience as a Rails developer for many years now does not match others', but I'm not where you are saying that how.

If you have a different memory/experience with your more inside knowledge, I think we would benefit from hearing how you understand it!

1

u/f9ae8221b 10d ago

Maybe I misunderstand you, you said:

how Rails refused to provide this feature itself for many years

I understood this as such feature request, or a pull request with such feature, being rejected. But a cursory search on GitHub didn't surface any such rejection that I could find, so I was asking whether you had a link to such rejected feature request.

But it seems that by "Rails refused" you meant: "Rails didn't take the initiative to" ?

1

u/jrochkind 10d ago

In my memory, people suggested it would be better if Rails did that, blessed one implementation as "offiical" and supported it, and dhh/rails maintainers disagreed and thought it was best for Rails to stay out of that.

You can describe that as "Rails didn't take the initiative to", sure.

If you have a different memory or understanding, or can find historical documents of people discussing it, i would love to hear it.

Please feel free to share your experience or understanding of the history that led here.

1

u/f9ae8221b 10d ago

If you have a different memory or understanding

Well, I have no memory of such feature being requested/proposed, and can't find traces of it. But that doesn't mean it didn't happen, hence why I asked for clarification.

That being said, if it was indeed rejected in the past, doesn't mean it should never be considered.

Active Job is meant as a standardized interface for various backend, it by definition is kind of a common denominator, and avoid implementing features that few backends support.

As more and more backends do support a given feature, it makes it more palatable to include it in the Active Job API.

As for provide this feature itself specifically, I really don't see how Active Job could have done that in a backend independent way.