The Circle Of Lifecycle Events
summary
Argues that the crucial claim is: callbacks should only modify their own model, not create or update associated records; uses ActiveRecord::Transaction for atomic multi-record creates and extracts signup logic into service objects or procedures so controllers stay skinny; for distributed systems it publishes lifecycle events via RabbitMQ and Kafka; reports these patterns hold at scale (MX-style platforms serving 20+ million users) and prevent orphaned records, race conditions, and brittle callbacks.
AI-written summary · about
chapters (27)
- 0:00Introduction
- 2:00What are Lifecycle Events
- 4:29My favorite tech talk
- 13:43Pro Tip
- 15:42Why No MultiModel Modification
- 16:41Instagram Picture
- 18:22Credit Score Example
- 26:44Service Object
- 29:02Versioning
- 29:33Service Objects
- 30:17Pros
- 31:50Cons
- 33:09Handling Errors
- 33:59Where Does Our ModelsControllers Live
- 35:21Distributed Lifecycle Events
- 36:07Where Before
- 36:32Trust
- 37:06Technical Tools
- 37:36Subscribe Model
- 39:13Publish Model
- 39:40Pseudocode
- 40:57The Pros
- 42:07The Cons
- 44:35Review callbacks
- 45:20Service Objects Procedures
- 46:03Distributed Messaging
- 46:33Conclusion








