Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Event Sourcing In Laravel
Search
Freek Van der Herten
January 19, 2021
Technology
0
230
Event Sourcing In Laravel
Freek Van der Herten
January 19, 2021
Tweet
Share
More Decks by Freek Van der Herten
See All by Freek Van der Herten
Uncharted packages (Laravel Live Denmark)
freekmurze
0
190
I shall define this only once
freekmurze
0
390
An Introduction to Snapshot testing
freekmurze
0
470
Building a realtime dashboard with Laravel Livewire (PHPKonf)
freekmurze
0
780
A tour behind the scenes of Oh Dear (PHP Benelux)
freekmurze
2
830
A practical look at multitenancy in Laravel
freekmurze
1
340
A practical look at multitenancy in Laravel (Laracon US)
freekmurze
0
710
Highlights Flare codebase (Laracon online)
freekmurze
0
470
Introducing Mailcoach
freekmurze
1
610
Other Decks in Technology
See All in Technology
コドモンのQAの今までとこれから -XPによる成長と見えてきた課題-
masasuna
0
100
Tirez profit de Messenger pour améliorer votre architecture
tucksaun
1
160
20250328_OpenAI製DeepResearchは既に一種のAGIだと思う話
doradora09
PRO
0
160
Redefine_Possible
upsider_tech
0
350
データベースで見る『家族アルバム みてね』の変遷 / The Evolution of Family Album Through the Lens of Databases
kohbis
3
870
テキスト解析で見る PyCon APAC 2025 セッション&スピーカートレンド分析
negi111111
0
150
近年の PyCon 情勢から見た PyCon APAC のまとめ
terapyon
0
150
Road to SRE NEXT@仙台 IVRyの組織の形とSLO運用の現状
abnoumaru
1
420
Re:VIEWで書いた「Compose で Android の edge-to-edge に対応する」をRoo Codeで発表資料にしてもらった
tomoya0x00
0
170
スケールアップ企業のQA組織のバリューを最大限に引き出すための取り組み
tarappo
4
990
ゆるくVPC Latticeについてまとめてみたら、意外と奥深い件
masakiokuda
2
110
30 代子育て SRE が考える SRE ナレッジマネジメントの現在と将来
kworkdev
PRO
0
150
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
52
11k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
7
620
Large-scale JavaScript Application Architecture
addyosmani
511
110k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.2k
The Pragmatic Product Professional
lauravandoore
33
6.5k
A designer walks into a library…
pauljervisheath
205
24k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
How to Ace a Technical Interview
jacobian
276
23k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.6k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
4 Signs Your Business is Dying
shpigford
183
22k
Stop Working from a Prison Cell
hatefulcrawdad
268
20k
Transcript
Event Sourcing in Laravel
About me Freek Van der Herten @freekmurze spatie.be freek.dev ohdear.app
f l areapp.io
Open Source Software
spatie.be/open-source
spatie.be/videos
Let's talk about event sourcing
Talk overview Theory Projectors demo Aggregates demo
Traditional application Write data in database An update means overwriting
the old data The old data cannot be accessed anymore
APPLICATION DATABASE TABLE value X
APPLICATION DATABASE TABLE value X value Y
Event Sourced Application The application will f i re o
f f events Events will get written in a dedicated store Events are passed to consumers that create projections Aggregate, Aggregate Root...
APP EVENTS Event Event 1
APP EVENTS Event Event 1 Event 2
APP EVENTS Event Event 1 Event 2 Event 3
APP CONSUMER EVENTS PROJECTION Event Event 1 Event 2 Event
3
APP CONSUMER CONSUMER 2 EVENTS PROJECTION Event Event 1 Event
2 Event 3 ANOTHER PROJECTION
APP CONSUMER CONSUMER 2 EVENTS PROJECTION Event Event 1 Event
2 Event 3 ANOTHER PROJECTION
APP CONSUMER CONSUMER 2 EVENTS PROJECTION Event Event 1 Event
2 Event 3 Event 4 ANOTHER PROJECTION
Event Sourced Application Auditing requirements Extra reports needed Recording the
unhappy path There is some setup required
Laravel Event Sourcing
Laravel Event Sourcing Package made by Spatie Aggregates, Projectors &
Reactors Beautifully integrated into Laravel Easy to get started with
Demo
Aggregates
None
None
None
None
None
None
Demo
Wrapping up
spatie.be/docs/laravel-event-sourcing
Packages spatie.be/docs/laravel-event-sourcing eventsauce.io
Event sourcing makes the easy things harder… …and the harder
things easier — Frank De Jonge
Course eventsourcery.com
Larabank github.com/spatie/larabank-traditional github.com/spatie/larabank-event-projector github.com/spatie/larabank-event-projector-aggregates
One more thing
spatie.be/event-sourcing The basics of event sourcing Best practices Laravel speci
f i c examples Event sourced cart ETA July 2021
Thank you! spatie.be/docs/laravel-event-sourcing spatie.be/products (only this week 25 % discount
on everything) ohdear.app