7 Reasons why your microservices should use Event Sourcing & CQRS
Event Sourcing & CQRS offers a compelling and often controversial alternative for persisting data in microservice systems environments. This alternate approach is new for most of us, and it is justified to have a healthy level of skepticism towards any shiny new and often over-hyped solution. However, what is interesting is that this is so new that even the champions and evangelists often overlook the real benefits provided by this new way of capturing and storing data.
In this talk, we will look at 7 of the top reasons for using Event Sourcing & CQRS. These reasons covered go beyond the often referenced benefits, such as event stores are natural audit logs, or offering the ability to go back in history to replay past events. The primary goal of this talk is to flip your view from limited to no use of ES & CQRS to an alternate perspective of what you give up when you elect to not use it as the go-to persistence strategy.
7. CQRS - Command Query Responsibility Segregation
System of loosely coupled services
1. Independently deployable
2. Owns its schema
3. API only access to data
8. CQRS - Command Query Responsibility Segregation
System of loosely coupled services
1. Independently deployable
2. Owns its schema
3. API only access to data
9. CQRS - Command Query Responsibility Segregation
System of loosely coupled services
1. Independently deployable
2. Owns its schema
3. API only access to data
10. CQRS - Command Query Responsibility Segregation
System of loosely coupled services
1. Independently deployable
2. Owns its schema
3. API only access to data
12. CQRS - Command Query Responsibility Segregation
Are you crazy?
13. 0. What is Event Sourcing & CQRS
1. Smooth transition from DDD & Event Storming to implementation
2. Reduce service coupling
3. Break the read versus write performance bottleneck
4. Elevate the concurrency barrier
5. Simplify and harden messaging
6. Eliminate service coupling
7. Graduate from the IT Nursery
7 Reasons why your microservices should use ES & CQRS
14. 0. What is Event Sourcing & CQRS
1. Smooth transition from DDD & Event Storming to implementation
2. Reduce service coupling
3. Break the read versus write performance bottleneck
4. Elevate the concurrency barrier
5. Simplify and harden messaging
6. Eliminate service coupling
7. Graduate from the IT Nursery
7 Reasons why your microservices should use ES & CQRS
0Reason
26. 0. What is Event Sourcing & CQRS
1. Smooth transition from DDD & Event Storming to implementation
2. Reduce service coupling
3. Break the read versus write performance bottleneck
4. Elevate the concurrency barrier
5. Simplify and harden messaging
6. Eliminate service coupling
7. Graduate from the IT Nursery
7 Reasons why your microservices should use ES & CQRS
1Reason
31. 0. What is Event Sourcing & CQRS
1. Smooth transition from DDD & Event Storming to implementation
2. Reduce service coupling
3. Break the read versus write performance bottleneck
4. Elevate the concurrency barrier
5. Simplify and harden messaging
6. Eliminate service coupling
7. Graduate from the IT Nursery
7 Reasons why your microservices should use ES & CQRS
2Reason
54. 0. What is Event Sourcing & CQRS
1. Smooth transition from DDD & Event Storming to implementation
2. Reduce service coupling
3. Break the read versus write performance bottleneck
4. Elevate the concurrency barrier
5. Simplify and harden messaging
6. Eliminate service coupling
7. Graduate from the IT Nursery
7 Reasons why your microservices should use ES & CQRS
3Reason
55. Break the read versus write performance bottleneck
Optimize
Reads?
Writes
62. Break the read versus write performance bottleneck
Eventually consistent
63. 0. What is Event Sourcing & CQRS
1. Smooth transition from DDD & Event Storming to implementation
2. Reduce service coupling
3. Break the read versus write performance bottleneck
4. Elevate the concurrency barrier
5. Simplify and harden messaging
6. Eliminate service coupling
7. Graduate from the IT Nursery
7 Reasons why your microservices should use ES & CQRS
4Reason
74. 0. What is Event Sourcing & CQRS
1. Smooth transition from DDD & Event Storming to implementation
2. Reduce service coupling
3. Break the read versus write performance bottleneck
4. Elevate the concurrency barrier
5. Simplify and harden messaging
6. Eliminate service coupling
7. Graduate from the IT Nursery
7 Reasons why your microservices should use ES & CQRS
5Reason
75. • at-most-once
• at-least-once
• exactly-once
Semantics of delivery
(maybe-once)
(once-or-more)
(essentially-once)
Simplify and harden messaging
81. 0. What is Event Sourcing & CQRS
1. Smooth transition from DDD & Event Storming to implementation
2. Reduce service coupling
3. Break the read versus write performance bottleneck
4. Elevate the concurrency barrier
5. Simplify and harden messaging
6. Eliminate service coupling
7. Graduate from the IT Nursery
7 Reasons why your microservices should use ES & CQRS
6Reason
90. 7 Reasons why your microservices should use ES & CQRS
7
0. What is Event Sourcing & CQRS
1. Smooth transition from DDD & Event Storming to implementation
2. Reduce service coupling
3. Break the read versus write performance bottleneck
4. Elevate the concurrency barrier
5. Simplify and harden messaging
6. Eliminate service coupling
7. Graduate from the IT Nursery
Reason
91. Graduate from the IT Nursery
Reduce
Governance
Reduce
Ceremony
and
Ritual
Increase
Velocity
92. Graduate from the IT Nursery
Reduce
Governance
Reduce
Ceremony
and
Ritual
Increase
Velocity
93. Graduate from the IT Nursery
Reduce
Governance
Reduce
Ceremony
and
Ritual
Increase
Velocity
Organized Chaos
94. Graduate from the IT Nursery
Reduce
Governance
Reduce
Ceremony
and
Ritual
Increase
Velocity
Organized Revolution
95. Graduate from the IT Nursery
Reduce
Governance
Reduce
Ceremony
and
Ritual
Increase
Velocity
People are very open-minded about new things
- as long as they're exactly like the old ones.
-Charles F. Kettering
96. 7 Reasons why your microservices should use ES & CQRS
0. What is Event Sourcing & CQRS
1. Smooth transition from DDD & Event Storming to implementation
2. Reduce service coupling
3. Break the read versus write performance bottleneck
4. Elevate the concurrency barrier
5. Simplify and harden messaging
6. Eliminate service coupling
7. Graduate from the IT Nursery
97. Hugh McKee (@mckeeh3), Developer Advocate
7 Reasons why your microservices should use
Event Sourcing & CQRS