SlideShare a Scribd company logo
© 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
The Issue of Monorepo and Polyrepo In Large Enterprises
‹Programming› 2019 / ICW 2019
Nicolas Brousse | Director, SRE
© 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Practical definitions
Monorepo
Use one unique source code repository for multiple projects and their
dependencies.
Polyrepo
Use a source code repository for each project, component, and/or library.
2
© 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
A decade of soul-searching
Over the past 10 years, we went through:
|-> Monorepo on SVN
|-> Polyrepo on SVN with use of svn externals
|-> Git polyrepo with Code Review (Gerrit)
|-> Git polyrepo as mono with Code Review and use of submodules (Gerrit)
|-> Git polyrepo with Github Pull Request Model (Bitbucket)
|-> Git monorepo with Github Pull Request Model (Bitbucket)
|-> Git monorepo with Github Pull Request Model (Github Enterprise)
3
© 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Systems are becoming more complex
4
Complexity
Microservices
&
Distributed Systems
Human Cognitive Limit
© 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Remember the Editor War?
5
Image credit: xkcd.com
© 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
A repo war?
6
Structure Implementation Notable Adopters
Polyrepo One distinct source code
repository for each component
and library
Amazon, Netflix, Lyft
Monorepo One source code repository for
a whole company or large
project
Google, Facebook, Microsoft,
Uber, Twitter, React, Angular,
Kubernetes
Hybrid Poly-as-Mono Updates are made to a
polyrepo but managed like a
monorepo
Android, Chrome
Hybrid Mono-as-Poly Updates are made into a
monorepo but then split into
read-only polyrepo for build or
distribution purpose
Symphony, Shopsys
© 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 7
Monorepo Polyrepo
Customized
Developer
workflows
Unique
Team
Culture
Use one unique source
code repository for
multiple projects and their
dependencies
Single source of truth
Allow atomic changes
simplify large scale
refactoring
Compound System
Use a source code
repository for each
project, component,
and/or library
Independent releases
cycles
Each project may have a
customized workflow
Isolation
© 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 8
“with a monolithic source tree it makes sense, and is easier, for the person updating a library to update all affected
dependencies at the same time. The technical debt incurred by dependent systems is paid down immediately as
changes are made.”
Rachel Potvin and Josh Levenberg. 2016. Why Google Stores Billions of Lines of Code in a Single Repository.
Commun. ACM 59, 7 (June 2016), 78–87. https://doi.org/10.1145/2854146
Diamond Dependency Problem
© 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Culture at the center of the issue
 Netflix’s Culture - “freedom and
responsibility” and the “keeper test”
(Polyrepo)
 Google’s Philosophy - "It’s best to do
one thing really, really well” and “Great
just isn’t good enough” (Monorepo)
 Microsoft - ”we needed a culture that
allowed us to constantly refresh and
renew” – Satya Nadella (Move from
polyrepo to monorepo)
9
Source: levels.fyi
© 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
 “An important aspect of Google culture that encourages code quality is the
expectation that all code is reviewed before being committed to the repository.”
 “A developer can make a major change touching hundreds or thousands of files
across the repository in a single consistent operation.”
10
Rachel Potvin and Josh Levenberg. 2016. Why Google Stores Billions of Lines of Code in a Single Repository.
Commun. ACM 59, 7 (June 2016), 78–87. https://doi.org/10.1145/2854146
© 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 11
Phil Ensor. 1988. Organizational Renewal-Tearing Down the Functional Silos. In AME Study Group on Functional
Organization. AME Target, 4–16.
© 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 12
Jun He, Brian S. Butler, and William R. King. 2007. Team Cognition: Development and Evolution in Software
Project Teams. J. of Management Information Systems 24 (2007), 261–292.
© 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 13
“Software project teams’ ability to operate as a team arises from who they are
(preexisting team characteristics) and how they interact (team communication).
Team cognition concepts provide potential levers for managers seeking to improve
the performance of these teams. An arbitrary collection of people can, with a great
deal of effort and some luck, accomplish significant goals. However, by forming
team cognition, those individuals can increase their chances of success. The
more we understand about the formation of team cognition, both within software
project teams and in general, the more effective we will be at explaining and
supporting the formation of effective teams.”
Jun He, Brian S. Butler, and William R. King. 2007. Team Cognition: Development and Evolution in Software
Project Teams. J. of Management Information Systems 24 (2007), 261–292.
© 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
“In 2014, we operationalized and validated a model of organizational culture
proposed by sociologist Ron Westrum and showed that it drives both software
delivery performance and organizational performance. Over the last few years
we’ve found a number of management and technical capabilities that influence
culture, showing that you can change culture by changing the way work is done
in your organization.”
“We find that technical and management practices shape culture and that
culture in turn helps to improve performance outcomes.“
14
DORA. 2018. Accelerate: State of DevOps Strategies for a New Economy.
© 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Paper Conclusion
Technical arguments between one model and another are not a clear-cut.
“A monorepo facilitates cultural change and enables a holistic team cognition that
ensures high quality work and improves communication, while preserving necessary
autonomy.”
---
Can the decisioning process of choosing a source code repository structure be
more data driven and scientific?
Is there an opportunity for architecture / design patterns that could benefit
practitioners?15
<Programming> 2019 - ICW'19: The Issue of Monorepo and Polyrepo In Large Enterprises

More Related Content

PPTX
Devops
PDF
Convergence of Communities
PDF
"IBMs Open Source Strategy" by Adam Jollans @ eLiberatica 2009
PDF
Open Source Building Career and Competency
PDF
Artificial Intelligence and Machine Learning with the Oracle Data Science Cloud
PDF
PPTX
Continuous Innovation + Digital Platforms
PDF
Implementing DevOps – How it came to the fore, its key elements and example d...
Devops
Convergence of Communities
"IBMs Open Source Strategy" by Adam Jollans @ eLiberatica 2009
Open Source Building Career and Competency
Artificial Intelligence and Machine Learning with the Oracle Data Science Cloud
Continuous Innovation + Digital Platforms
Implementing DevOps – How it came to the fore, its key elements and example d...

What's hot (7)

PPTX
Cloud infrastructure in public sector by Vinod Kotiya | OIST Bhopal Faculty D...
PPTX
Info session gdsc @ bit
PDF
Develop - Hybrid Cloud & Open: Better Together
PPTX
GE minds and machines keynote 2015 cloud foundry
PDF
Microservices - How Microservices Have Changed and Why They Matter
PPT
Asf icfoss-mentoring
PDF
Establishing an Open Source Program Office
Cloud infrastructure in public sector by Vinod Kotiya | OIST Bhopal Faculty D...
Info session gdsc @ bit
Develop - Hybrid Cloud & Open: Better Together
GE minds and machines keynote 2015 cloud foundry
Microservices - How Microservices Have Changed and Why They Matter
Asf icfoss-mentoring
Establishing an Open Source Program Office
Ad

Similar to <Programming> 2019 - ICW'19: The Issue of Monorepo and Polyrepo In Large Enterprises (20)

PPTX
InnerSourcing - Worldwide enterprise development teams collaboration
PDF
A Toolchain for Lean Architecture at American Airlines
ODP
The Bespoke Software Product Factory (2007)
PPTX
Open Development - an Engineering Manager's Perspective
PPTX
Building DevOps Toolchain
PPTX
why agile?
PPTX
L'impatto della sicurezza su DevOps
PDF
Software Lifecycle Management in Asemantics
PDF
Don't Suck at Building Stuff - Mykel Alvis at Puppet Camp Altanta
PPTX
Building foundations
PDF
[2016/2017] Modern development paradigms
PDF
How open source is driving DevOps innovation: CloudOpen NA 2015
PDF
Dealing with large code bases. cd ams meetup
PPTX
Continuous Integration
PPTX
AgileNCR 2019 _ The Soft Side of Software Development.pptx
PDF
We all want to get rid of waste but are we doing it wrong? English script
PPTX
2022 DOI SKILup Days_Google Uses Monorepo, and I Don't - Here's Why.pptx
PPT
Buzzword Deathmatch: Agile vs SOA
PPTX
Automation and Technical Debt
InnerSourcing - Worldwide enterprise development teams collaboration
A Toolchain for Lean Architecture at American Airlines
The Bespoke Software Product Factory (2007)
Open Development - an Engineering Manager's Perspective
Building DevOps Toolchain
why agile?
L'impatto della sicurezza su DevOps
Software Lifecycle Management in Asemantics
Don't Suck at Building Stuff - Mykel Alvis at Puppet Camp Altanta
Building foundations
[2016/2017] Modern development paradigms
How open source is driving DevOps innovation: CloudOpen NA 2015
Dealing with large code bases. cd ams meetup
Continuous Integration
AgileNCR 2019 _ The Soft Side of Software Development.pptx
We all want to get rid of waste but are we doing it wrong? English script
2022 DOI SKILup Days_Google Uses Monorepo, and I Don't - Here's Why.pptx
Buzzword Deathmatch: Agile vs SOA
Automation and Technical Debt
Ad

More from Nicolas Brousse (13)

PDF
Improving Adobe Experience Cloud Services Dependability with Machine Learning
PDF
IEEE ISSRE 2018 - Use of Self-Healing Techniques to Improve the Reliability o...
PDF
PuppetConf 2017 | Adobe Advertising Cloud: A Lean Puppet Workflow to Support ...
PDF
Adobe Advertising Cloud: The Reality of Cloud Bursting with OpenStack
PDF
SuiteWorld16: Mega Volume - How TubeMogul Leverages NetSuite
PDF
SRECon16: Moving Large Workloads from a Public Cloud to an OpenStack Private ...
PDF
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
PPTX
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
PDF
Improving Operations Efficiency with Puppet
PDF
Scaling Bleeding Edge Technology in a Fast-paced Environment
PDF
Scaling on EC2 in a fast-paced environment (LISA'11 - Full Paper)
PDF
Bringing Business Awareness to Your Operation Team (Nagios World Conference 2...
PDF
Optimizing your Monitoring and Trending tools for the Cloud (Nagios World Con...
Improving Adobe Experience Cloud Services Dependability with Machine Learning
IEEE ISSRE 2018 - Use of Self-Healing Techniques to Improve the Reliability o...
PuppetConf 2017 | Adobe Advertising Cloud: A Lean Puppet Workflow to Support ...
Adobe Advertising Cloud: The Reality of Cloud Bursting with OpenStack
SuiteWorld16: Mega Volume - How TubeMogul Leverages NetSuite
SRECon16: Moving Large Workloads from a Public Cloud to an OpenStack Private ...
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
Improving Operations Efficiency with Puppet
Scaling Bleeding Edge Technology in a Fast-paced Environment
Scaling on EC2 in a fast-paced environment (LISA'11 - Full Paper)
Bringing Business Awareness to Your Operation Team (Nagios World Conference 2...
Optimizing your Monitoring and Trending tools for the Cloud (Nagios World Con...

Recently uploaded (20)

PPTX
Welding lecture in detail for understanding
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
Lecture Notes Electrical Wiring System Components
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PDF
Structs to JSON How Go Powers REST APIs.pdf
PPTX
Strings in CPP - Strings in C++ are sequences of characters used to store and...
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PDF
Arduino robotics embedded978-1-4302-3184-4.pdf
PDF
PPT on Performance Review to get promotions
PPTX
additive manufacturing of ss316l using mig welding
PPTX
web development for engineering and engineering
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
DOCX
573137875-Attendance-Management-System-original
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPT
Mechanical Engineering MATERIALS Selection
Welding lecture in detail for understanding
Internet of Things (IOT) - A guide to understanding
Lecture Notes Electrical Wiring System Components
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Structs to JSON How Go Powers REST APIs.pdf
Strings in CPP - Strings in C++ are sequences of characters used to store and...
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
CYBER-CRIMES AND SECURITY A guide to understanding
Arduino robotics embedded978-1-4302-3184-4.pdf
PPT on Performance Review to get promotions
additive manufacturing of ss316l using mig welding
web development for engineering and engineering
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
573137875-Attendance-Management-System-original
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Embodied AI: Ushering in the Next Era of Intelligent Systems
Operating System & Kernel Study Guide-1 - converted.pdf
Mechanical Engineering MATERIALS Selection

<Programming> 2019 - ICW'19: The Issue of Monorepo and Polyrepo In Large Enterprises

  • 1. © 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. The Issue of Monorepo and Polyrepo In Large Enterprises ‹Programming› 2019 / ICW 2019 Nicolas Brousse | Director, SRE
  • 2. © 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Practical definitions Monorepo Use one unique source code repository for multiple projects and their dependencies. Polyrepo Use a source code repository for each project, component, and/or library. 2
  • 3. © 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. A decade of soul-searching Over the past 10 years, we went through: |-> Monorepo on SVN |-> Polyrepo on SVN with use of svn externals |-> Git polyrepo with Code Review (Gerrit) |-> Git polyrepo as mono with Code Review and use of submodules (Gerrit) |-> Git polyrepo with Github Pull Request Model (Bitbucket) |-> Git monorepo with Github Pull Request Model (Bitbucket) |-> Git monorepo with Github Pull Request Model (Github Enterprise) 3
  • 4. © 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Systems are becoming more complex 4 Complexity Microservices & Distributed Systems Human Cognitive Limit
  • 5. © 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Remember the Editor War? 5 Image credit: xkcd.com
  • 6. © 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. A repo war? 6 Structure Implementation Notable Adopters Polyrepo One distinct source code repository for each component and library Amazon, Netflix, Lyft Monorepo One source code repository for a whole company or large project Google, Facebook, Microsoft, Uber, Twitter, React, Angular, Kubernetes Hybrid Poly-as-Mono Updates are made to a polyrepo but managed like a monorepo Android, Chrome Hybrid Mono-as-Poly Updates are made into a monorepo but then split into read-only polyrepo for build or distribution purpose Symphony, Shopsys
  • 7. © 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 7 Monorepo Polyrepo Customized Developer workflows Unique Team Culture Use one unique source code repository for multiple projects and their dependencies Single source of truth Allow atomic changes simplify large scale refactoring Compound System Use a source code repository for each project, component, and/or library Independent releases cycles Each project may have a customized workflow Isolation
  • 8. © 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 8 “with a monolithic source tree it makes sense, and is easier, for the person updating a library to update all affected dependencies at the same time. The technical debt incurred by dependent systems is paid down immediately as changes are made.” Rachel Potvin and Josh Levenberg. 2016. Why Google Stores Billions of Lines of Code in a Single Repository. Commun. ACM 59, 7 (June 2016), 78–87. https://doi.org/10.1145/2854146 Diamond Dependency Problem
  • 9. © 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Culture at the center of the issue  Netflix’s Culture - “freedom and responsibility” and the “keeper test” (Polyrepo)  Google’s Philosophy - "It’s best to do one thing really, really well” and “Great just isn’t good enough” (Monorepo)  Microsoft - ”we needed a culture that allowed us to constantly refresh and renew” – Satya Nadella (Move from polyrepo to monorepo) 9 Source: levels.fyi
  • 10. © 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.  “An important aspect of Google culture that encourages code quality is the expectation that all code is reviewed before being committed to the repository.”  “A developer can make a major change touching hundreds or thousands of files across the repository in a single consistent operation.” 10 Rachel Potvin and Josh Levenberg. 2016. Why Google Stores Billions of Lines of Code in a Single Repository. Commun. ACM 59, 7 (June 2016), 78–87. https://doi.org/10.1145/2854146
  • 11. © 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 11 Phil Ensor. 1988. Organizational Renewal-Tearing Down the Functional Silos. In AME Study Group on Functional Organization. AME Target, 4–16.
  • 12. © 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 12 Jun He, Brian S. Butler, and William R. King. 2007. Team Cognition: Development and Evolution in Software Project Teams. J. of Management Information Systems 24 (2007), 261–292.
  • 13. © 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 13 “Software project teams’ ability to operate as a team arises from who they are (preexisting team characteristics) and how they interact (team communication). Team cognition concepts provide potential levers for managers seeking to improve the performance of these teams. An arbitrary collection of people can, with a great deal of effort and some luck, accomplish significant goals. However, by forming team cognition, those individuals can increase their chances of success. The more we understand about the formation of team cognition, both within software project teams and in general, the more effective we will be at explaining and supporting the formation of effective teams.” Jun He, Brian S. Butler, and William R. King. 2007. Team Cognition: Development and Evolution in Software Project Teams. J. of Management Information Systems 24 (2007), 261–292.
  • 14. © 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. “In 2014, we operationalized and validated a model of organizational culture proposed by sociologist Ron Westrum and showed that it drives both software delivery performance and organizational performance. Over the last few years we’ve found a number of management and technical capabilities that influence culture, showing that you can change culture by changing the way work is done in your organization.” “We find that technical and management practices shape culture and that culture in turn helps to improve performance outcomes.“ 14 DORA. 2018. Accelerate: State of DevOps Strategies for a New Economy.
  • 15. © 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Paper Conclusion Technical arguments between one model and another are not a clear-cut. “A monorepo facilitates cultural change and enables a holistic team cognition that ensures high quality work and improves communication, while preserving necessary autonomy.” --- Can the decisioning process of choosing a source code repository structure be more data driven and scientific? Is there an opportunity for architecture / design patterns that could benefit practitioners?15

Editor's Notes

  • #5: Microservices, Service Mesh, AIops, etc. https://www.linkedin.com/pulse/top-5-machine-learning-self-healing-techniques-used-sre-brousse/
  • #12: Association for Manufacturing Excellence
  • #13: “high-performing teams communicate significantly more frequently than low-performing teams”
  • #15: Nicole Forsgren, Jez Humble, and Gene Kim (DORA: DevOps Research and Assessment) Ron Wstrum -> Westrum Organizational Culture: Pathological, Bureaucratic, Generative Employee Net Promoter Score (eNPS) “Influencing culture through leadership and autonomy” Inverse Conway Maneuver