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

Other hubs