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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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時代の認知負荷との向き合い方
optfit
0
160
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
200
CSC307 Lecture 07
javiergs
PRO
1
550
CSC307 Lecture 03
javiergs
PRO
1
490
Best-Practices-for-Cortex-Analyst-and-AI-Agent
ryotaroikeda
1
110
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
590
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
620
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
180
24時間止められないシステムを守る-医療ITにおけるランサムウェア対策の実際
koukimiura
1
110
並行開発のためのコードレビュー
miyukiw
0
280
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
690
Data-Centric Kaggle
isax1015
2
780
Featured
See All Featured
The SEO identity crisis: Don't let AI make you average
varn
0
290
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
240
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.2k
A better future with KSS
kneath
240
18k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
430
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
150
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.4k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.2k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
250
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