Event Sourcing
ANTONÍN STOKLÁSEK
11. 2. 2018
PRESENTATION
Antonin Stoklasek
 Technical Team Leader
 Programmer 10+ years
 BSC Praha, pobočka Olomouc
 Java, Docker, React, …
 Twitter @tonda100
 GitHub tonda100
Agenda
 Event Sourcing
 Eventual consistency
 CQRS
 Events in micro-services
 Apache Kafka
Events matters
State is irrelevant
Event Sourcing
Pros
 Real world abstraction
 Feature encapsulation
 Scalability
 Performace
 Time traveling
Cons
 Eventualy consistent
 Complex
 Non-traditional
 Disk space usage
Eventual Consistency
 It was stored but not loaded (yet)
 It happens anyway
 Be ready
 Throughput
 Performance
 Stability
Event Store
 Source of truth
 Immutable
 Topics
 Publishing events
 Subscribing
 Events order guarantee
 Processing EXACTLY_ONCE vs. AT_LEAST_ONCE
CQRS
command
 Write operations
 Publishing events
query
 Read Models
 Subscribe to events
Command Query Responsibility Segregation
CQRS
Micro Services
 Encapsulation
 Remove unnecery dependencies
 Event store integration
 Performance and Scalability
Demo
Apache Kafka
Summary
 Eventual consistency is not that bad
 Ready by design
 Embrace micro services
 Do NOT mix read and write
 Greg Young and Sebastian Daschner
THANK YOU
@tonda100

Event sourcing