Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Introduction to Event Sourcing and CQRS
Search
Guilherme Augusto Henschel
February 17, 2018
Programming
520
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Introduction to Event Sourcing and CQRS
An Introduction to Event Sourcing and CQRS presented at 11º PHPSC InCompany Meetup
Guilherme Augusto Henschel
February 17, 2018
Other Decks in Programming
See All in Programming
dotNET_vulnclicker_intro.pdf
deka_morita
0
140
Kotlinの15年とServer-Side Kotlin
n_takehata
1
150
phperだってパンチカードでコーディングしたい
o0h
PRO
0
330
[Dev Group Paris Octobre 26] Agentforce, SIforce, Claudeforce, Slackbot… on s'y retrouve ?
nabondance
0
110
Agents on Rails - Rails at Scale 2026
irinanazarova
0
560
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
0
450
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
190
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
300
SREの越境 / SRE Collaboration
y0hgi
2
310
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
790
カツオ、ご期待ください
suneo3476
0
190
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
170
Featured
See All Featured
Designing Powerful Visuals for Engaging Learning
tmiket
1
610
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
330
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
Speed Design
sergeychernyshev
33
2.2k
ラッコキーワード サービス紹介資料
rakko
1
5.3M
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.1k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
300
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
280
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k
Music & Morning Musume
bryan
48
7.4k
Transcript
11º PHPSC InCompany
Guilherme Augusto Henschel a.k.a. Cenoura developer since 2009 working @
Nexaas
Notice ✘ this talk intent is to open your mind
✘ use these patterns carefully ✘ remember, there is no silver bullet
ORM Customer Memory Database Customer Account owns name address account
Account accountNumber type balance
Event Sourcing
“ Event Sourcing ensures that all changes to application state
are stored as a sequence of events. — Martin Fowler
AccountCreated id: 123 owner: Guilherme H. 1 DepositPerformed accountId: 123
amount: $50 2 WithdrawalPerformed accountId: 123 amount: $20 3
Pros ✘ complete log of every state change ✘ easy
way to undo things ✘ testing, traceability and debugability ✘ business and data analysis of event streams ✘ immutability
Cons ✘ complexity ✘ time to get used to ✘
limited support from frameworks
When ✘ rich object-oriented domain models ✘ critical accountability and
debugability ✘ version control for data ✘ data can give you competitive advantage ✘ building scaleable systems based on CQRS pattern
CQS Command Query Segregation
“ every method should either be a command that performs
an action, or a query that returns data to the caller, but not both. — Bertrand Meyer
CQRS Command Query Responsibility Segregation
“ creating two objects where there was previously only one
Before
Improving
After
Pros ✘ scalability ✘ flexibility ✘ reduced complexity ✘ concentrate
on domain/business
Cons ✘ complexity
When ✘ task based user interfaces ✘ complex data processing
✘ disparity in reads and writes
Event Sourcing + CQRS
None
Libs/Components ✘Broadway - https://github.com/broadway/ broadway ✘Prooph - http://getprooph.org/
thanks! guilhermeaugusto.com.br
References ✘ Greg Young talk - https://www.youtube.com/watch?v=JHGkaShoyNs and https://cqrs.files.wordpress.com/2010/11/cqrs_documents.pdf ✘
Johannes Seitz talk - https://ookami86.github.io/event-sourcing-in- practice/ ✘ Martin Fowler articles - https://martinfowler.com/eaaDev/ EventSourcing.html and https://martinfowler.com/bliki/CQRS.html ✘ Marco Pivetta talk - https://www.youtube.com/watch?v=8NuHNtwjync ✘ http://www.cqrs.nu/ ✘ https://speakerdeck.com/owolf/cqrs-for-great-good ✘ https://speakerdeck.com/mattketmo/cqrs-and-event-sourcing