Topic hub · Ruby and Rails

Ruby and Rails investigations

Curated Ruby and Rails investigations on application design, performance, concurrency, databases, deployment, assets and maintainability.

About this collection

Ruby and Rails are treated here as working systems rather than collections of isolated idioms. The investigations follow objects across process boundaries, transactions, queues, HTTP streams, asset pipelines and database queries. Several begin with a small surprise: a job that ran before commit, an eager load that changed query behavior, a profiler report that implicated object shape rather than raw traffic, or a deployment layout whose simplicity hid shared infrastructure.

Read together, the notes show where framework conventions help and where the underlying Ruby, Unix, HTTP or PostgreSQL model still matters. The curated entries are useful starting points; the chronological list keeps the narrower experiments visible, including language design, Fibers, Ractors, C extensions and comparisons with other runtimes. This is a map of practical trade-offs, not a substitute for version-specific Rails documentation or measurement in the application being changed.

Start here

  1. The Rails job that ran before checkout committed Why a Rails background job can read old database state when checkout is still committing, how nested transactions hide the race, and how to fix it.
  2. Callbacks, invariants, and durable events in Rails Where Rails business rules can live, when callbacks are acceptable, and when state changes need durable event and delivery records.
  3. Using memory_profiler to reduce Rails memory pressure How to use memory_profiler as part of a broader Rails memory investigation: allocations, query shapes, object graphs, and practical fixes.
  4. Zero-allocation HTTP servers in Ruby terms Zero-allocation HTTP servers through Ruby examples: OxCaml's httpz experiment, span-based parsing, GC pressure, and pipelining.
  5. SICP ideas in practical Ruby How SICP design ideas appear in Ruby through blocks, higher-order methods, data barriers, streams, state, and small languages.

All investigations

  1. How Clojure complements Ruby
  2. Ruby, Rails, COVID and the LLM wave
  3. APoSD and Clean Code from a Ruby point of view
  4. Callbacks, invariants, and durable events in Rails
  5. Rails includes, find, and eager loading
  6. SICP ideas in practical Ruby
  7. Supply-chain attacks, npm, Laravel, and Ruby teams
  8. PostgreSQL temp files and Rails pagination
  9. A Ruby AVIF conversion script with adaptive quality
  10. The Rails job that ran before checkout committed
  11. Brotli, gzip, and Propshaft in Rails
  12. Ruby, Go, Rust, and Zig for simple CLI apps
  13. Zero-allocation HTTP servers in Ruby terms
  14. Optimistic locking for editing a CRUD app
  15. Deploying multiple Rails apps on one VM with Capistrano
  16. Propshaft versus Sprockets in Rails assets
  17. Private and protected methods in Ruby
  18. SSE, proxy buffering, and long-polling fallbacks
  19. Service objects and Rails conventions
  20. Handling Server-Sent Events from a Rails backend
  21. SIMD string processing in a Ruby C extension
  22. Ruby Fibers and cooperative concurrency
  23. Relational algebra, SQL, and Arel
  24. Ruby, Lisp ideas, and Ripper S-expressions
  25. Rendering Hiccup-style HTML from JRuby
  26. Using memory_profiler to reduce Rails memory pressure
  27. Weighted full-text search and trigrams in PostgreSQL
  28. dRuby, Unix pipes, and forked worker pools

Other hubs