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
180
I shall define this only once
freekmurze
0
380
An Introduction to Snapshot testing
freekmurze
0
460
Building a realtime dashboard with Laravel Livewire (PHPKonf)
freekmurze
0
760
A tour behind the scenes of Oh Dear (PHP Benelux)
freekmurze
2
820
A practical look at multitenancy in Laravel
freekmurze
1
330
A practical look at multitenancy in Laravel (Laracon US)
freekmurze
0
700
Highlights Flare codebase (Laracon online)
freekmurze
0
460
Introducing Mailcoach
freekmurze
1
600
Other Decks in Technology
See All in Technology
コンテナサプライチェーンセキュリティ
kyohmizu
1
140
デスクトップだけじゃないUbuntu
mtyshibata
0
810
Exadata Database Service on Cloud@Customer セキュリティ、ネットワーク、および管理について
oracle4engineer
PRO
2
1.5k
Pwned Labsのすゝめ
ken5scal
1
330
手を動かしてレベルアップしよう!
maruto
0
190
OSS構成管理ツールCMDBuildを使ったAWSリソース管理の自動化
satorufunai
0
600
急成長する企業で作った、エンジニアが輝ける制度/ 20250227 Rinto Ikenoue
shift_evolve
0
100
設計を積み重ねてシステムを刷新する
sansantech
PRO
0
160
日経のデータベース事業とElasticsearch
hinatades
PRO
0
210
Aurora PostgreSQLがCloudWatch Logsに 出力するログの課金を削減してみる #jawsdays2025
non97
1
160
入門 PEAK Threat Hunting @SECCON
odorusatoshi
0
140
(機械学習システムでも) SLO から始める信頼性構築 - ゆる SRE#9 2025/02/21
daigo0927
0
260
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.5k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
10
510
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.1k
A better future with KSS
kneath
238
17k
Git: the NoSQL Database
bkeepers
PRO
427
65k
What's in a price? How to price your products and services
michaelherold
244
12k
We Have a Design System, Now What?
morganepeng
51
7.4k
Large-scale JavaScript Application Architecture
addyosmani
511
110k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.4k
The Language of Interfaces
destraynor
156
24k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
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