Recent Snippets

2025-01-07: A silly optimization: adding opt_respond_to to the Ruby VM, part 6

2024-12-31: Defining an instruction: adding opt_respond_to to the Ruby VM, part 5

2024-12-28: Peephole optimizations: adding `opt_respond_to` to the Ruby VM, part 4

2024-12-26: The Ruby Syntax Holy Grail: adding `opt_respond_to` to the Ruby VM, part 3

2024-12-23: Finding the compiler: adding `opt_respond_to` to the Ruby VM, part 2

SolidQueue Batches: evolution and architecture

When Rosa first released SolidQueue, she did a fantastic talk on the internals of how it works and what trade-offs she made when building it. You should give it a watch. It’s where I first learned how the SolidQueue approach works, and why it performs as well as it does. I wrote the batch …

A Guide to using Batches in SolidQueue

SolidQueue is the default queue system shipped with Ruby on Rails. It’s a great choice for your jobs, and works out of the box with Postgres, SQLite and MySQL. It took two and a half years, but as of SolidQueue 1.7, it supports batches of jobs as well! We’ll dig into what batch support means for …

When good threads go bad

👋🏼 This is part of series on concurrency, parallelism and asynchronous programming in Ruby. It’s a deep dive, so it’s divided into several parts: Your Ruby programs are always multi-threaded: Part 1 Your Ruby programs are always multi-threaded: Part 2 Consistent, request-local state Ruby methods …

Consistent, request-local state

👋🏼 This is a series on concurrency, parallelism and asynchronous programming in Ruby. It’s a deep dive, so it’s divided into 12 main parts: Your Ruby programs are always multi-threaded: Part 1 Your Ruby programs are always multi-threaded: Part 2 Consistent, request-local state Ruby methods are …

Your Ruby programs are always multi-threaded: Part 2

👋🏼 This is a series on concurrency, parallelism and asynchronous programming in Ruby. It’s a deep dive, so it’s divided into 12 main parts: Your Ruby programs are always multi-threaded: Part 1 Your Ruby programs are always multi-threaded: Part 2 Consistent, request-local state Ruby methods are …

Your Ruby programs are always multi-threaded: Part 1

👋🏼 This is a series on concurrency, parallelism and asynchronous programming in Ruby. It’s a deep dive, so it’s divided into 12 main parts: Your Ruby programs are always multi-threaded: Part 1 Your Ruby programs are always multi-threaded: Part 2 Consistent, request-local state Ruby methods are …