Beyond Validates_Presence_of: Ensuring Eventual Consistency
summary
Explains why moving billing into background jobs breaks :validates_presence_of and how to handle retries, idempotence, circuit breakers and exponential backoff; shows the concrete choice to store job queue in Postgres so deletes can’t outrun creates; recommends adding timestamps per service call and using saga orchestration, SQL audits or Kafka event streams; compares tradeoffs, failure modes and real remediation scripts and notes which approaches require heavy engineering.
AI-written summary · about
chapters (9)
- 0:00Start
- 3:00Tools for data correctness
- 3:16Database constraints and indexes
- 13:01Roll Forward
- 14:07Transactions
- 16:39Add Timestamps
- 17:41Code Organization
- 28:57Buying a Heroku Add-on
- 31:33Event Stream challenges
related talks
26mValidation in an eventually consistent world
23mRethinking Message Queues: PostgreSQL's Role
34mBeyond CRUD: the PostgreSQL techniques your Rails app is missing.
30mQueues in PostgreSQL
41mConcurrency, Scalability and Transactions -- Myths and Surprises
40mCan I break this?: Writing resilient “save” methods
38mSystems playing nice: Building resilient integrations in an unpredictable world
29mServices, Scale, Backgrounding and WTF is going on here?!???
