Extending Gems - Patterns and Anti-Patterns of Pluggable Gems
summary
Library authors encounter concrete failure modes and fixes: New Relic RPM is broken by internal monkey‑patches and by single shared instrumenters that get tromped; the practical fix is explicit extension points and allowing multiple subscribers (e.g. turning an after_fork hook into an after_fork array). Middleware composition works but needs middleware introspection to avoid surprising environment mutations. Forking kills background threads and copies locks, so provide fork hooks and restart threads. Also: qualify standard classes, document extension points, and use semantic versioning.
AI-written summary · about
chapters (14)
- 0:00Start
- 3:52Where We're Going
- 5:12activerecord
- 5:47Dependency Injection
- 9:23Delayed::Job
- 11:46Resque
- 19:51Sidekiq
- 21:47Forks and Daemons
- 22:02Forking
- 23:30Add Threads
- 24:35Enter the Lock
- 26:18unicorn
- 34:35yml + ERB
- 39:14Where We've Been








