$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Modularise a Laravel Monolith Application
Search
Zeshan
March 04, 2024
Programming
0
150
Modularise a Laravel Monolith Application
Zeshan
March 04, 2024
Tweet
Share
Other Decks in Programming
See All in Programming
Tinkerbellから学ぶ、Podで DHCPをリッスンする手法
tomokon
0
140
ViewファーストなRailsアプリ開発のたのしさ
sugiwe
0
500
ゲームの物理 剛体編
fadis
0
350
俺流レスポンシブコーディング 2025
tak_dcxi
14
8.9k
tparseでgo testの出力を見やすくする
utgwkk
2
250
Integrating WordPress and Symfony
alexandresalome
0
160
GISエンジニアから見たLINKSデータ
nokonoko1203
0
160
20251212 AI 時代的 Legacy Code 營救術 2025 WebConf
mouson
0
190
手が足りない!兼業データエンジニアに必要だったアーキテクチャと立ち回り
zinkosuke
0
760
LLM Çağında Backend Olmak: 10 Milyon Prompt'u Milisaniyede Sorgulamak
selcukusta
0
130
dotfiles 式年遷宮 令和最新版
masawada
1
790
公共交通オープンデータ × モバイルUX 複雑な運行情報を 『直感』に変換する技術
tinykitten
PRO
0
120
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
97
6.4k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
570
Practical Orchestrator
shlominoach
190
11k
How to make the Groovebox
asonas
2
1.8k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Believing is Seeing
oripsolob
0
9
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
16
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
0
840
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
0
930
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
0
25
Color Theory Basics | Prateek | Gurzu
gurzu
0
140
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