SlideShare a Scribd company logo
1 of 17
Download to read offline
Radek Szymczyszyn
@erszcz
Tech Lead at Erlang Solutions
radek.szymczyszyn@erlang-solutions.com www.erlang-solutions.com
©2024 Erlang Solutions
Monorepo
The solution or the problem?
Microservices
are everywhere
“A system design copies the communication structure
of the organisation building it”
Melvin E. Conway, 1967
Two-pizza team
- 3-9 people, “can be fed with two pizzas”
- Engaged
- Autonomous
- Owns the product over its entire lifecycle
- 1:1 relationship - one team maintains a single microservice
- “A high performance development organization consists of multiple teams”
Sources:
1. Learn to Scale Innovation, Not
Complexity
2. Service per team
Microservice
Benefits:
- Modularity
- Scalability
- Integration of heterogeneous and legacy systems
- Distributed development
Concerns:
- Services form information barriers
- Inter-service calls over a network have a higher cost
- Testing and deployment are more complicated
- Moving responsibilities between services is more difficult
- Viewing the size of services as the primary structuring mechanism can lead to too many services
- Two-phased commits are regarded as an anti-pattern
- Development and support of many services are more challenging if they are built with different tools and technologies
- The protocol typically used with microservices (HTTP) was designed for public-facing services, and as such is unsuitable for working
internal microservices that often must be impeccably reliable
- Decomposition methodology often uses functional decomposition, which does not handle changes in the requirements
- The very concept of microservice is misleading since there are only services. There is no sound definition of when a service starts or stops
being a microservice
- Data aggregation
Source:
Microservices - Wikipedia
Microservice
Benefits:
- Modularity
- Scalability
- Integration of heterogeneous and legacy systems
- Distributed development
Concerns:
- Services form information barriers
- Inter-service calls over a network have a higher cost
- Testing and deployment are more complicated
- Moving responsibilities between services is more difficult
- Viewing the size of services as the primary structuring mechanism can lead to too many services
- Two-phased commits are regarded as an anti-pattern
- Development and support of many services are more challenging if they are built with different tools and technologies
- The protocol typically used with microservices (HTTP) was designed for public-facing services, and as such is unsuitable for working
internal microservices that often must be impeccably reliable
- Decomposition methodology often uses functional decomposition, which does not handle changes in the requirements
- The very concept of microservice is misleading since there are only services. There is no sound definition of when a service starts or stops
being a microservice
- Data aggregation
Source:
Microservices - Wikipedia
Our case
- 3-9 people ✅
- Owns the product over its entire lifecycle 😐
- One team maintains a single microservice ❌
- Scalability ✅
- Integration of heterogeneous and legacy systems ✅
- Built with different tools and technologies 😐
- No sound definition of when a service starts or stops being a microservice
😐
- Dependencies between repositories ❌
Sources:
Own experience
Dependencies
Introducing a change PR #1
Introducing a change PR #1
PR #2
Introducing a change PR #1
PR #2
PR #3 PR #4
PR #5
Monorepo
Scalability
Scale service deployments independently
Fewer dependencies
Dramatically simplify the PR process
Less boilerplate
Dockerfile, ASDF .tool-versions, Ecto config, similar Mix deps everywhere, Github Actions workflows
Test wisely to save CI time
Always run integration tests, but only run the modified services’ unit tests
Monorepo
Let’s see if that’s feasible…
https://github.com/erszcz/monorepo-example
Thank you!
@erszcz

More Related Content

Similar to Monorepo Pattern - the solution or the problem?

Microservice Architecture Software Architecture Microservice Design Pattern
Microservice Architecture Software Architecture Microservice Design PatternMicroservice Architecture Software Architecture Microservice Design Pattern
Microservice Architecture Software Architecture Microservice Design Patternjeetendra mandal
 
Service Mesh Talk for CTO Forum
Service Mesh Talk for CTO ForumService Mesh Talk for CTO Forum
Service Mesh Talk for CTO ForumRick Hightower
 
Distributed operating system
Distributed operating systemDistributed operating system
Distributed operating systemudaya khanal
 
Introduction to Microservices Architecture - SECCOMP 2020
Introduction to Microservices Architecture - SECCOMP 2020Introduction to Microservices Architecture - SECCOMP 2020
Introduction to Microservices Architecture - SECCOMP 2020Rodrigo Antonialli
 
Anya-Kim-Bhargava-MCCWorkshop.ppt
Anya-Kim-Bhargava-MCCWorkshop.pptAnya-Kim-Bhargava-MCCWorkshop.ppt
Anya-Kim-Bhargava-MCCWorkshop.pptTaskinKhaleque
 
Multi-Agency Multi-Media Interoperable Communication, Enabled By Redis: Paul ...
Multi-Agency Multi-Media Interoperable Communication, Enabled By Redis: Paul ...Multi-Agency Multi-Media Interoperable Communication, Enabled By Redis: Paul ...
Multi-Agency Multi-Media Interoperable Communication, Enabled By Redis: Paul ...Redis Labs
 
Security issue in cloud by himanshu tiwari
Security issue in cloud by himanshu tiwariSecurity issue in cloud by himanshu tiwari
Security issue in cloud by himanshu tiwaribhanu krishna
 
Cloud Computing and Virtualization Overview by Amr Ali
Cloud Computing and Virtualization Overview by Amr AliCloud Computing and Virtualization Overview by Amr Ali
Cloud Computing and Virtualization Overview by Amr AliAmr Ali
 
SOA vs Microservices vs SBA
SOA vs Microservices vs SBASOA vs Microservices vs SBA
SOA vs Microservices vs SBAMichael Sukachev
 
Introduction to Microservices_Architecture.pptx
Introduction to Microservices_Architecture.pptxIntroduction to Microservices_Architecture.pptx
Introduction to Microservices_Architecture.pptxHamzaBoutlih
 

Similar to Monorepo Pattern - the solution or the problem? (20)

Microservice Architecture Software Architecture Microservice Design Pattern
Microservice Architecture Software Architecture Microservice Design PatternMicroservice Architecture Software Architecture Microservice Design Pattern
Microservice Architecture Software Architecture Microservice Design Pattern
 
Introduction to Microservices
Introduction  to MicroservicesIntroduction  to Microservices
Introduction to Microservices
 
Secure Cloud Issues
Secure Cloud IssuesSecure Cloud Issues
Secure Cloud Issues
 
Service Mesh Talk for CTO Forum
Service Mesh Talk for CTO ForumService Mesh Talk for CTO Forum
Service Mesh Talk for CTO Forum
 
Distributed operating system
Distributed operating systemDistributed operating system
Distributed operating system
 
NPAE Tool
NPAE ToolNPAE Tool
NPAE Tool
 
Introduction to Microservices Architecture - SECCOMP 2020
Introduction to Microservices Architecture - SECCOMP 2020Introduction to Microservices Architecture - SECCOMP 2020
Introduction to Microservices Architecture - SECCOMP 2020
 
Microservices.pdf
Microservices.pdfMicroservices.pdf
Microservices.pdf
 
Anya-Kim-Bhargava-MCCWorkshop.ppt
Anya-Kim-Bhargava-MCCWorkshop.pptAnya-Kim-Bhargava-MCCWorkshop.ppt
Anya-Kim-Bhargava-MCCWorkshop.ppt
 
Multi-Agency Multi-Media Interoperable Communication, Enabled By Redis: Paul ...
Multi-Agency Multi-Media Interoperable Communication, Enabled By Redis: Paul ...Multi-Agency Multi-Media Interoperable Communication, Enabled By Redis: Paul ...
Multi-Agency Multi-Media Interoperable Communication, Enabled By Redis: Paul ...
 
Microservices why?
Microservices   why?Microservices   why?
Microservices why?
 
Microservice intro
Microservice introMicroservice intro
Microservice intro
 
Microservices
MicroservicesMicroservices
Microservices
 
Security issue in cloud by himanshu tiwari
Security issue in cloud by himanshu tiwariSecurity issue in cloud by himanshu tiwari
Security issue in cloud by himanshu tiwari
 
Cloud Computing and Virtualization Overview by Amr Ali
Cloud Computing and Virtualization Overview by Amr AliCloud Computing and Virtualization Overview by Amr Ali
Cloud Computing and Virtualization Overview by Amr Ali
 
Cloud native-microservices
Cloud native-microservicesCloud native-microservices
Cloud native-microservices
 
MSB-Distributed systems goals
MSB-Distributed systems goalsMSB-Distributed systems goals
MSB-Distributed systems goals
 
SOA vs Microservices vs SBA
SOA vs Microservices vs SBASOA vs Microservices vs SBA
SOA vs Microservices vs SBA
 
1.intro. to distributed system
1.intro. to distributed system1.intro. to distributed system
1.intro. to distributed system
 
Introduction to Microservices_Architecture.pptx
Introduction to Microservices_Architecture.pptxIntroduction to Microservices_Architecture.pptx
Introduction to Microservices_Architecture.pptx
 

Recently uploaded

EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Intelisync
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 

Recently uploaded (20)

EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 

Monorepo Pattern - the solution or the problem?

  • 1. Radek Szymczyszyn @erszcz Tech Lead at Erlang Solutions radek.szymczyszyn@erlang-solutions.com www.erlang-solutions.com ©2024 Erlang Solutions Monorepo The solution or the problem?
  • 2.
  • 4. “A system design copies the communication structure of the organisation building it” Melvin E. Conway, 1967
  • 5.
  • 6.
  • 7. Two-pizza team - 3-9 people, “can be fed with two pizzas” - Engaged - Autonomous - Owns the product over its entire lifecycle - 1:1 relationship - one team maintains a single microservice - “A high performance development organization consists of multiple teams” Sources: 1. Learn to Scale Innovation, Not Complexity 2. Service per team
  • 8. Microservice Benefits: - Modularity - Scalability - Integration of heterogeneous and legacy systems - Distributed development Concerns: - Services form information barriers - Inter-service calls over a network have a higher cost - Testing and deployment are more complicated - Moving responsibilities between services is more difficult - Viewing the size of services as the primary structuring mechanism can lead to too many services - Two-phased commits are regarded as an anti-pattern - Development and support of many services are more challenging if they are built with different tools and technologies - The protocol typically used with microservices (HTTP) was designed for public-facing services, and as such is unsuitable for working internal microservices that often must be impeccably reliable - Decomposition methodology often uses functional decomposition, which does not handle changes in the requirements - The very concept of microservice is misleading since there are only services. There is no sound definition of when a service starts or stops being a microservice - Data aggregation Source: Microservices - Wikipedia
  • 9. Microservice Benefits: - Modularity - Scalability - Integration of heterogeneous and legacy systems - Distributed development Concerns: - Services form information barriers - Inter-service calls over a network have a higher cost - Testing and deployment are more complicated - Moving responsibilities between services is more difficult - Viewing the size of services as the primary structuring mechanism can lead to too many services - Two-phased commits are regarded as an anti-pattern - Development and support of many services are more challenging if they are built with different tools and technologies - The protocol typically used with microservices (HTTP) was designed for public-facing services, and as such is unsuitable for working internal microservices that often must be impeccably reliable - Decomposition methodology often uses functional decomposition, which does not handle changes in the requirements - The very concept of microservice is misleading since there are only services. There is no sound definition of when a service starts or stops being a microservice - Data aggregation Source: Microservices - Wikipedia
  • 10. Our case - 3-9 people ✅ - Owns the product over its entire lifecycle 😐 - One team maintains a single microservice ❌ - Scalability ✅ - Integration of heterogeneous and legacy systems ✅ - Built with different tools and technologies 😐 - No sound definition of when a service starts or stops being a microservice 😐 - Dependencies between repositories ❌ Sources: Own experience
  • 13. Introducing a change PR #1 PR #2
  • 14. Introducing a change PR #1 PR #2 PR #3 PR #4 PR #5
  • 15. Monorepo Scalability Scale service deployments independently Fewer dependencies Dramatically simplify the PR process Less boilerplate Dockerfile, ASDF .tool-versions, Ecto config, similar Mix deps everywhere, Github Actions workflows Test wisely to save CI time Always run integration tests, but only run the modified services’ unit tests
  • 16. Monorepo Let’s see if that’s feasible… https://github.com/erszcz/monorepo-example