Living in your own bubble
summary
Legacy system with ~50 million cow records keeps nightly processing until 10am; new law requires faster, real-time category recalculation. The team builds a separate Bubble Context that reads legacy DB via an anti-corruption layer, queues events (RabbitMQ/Rebus style) and applies DDD rules, using Gherkin specs to validate behavior. They implement birth/age/death/move handlers, run existing acceptance tests against the new service, and match legacy outputs so the replacement works end-to-end.
AI-written summary · about
chapters (24)
- 0:00Introduction and overview
- 1:06Working with legacy code
- 2:35Introducing the agricultural domain
- 5:07Legacy system challenges
- 8:13Domain complexity and team issues
- 10:25Specification by example
- 13:33Legacy code and database functions
- 17:32Moving forward with solutions
- 18:14Introducing bounded contexts
- 22:51Strangler fig pattern
- 24:58Implementing the bubble context
- 25:20Anti-corruption layer explained
- 29:10Unit tests and event handling
- 34:22Event processing flow
- 35:06Birth handler implementation
- 37:15Carved handler and domain logic
- 39:02Handling death events
- 42:04Departure handler development
- 49:44Testing and validation
- 50:53Key takeaways and future directions
- 52:19Modernizing legacy systems
- 53:23Ubiquitous language benefits
- 54:05Specification by example impact
- 54:46Closing and Q&A
