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
340
An Introduction to Snapshot testing
freekmurze
0
390
Building a realtime dashboard with Laravel Livewire (PHPKonf)
freekmurze
0
690
A tour behind the scenes of Oh Dear (PHP Benelux)
freekmurze
2
730
A practical look at multitenancy in Laravel
freekmurze
1
290
A practical look at multitenancy in Laravel (Laracon US)
freekmurze
0
640
Highlights Flare codebase (Laracon online)
freekmurze
0
370
Introducing Mailcoach
freekmurze
1
550
Highlights from the Flare codebase (Full Stack Ghent)
freekmurze
0
590
Other Decks in Technology
See All in Technology
年間一億円削減した時系列データベースのアーキテクチャ改善~不確実性の高いプロジェクトへの挑戦~
lycorptech_jp
PRO
3
2.9k
ゆめみのアクセシビリティの現在地と今後
ryokatsuse
3
290
E2Eテスト自動化プラットフォームにおけるAIの活用
shift_evolve
0
180
JBUG岡山 #6 WordCamp男木島の チームビルディング
takeshifurusato
0
150
データ分析を支える技術 生成AI再入門
ishikawa_satoru
0
380
データ分析基盤を作ってみよう~設計編~
nrinetcom
PRO
1
110
コンテナ・K8s研修 - 後半 Kubernetes 基礎&ハンズオン【MIXI 24新卒技術研修】
mixi_engineers
PRO
1
120
How to Think Like a Performance Engineer
csswizardry
4
590
エンジニアの生存戦略 〜クラウド潮流の経験から紐解く技術トレンドのメカニズムと乗りこなし方〜
shimy
9
1.9k
CTOから見た事業開発とプロダクト開発 / My Perspective on Business and Product Development as CTO
keisuke69
4
960
CEL(Common Expression Language)で書いた条件にマッチしたIAM Policyを見つける / iam-policy-finder
fujiwara3
0
710
AIアシスタントの活用で品質の向上と開発ワークフローのスピードアップ
nagix
1
190
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
4
590
Writing Fast Ruby
sferik
623
60k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
19k
Building Applications with DynamoDB
mza
89
5.8k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
155
14k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
17
8.7k
Gamification - CAS2011
davidbonilla
78
4.9k
The Power of CSS Pseudo Elements
geoffreycrofte
64
5.2k
Into the Great Unknown - MozCon
thekraken
20
1.3k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
16
1.6k
Embracing the Ebb and Flow
colly
81
4.3k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3.3k
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