Building Event-Driven Microservices with Event Sourcing and CQRS
Explore the principles of Event Sourcing and CQRS in microservices architecture through a 45-minute conference talk. Dive into the benefits of storing past behaviors as event sequences instead of current entity states, including accurate audit logging, history revisions, and flexible schemas. Learn how to model data for Event Sourcing and improve system performance by segregating reads and writes using specialized read models. Examine a real-life example of an invoice management app built at Wix to understand how these concepts apply to event-driven microservices. Gain insights into accidental complexity, data loss by design, CRUD scalability challenges, and CQRS optimization. Discover the importance of business domain in driving consistency levels, data validation, and locking mechanisms. Explore lessons learned, including the need for small steps, avoiding top-level architecture changes, and being cautious when modifying event definitions in code.