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
200
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
I shall define this only once
freekmurze
0
330
An Introduction to Snapshot testing
freekmurze
0
360
Building a realtime dashboard with Laravel Livewire (PHPKonf)
freekmurze
0
670
A tour behind the scenes of Oh Dear (PHP Benelux)
freekmurze
2
690
A practical look at multitenancy in Laravel
freekmurze
1
280
A practical look at multitenancy in Laravel (Laracon US)
freekmurze
0
610
Highlights Flare codebase (Laracon online)
freekmurze
0
340
Introducing Mailcoach
freekmurze
1
520
Highlights from the Flare codebase (Full Stack Ghent)
freekmurze
0
550
Other Decks in Technology
See All in Technology
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
2.1k
web-application-security
matsuihidetoshi
0
170
Azure Container Apps + Bicep 〜 こんな感じで運用しています
kaz29
2
480
TechFeed Experts Night#27 〜 フロントエンドフレームワーク最前線 (Svelte)
baseballyama
1
510
一生覚えておきたい「システム開発=コミュニケーション」〜初めての実務案件振り返りLT〜
maimyyym
0
140
Tellus の衛星データを見てみよう #mf_fukuoka
kongmingstrap
0
190
[新卒向け研修資料] テスト文字列に「うんこ」と入れるな(2024年版)
infiniteloop_inc
4
15k
ServiceNow Knowledge 24の歩き方 EYストラテジー・アンド・コンサルティング
manarobot
0
200
推しは推せるときに推せ! プロダクトにフィードバックしていこう
nakasho
0
310
Hands-on Gemini, the Google DeepMind LLM
meteatamel
1
110
KubeCon EU 2024 Recap “Kubernetes Policy Time Machine: Where to Next?”
ryysud
0
220
アクセシビリティを考慮したUI/CSSフレームワーク・ライブラリ選定
yajihum
2
1k
Featured
See All Featured
Statistics for Hackers
jakevdp
789
220k
Navigating Team Friction
lara
178
13k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
104
6.6k
What’s in a name? Adding method to the madness
productmarketing
PRO
16
2.6k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
21
1.6k
Web development in the modern age
philhawksworth
202
10k
The Mythical Team-Month
searls
216
42k
Building Flexible Design Systems
yeseniaperezcruz
319
37k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
221
21k
A Modern Web Designer's Workflow
chriscoyier
689
190k
5 minutes of I Can Smell Your CMS
philhawksworth
199
19k
VelocityConf: Rendering Performance Case Studies
addyosmani
320
23k
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