One of the biggest issues we have to address when using a microservices architecture is how to share data between services while maintaining availability and consistency (CAP theorem).
Event-Driven Architecture (EDA) focuses on the generation and handling of event notifications. EDA allows for services to be highly decoupled.
Event Sourcing is a pattern that allows the implementation of an event-driven system. Instead of storing the current state of an application’s data, an append-only event store is used to store any events triggered on the data, where an event represents a series of changes made to the data. The store becomes the sole authority regarding the state of the application.
This provides us with several advantages:
– Data consistency: Store is the single source of truth
– Performance: Only one data source needs to be updated
– Atomic operations and immutability
– Scalability: With Append-only architectures, there are fewer locks to deal with.
What are the key takeaways from this talk?
How to solve the common problem of sharing data between microservices while preserving availability, consistency and scalability.