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
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
AI Agent Dojo #4: watsonx Orchestrate ADK体験
oniak3ibm
PRO
0
120
メルカリのリーダビリティチームが取り組む、AI時代のスケーラブルな品質文化
cloverrose
2
440
実は歴史的なアップデートだと思う AWS Interconnect - multicloud
maroon1st
0
300
ローカルLLMを⽤いてコード補完を⾏う VSCode拡張機能を作ってみた
nearme_tech
PRO
0
230
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
600
Navigating Dependency Injection with Metro
l2hyunwoo
1
200
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
630
perlをWebAssembly上で動かすと何が嬉しいの??? / Where does Perl-on-Wasm actually make sense?
mackee
0
280
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
2
640
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
240
Findy AI+の開発、運用におけるMCP活用事例
starfish719
0
2k
実はマルチモーダルだった。ブラウザの組み込みAI🧠でWebの未来を感じてみよう #jsfes #gemini
n0bisuke2
3
1.4k
Featured
See All Featured
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.7k
The Cost Of JavaScript in 2023
addyosmani
55
9.4k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
HDC tutorial
michielstock
1
290
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5k
Darren the Foodie - Storyboard
khoart
PRO
0
2.1k
Accessibility Awareness
sabderemane
0
29
More Than Pixels: Becoming A User Experience Designer
marktimemedia
2
270
Java REST API Framework Comparison - PWX 2021
mraible
34
9.1k
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
A Modern Web Designer's Workflow
chriscoyier
698
190k
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