Adding Event Sourcing to an existing PHP project (for the right reasons)
summary
Shows how to add event sourcing to an existing Symfony/PHP codebase by storing events as MongoDB documents with four fields (type, family, payload, metadata), using Symfony events as command hooks, and queuing writes through RabbitMQ to avoid blocking. Describes a runner+projection+executor pipeline that replays millions of events into projection pipelines, with delayed writes via a RabbitMQ queue, cron-driven runs every 5 minutes (~4.5 minute run windows), and short-lived processes to mitigate memory leaks in the PHP MongoDB extension.
AI-written summary · about
chapters (14)
- 0:00Talk introduction
- 1:03What is Event Sourcing
- 4:15Event Sourcing vs CQRS
- 6:26Adding Event Sourcing to existing
- 8:11FPN project context
- 11:42Event Sourcing with MongoDB
- 20:12Event projections and aggregation
- 27:13Event processing logic
- 31:04Stateless architecture robustness
- 32:07Technical issues and solutions
- 35:38Event Sourcing benefits
- 38:26Projection reuse and reports
- 40:10Maintenance and debugging benefits
- 40:32Symfony Event Sourcing bundle
related talks
43mAdding Event Sourcing to an existing PHP project (for the right reasons)
25mCQRS and Event Sourcing: May the Event Be with You
58mPHP + ES + CQRS + DDD = ? An integrated strategy
32mEvent Sourcing in Laravel
32mEvent Sourcing in Laravel with EventSauce
40mEvent Sourcing with Laravel
02h 53mPractical design patterns in PHP (Part 3)
29mprooph/micro and FPP - less is more
