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
Modularise a Laravel Monolith Application
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Zeshan
March 04, 2024
Programming
0
160
Modularise a Laravel Monolith Application
Zeshan
March 04, 2024
Tweet
Share
Other Decks in Programming
See All in Programming
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
Apache Iceberg V3 and migration to V3
tomtanaka
0
170
CSC307 Lecture 05
javiergs
PRO
0
500
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
140
「ブロックテーマでは再現できない」は本当か?
inc2734
0
1k
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
AI & Enginnering
codelynx
0
120
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
SourceGeneratorのススメ
htkym
0
200
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
1
980
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
21
7.4k
高速開発のためのコード整理術
sutetotanuki
1
410
Featured
See All Featured
sira's awesome portfolio website redesign presentation
elsirapls
0
150
4 Signs Your Business is Dying
shpigford
187
22k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
110
A better future with KSS
kneath
240
18k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.1k
Prompt Engineering for Job Search
mfonobong
0
160
How to make the Groovebox
asonas
2
1.9k
Tell your own story through comics
letsgokoyo
1
810
Darren the Foodie - Storyboard
khoart
PRO
2
2.4k
Fireside Chat
paigeccino
41
3.8k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
Transcript
MUHAMMAD ZESHAN KHATTAK https://pinkary.com/@zeshan77
Modularising the Monolith LaravelLive Pakistan 2024
SHIP THE PRODUCT TO THE MARKET
BENEFITS OF MONOLITH • Single repository • Single CI/CD pipeline
• Single set of infrastructure • Easy to handle DB transactions
BIG BALL OF MUD • Tight coupling between functionalities •
No domain boundaries • All code is globally accessible • Need to understand the entire codebase
MICROSERVICES User Interface Microservice Microservice Microservice HTTP HTTP
BENEFITS OF MICROSERVICES • Clear boundaries between services • Deployed
independently • Can be scaled independently • Freedom of tech stack
CHALLENGES OF MICROSERVICES • Multiple repositories • Multiple CI/CD pipelines
• Network overhead • Complex cross-service transactions
TECHNICAL DECISIONS ARE ALWAYS TRADE-OFF
OUR GOALS • Maximise teams’ productivity • Scalable architecture
OUR APPROACH • Modularise the monolith • De f ine
domain boundaries
MODULAR MONOLITH Contracts Implementation Tests Contracts Implementation Tests Contracts Implementation
Tests Inventory module Order module Payment module
INCREMENTAL MIGRATION MICROSERVICES Contracts Implementation Tests Contracts Implementation Tests Contracts
Implementation Tests Inventory service Order module Payment module
MICROSERVICES ARE EXPENSIVE TO CHANGE User Interface Microservice Microservice Microservice
HTTP HTTP
MODULAR MONOLITH IS EASIER TO CHANGE Contracts Implementation Tests Contracts
Implementation Tests Contracts Implementation Tests Inventory module Order module Payment module
MODULES & TEAM STRUCTURE Inventory Module Order Module Payment Module
Shipping Module Auth Module
DEFAULT STRUCTURE
MODULAR STRUCTURE
None
COMMUNICATION BETWEEN MODULE
COMMUNICATION THROUGH CONTRACT Module A Module B Downstream Upstream Contract
Implementation
CROSS-MODULE FOREIGN KEY LEADS TO A TIGHT COUPLING Order module
Inventory module Products Cart Items product_id id
HOW CAN WE ENFORCE DOMAIN BOUNDARIES?
STATIC ANALYSIS • Deptrac • De f ine layers based
on PHP classes • De f ine rulesets on layers access • Detect violation of the rulesets • Visualize dependency graph
THANK YOU https://pinkary.com/@zeshan77