SlideShare uma empresa Scribd logo
1 de 41
©
2022
Devops
Institute
CI/CD SKILup Day
Google Uses Monorepo, and I Don't -
Here's Why
Turja Narayan Chaudhuri
Thank You all for being here.
And , a Big Thank You to the DevOps Institute for
hosting this event , and inviting me over .
I hope you all have a wonderful session.
A brief about me -
• Currently , I am working as an Assistant Director,
Cloud Practice at EY (Ernst & Young).
• Before that I led the CCOE ( Cloud
Centre Of Excellence) Team at Accenture.
• I have around 10+ years of IT experience,
working on Public Cloud technologies since 2017.
Expectation management -
• This is not an introductory session on how to get started
with Source control repositories, or Git.
• It is expected that the audience for this session is already
familiar with Git, or any other source control repository
tool.
• This talk is primarily targeted at software developers,
devops architects, and build/release engineers who want
to know more about different repository structures, their
pros and cons, and how to choose between them.
Agenda -
• Section I - An introduction to Monorepo, and
Polyrepo.
• Section II - How does Google do Monorepo.
• Section III - Monorepo vs Polyrepo :
Advantages and Disadvantages.
• Section IV - What or how to choose?
• Section V - Conclusion and moving forward.
•Section I - An introduction
to Monorepo, and
Polyrepo.
• Section II - How does Google do Monorepo.
• Section III - Monorepo vs Polyrepo – Advantages and Disadvantages.
• Section IV - What or how to choose?
• Section V - Conclusion and moving forward.
In version control systems,
a repository is a data
structure that stores
metadata for a set of files or
directory structure.
What is a repository?
Primarily, there
are 2 types or
patterns
when it comes
to repository
structures.
Types/patterns of repo
The way an enterprise/software company organizes
its codebase, normally seems like a trivial topic, but
in reality, it has a huge impact on
- how fast the development teams can make
changes.
- how fast they can get those changes released in
production.
- how well developers can communicate and
collaborate amongst each other.
- how fast engineering can deliver credible
business value to the end users.
But, why should you be interested?
Monorepo and Polyrepo – A high
level view
What is a Monorepo?
• It is a single repository that contains more than one logical
project (e.g. an iOS client and a web-application)
• These projects are most likely unrelated, loosely connected
or can be connected by other means (e.g. via dependency
management tools)
• The repository is large in many ways:
Number of commits
Number of branches and/or tags
Number of files tracked
Size of content tracked (as measured by looking at the
.git directory of the repository)
Sample Monorepo structure
The Monorepo structure consists of a single
code repository with a hierarchical directory
structure that includes several projects.
A proposed structure is defined here, where
each microservice/project/
application can be
owned by different teams.
One single repo
Who uses Monorepo?
• Google uses a homegrown version-control system
to host one large codebase visible to, and used by,
most of the software developers in the company.
• Google's monolithic software repository is used by
95% of its software developers worldwide.
Who uses Monorepo?
• With thousands of commits a week across hundreds of thousands
of files, Facebook’s main source repository is enormous — many
times larger than even the Linux kernel, which checked in at 17
million lines of code and 44,000 files in 2013.
• And while conducting performance tests, the test repository
Facebook used were as follows:
4 million commits
Linear history
~1.3 million files
The size of the .git directory was roughly 15GB
The size of the index file was 191MB
A polyrepo architecture means using multiple
repositories, rather than one repository.
For example, a polyrepo can use a repo for a web app
project, a repo for a mobile app project, and a repo
for a server app project.
Polyrepo is also known as many-repo or multi-repo.
What is a polyrepo?
Sample Polyrepo structure
As you can see, in a polyrepo, each logical
structure of the code, in this case, say
services/domains, get one individual repo.
So, in this case the Monorepo shown earlier has
been broken down into
3 separate
Polyrepo.
One repo for apple
One repo for banana
One repo for grocery
High-level summary of Section I –
2 types of repo structures available today –
Monorepo where you have all projects/products of an
enterprise in a single repo
VS
Polyrepo where you create multiple repositories,
each one dedicated to a project/product/logical
segregation of a product.
• Section I - An introduction to Monorepo, and Polyrepo.
•Section II - How does
Google do Monorepo.
• Section III - Monorepo vs Polyrepo – Advantages and Disadvantages.
• Section IV - What or how to choose?
• Section V - Conclusion and moving forward.
Scale of Google Monorepo
Used by 95% of engineers at Google
,as of 2015 data
It’s way bigger than the Linux Kernel
As of 2015 data,
But why does Google use Monorepo?
Google tools for Monorepo management
High-level summary of Section II –
Google has been able to successfully adopt Monorepo at huge scale,
across billions of lines of code.
While doing that it has enjoyed the benefits that comes with adopting
Monorepo like code reuse, easier dependency management, etc.
But at the same time, to be able to use Monorepo properly across
such a big enterprise, it had to make significant investments,
both time and effort, in its tooling, practices and patterns.
• Section I - An introduction to Monorepo, and Polyrepo.
• Section II - How does Google do Monorepo.
•Section III - Monorepo vs
Polyrepo – Advantages
and Disadvantages.
• Section IV - What or how to choose?
• Section V - Conclusion and moving forward.
• Single source of truth
• Strong collaboration across
teams
• Standard coding, architectural
and testing patterns
• Simplified dependency
management
• Easy refactoring and code reuse
Advantages and
Disadvantages of
Monorepo
• IDE lag
• Git slowdown
• Broken master
• Long build times
• Codebase
complexity
• Tooling
investment
Monorepos are sometimes called
monolithic repositories, but they
should not be confused with monolithic
architecture, which is a
software development practice
for writing self-contained applications.
• Clear/strong ownership
• Smaller code base
• Narrow clones
• Fast build times
• Isolated master breakage.
Advantages and
Disadvantages of Polyrepo
• Integration issues
• Code searching, and
sharing
• Functionality
duplication
• Dependency hell
• Silos
An enterprise view of
Polyrepo
Can I change from Monorepo to Polyrepo and vice-versa?
Yes, you can, and you might have to based on the
state of your application/company from time to
time.
Uber moved from Monorepo to Polyrepo to back
again.
• Section I - An introduction to Monorepo, and Polyrepo.
• Section II - How does Google do Monorepo.
• Section III - Monorepo vs Polyrepo – Advantages and Disadvantages.
•Section IV - What or how
to choose?
• Section V - Conclusion and moving forward.
So, what should I choose?
The answer like many things in
software architecture is -
Monorepo vs Polyrepo
It is very much like – the concept of a glass
being half-empty/ half-full.
This topic, in itself has been a topic of a never-
ending debate, across engineers and software
professionals.
Nowadays, this is more of a subjective choice
that an organization makes and is related to
its engineering team’s toolchain and culture.
Don’t follow big companies blindly
Many times in enterprises, engineers tend to look at big
companies, and try to replicate their practices and patterns,
without understanding the monumental effort that has been
invested in making those initiatives work for them, at scale.
It’s never a good idea to just go with an approach because
Google/Facebook/Twitter said so.
Instead, the enterprise engineering team should try to measure
how the approaches impact the organisation, and then take a
decision that works for them.
• Section I - An introduction to Monorepo, and Polyrepo.
• Section II - How does Google do Monorepo.
• Section III - Monorepo vs Polyrepo – Advantages and Disadvantages.
• Section IV - What or how to choose?
•Section V - Conclusion
and moving forward.
A forward thinking approach
What if we could take the advantages of both
approaches, and try to minimize the
disadvantages, and come up with our own
repo structure, that works for our company,
and our teams.
The ultimate goal is to come up with a repo
structure that facilitates faster development,
and does not get in the way of your
development teams.
You need to strike a delicate
balance between – not storing
everything in a single repo, and
at the same time, keeping the
number of repositories to
manageable level.
Hybrid repo
Any solution should be tailored
for the specific requirements and
needs of the organization.
For example,
- One single Monorepo for all
infrastructure libraries,
cross-SL API, security
baselines, etc
- While individual service and utilities team
will continue to live in their separate
repositories, one per team.
References -
https://www.atlassian.com/git/tutorials/monorepos
https://engineering.fb.com/2014/01/07/core-data/scaling-mercurial-at-
facebook/
https://monorepo.tools/
https://www.youtube.com/watch?v=lV8-1S28ycM
https://eng.uber.com/android-engineering-code-monorepo/
https://www.youtube.com/watch?v=W71BTkUbdqE
https://www.fourtheorem.com/blog/monorepo
https://codeburst.io/monorepos-by-example-part-1-3a883b49047e
https://medium.com/outbrain-engineering/mono-repository-or-poly-repo-
we-go-hybrid-314e1e17a7dd
TurjaChaudhuri-
LinkedIn
Thank you so much !!
©
2022
Devops
Institute
CI/CD SKILup Day
Google Uses Monorepo, and I Don't - Here's Why
Thanks for Watching
Why not continue the conversation in the
Experts Corner?

Mais conteúdo relacionado

Semelhante a 2022 DOI SKILup Days_Google Uses Monorepo, and I Don't - Here's Why.pptx

Technology Development in Early Stage Startup Indonesia
Technology Development in Early Stage Startup IndonesiaTechnology Development in Early Stage Startup Indonesia
Technology Development in Early Stage Startup Indonesiakargoindonesia
 
Mobile media module part 6 - app development rev-mf
Mobile media module   part 6 - app development rev-mfMobile media module   part 6 - app development rev-mf
Mobile media module part 6 - app development rev-mfMichelle Ferrier
 
10 skills developers should invest in for 2014
10 skills developers should invest in for 201410 skills developers should invest in for 2014
10 skills developers should invest in for 2014Pakorn Weecharungsan
 
AliExpress’ Way to Microservices - microXchg 2017
AliExpress’ Way to Microservices  - microXchg 2017AliExpress’ Way to Microservices  - microXchg 2017
AliExpress’ Way to Microservices - microXchg 2017juvenxu
 
why google stores billions of lines of code in a single repository
why google stores billions of lines of code in a single repositorywhy google stores billions of lines of code in a single repository
why google stores billions of lines of code in a single repositorymustafa sarac
 
Engineering Software Products: 10. Devops and code management
Engineering Software Products: 10. Devops and code managementEngineering Software Products: 10. Devops and code management
Engineering Software Products: 10. Devops and code managementsoftware-engineering-book
 
DevOps: an efficient operating model
DevOps: an efficient operating modelDevOps: an efficient operating model
DevOps: an efficient operating model2i Testing
 
Cloud Academy Webinar: Recipe for DevOps Success: Capital One Style
Cloud Academy Webinar: Recipe for DevOps Success: Capital One StyleCloud Academy Webinar: Recipe for DevOps Success: Capital One Style
Cloud Academy Webinar: Recipe for DevOps Success: Capital One StyleMark Andersen
 
DevOps – Don’t Be Left Behind
DevOps – Don’t Be Left BehindDevOps – Don’t Be Left Behind
DevOps – Don’t Be Left BehindCapgemini
 
From hello world to goodbye code
From hello world to goodbye codeFrom hello world to goodbye code
From hello world to goodbye codeKim Moir
 
DevOps: The Right Abstraction Level
DevOps: The Right Abstraction LevelDevOps: The Right Abstraction Level
DevOps: The Right Abstraction LevelOtavio Fernandes
 
DOES15 - Mirco Hering - Adopting DevOps Practices for Systems of Record – An ...
DOES15 - Mirco Hering - Adopting DevOps Practices for Systems of Record – An ...DOES15 - Mirco Hering - Adopting DevOps Practices for Systems of Record – An ...
DOES15 - Mirco Hering - Adopting DevOps Practices for Systems of Record – An ...Gene Kim
 
Mirco hering devops for systems of record final
Mirco hering devops for systems of record finalMirco hering devops for systems of record final
Mirco hering devops for systems of record finalMirco Hering
 
DevOps and APIs: Great Alone, Better Together
DevOps and APIs: Great Alone, Better Together DevOps and APIs: Great Alone, Better Together
DevOps and APIs: Great Alone, Better Together MuleSoft
 
Enterprise DevOps: Crossing the Great Divide with DevOps Training
Enterprise DevOps: Crossing the Great Divide with DevOps TrainingEnterprise DevOps: Crossing the Great Divide with DevOps Training
Enterprise DevOps: Crossing the Great Divide with DevOps TrainingITpreneurs
 
Advantages and Disadvantages of React Native App Development
Advantages and Disadvantages of React Native App DevelopmentAdvantages and Disadvantages of React Native App Development
Advantages and Disadvantages of React Native App DevelopmentAPPNWEB Technologies
 
10.15.2014 dallas ws_brian_d_dn_live workshop enterpise agility_cust
10.15.2014 dallas ws_brian_d_dn_live workshop enterpise agility_cust10.15.2014 dallas ws_brian_d_dn_live workshop enterpise agility_cust
10.15.2014 dallas ws_brian_d_dn_live workshop enterpise agility_custdennisn129
 
No Code is the Future of Software –How can they add value in 2022.pptx
No Code is the Future of Software –How can they add value in 2022.pptxNo Code is the Future of Software –How can they add value in 2022.pptx
No Code is the Future of Software –How can they add value in 2022.pptxArpitGautam20
 
server to cloud: converting a legacy platform to an open source paas
server to cloud:  converting a legacy platform to an open source paasserver to cloud:  converting a legacy platform to an open source paas
server to cloud: converting a legacy platform to an open source paasTodd Fritz
 

Semelhante a 2022 DOI SKILup Days_Google Uses Monorepo, and I Don't - Here's Why.pptx (20)

Technology Development in Early Stage Startup Indonesia
Technology Development in Early Stage Startup IndonesiaTechnology Development in Early Stage Startup Indonesia
Technology Development in Early Stage Startup Indonesia
 
Mobile media module part 6 - app development rev-mf
Mobile media module   part 6 - app development rev-mfMobile media module   part 6 - app development rev-mf
Mobile media module part 6 - app development rev-mf
 
10 skills developers should invest in for 2014
10 skills developers should invest in for 201410 skills developers should invest in for 2014
10 skills developers should invest in for 2014
 
AliExpress’ Way to Microservices - microXchg 2017
AliExpress’ Way to Microservices  - microXchg 2017AliExpress’ Way to Microservices  - microXchg 2017
AliExpress’ Way to Microservices - microXchg 2017
 
why google stores billions of lines of code in a single repository
why google stores billions of lines of code in a single repositorywhy google stores billions of lines of code in a single repository
why google stores billions of lines of code in a single repository
 
Engineering Software Products: 10. Devops and code management
Engineering Software Products: 10. Devops and code managementEngineering Software Products: 10. Devops and code management
Engineering Software Products: 10. Devops and code management
 
DevOps: an efficient operating model
DevOps: an efficient operating modelDevOps: an efficient operating model
DevOps: an efficient operating model
 
Cloud Academy Webinar: Recipe for DevOps Success: Capital One Style
Cloud Academy Webinar: Recipe for DevOps Success: Capital One StyleCloud Academy Webinar: Recipe for DevOps Success: Capital One Style
Cloud Academy Webinar: Recipe for DevOps Success: Capital One Style
 
DevOps – Don’t Be Left Behind
DevOps – Don’t Be Left BehindDevOps – Don’t Be Left Behind
DevOps – Don’t Be Left Behind
 
From hello world to goodbye code
From hello world to goodbye codeFrom hello world to goodbye code
From hello world to goodbye code
 
DevOps: The Right Abstraction Level
DevOps: The Right Abstraction LevelDevOps: The Right Abstraction Level
DevOps: The Right Abstraction Level
 
DOES15 - Mirco Hering - Adopting DevOps Practices for Systems of Record – An ...
DOES15 - Mirco Hering - Adopting DevOps Practices for Systems of Record – An ...DOES15 - Mirco Hering - Adopting DevOps Practices for Systems of Record – An ...
DOES15 - Mirco Hering - Adopting DevOps Practices for Systems of Record – An ...
 
Mirco hering devops for systems of record final
Mirco hering devops for systems of record finalMirco hering devops for systems of record final
Mirco hering devops for systems of record final
 
DevOps and APIs: Great Alone, Better Together
DevOps and APIs: Great Alone, Better Together DevOps and APIs: Great Alone, Better Together
DevOps and APIs: Great Alone, Better Together
 
ERP Unit iii
ERP  Unit   iii ERP  Unit   iii
ERP Unit iii
 
Enterprise DevOps: Crossing the Great Divide with DevOps Training
Enterprise DevOps: Crossing the Great Divide with DevOps TrainingEnterprise DevOps: Crossing the Great Divide with DevOps Training
Enterprise DevOps: Crossing the Great Divide with DevOps Training
 
Advantages and Disadvantages of React Native App Development
Advantages and Disadvantages of React Native App DevelopmentAdvantages and Disadvantages of React Native App Development
Advantages and Disadvantages of React Native App Development
 
10.15.2014 dallas ws_brian_d_dn_live workshop enterpise agility_cust
10.15.2014 dallas ws_brian_d_dn_live workshop enterpise agility_cust10.15.2014 dallas ws_brian_d_dn_live workshop enterpise agility_cust
10.15.2014 dallas ws_brian_d_dn_live workshop enterpise agility_cust
 
No Code is the Future of Software –How can they add value in 2022.pptx
No Code is the Future of Software –How can they add value in 2022.pptxNo Code is the Future of Software –How can they add value in 2022.pptx
No Code is the Future of Software –How can they add value in 2022.pptx
 
server to cloud: converting a legacy platform to an open source paas
server to cloud:  converting a legacy platform to an open source paasserver to cloud:  converting a legacy platform to an open source paas
server to cloud: converting a legacy platform to an open source paas
 

Mais de Turja Narayan Chaudhuri

ADDO_2022_Turja_Your developers decide your security posture , not your secur...
ADDO_2022_Turja_Your developers decide your security posture , not your secur...ADDO_2022_Turja_Your developers decide your security posture , not your secur...
ADDO_2022_Turja_Your developers decide your security posture , not your secur...Turja Narayan Chaudhuri
 
SUSECON Digital 22 Scale your CICD setup for Cloud Native microservices via I...
SUSECON Digital 22 Scale your CICD setup for Cloud Native microservices via I...SUSECON Digital 22 Scale your CICD setup for Cloud Native microservices via I...
SUSECON Digital 22 Scale your CICD setup for Cloud Native microservices via I...Turja Narayan Chaudhuri
 
SUSECON Digital 22 Enterprise-Wide Kubernetes Adoption - Principles, Practice...
SUSECON Digital 22 Enterprise-Wide Kubernetes Adoption - Principles, Practice...SUSECON Digital 22 Enterprise-Wide Kubernetes Adoption - Principles, Practice...
SUSECON Digital 22 Enterprise-Wide Kubernetes Adoption - Principles, Practice...Turja Narayan Chaudhuri
 
OrteliusMicroserviceVisionaries2022_Why do you need a microservice catalog to...
OrteliusMicroserviceVisionaries2022_Why do you need a microservice catalog to...OrteliusMicroserviceVisionaries2022_Why do you need a microservice catalog to...
OrteliusMicroserviceVisionaries2022_Why do you need a microservice catalog to...Turja Narayan Chaudhuri
 
2022 DOI SKILup Days_Your Developers Decide Your Security Posture_Not Your Se...
2022 DOI SKILup Days_Your Developers Decide Your Security Posture_Not Your Se...2022 DOI SKILup Days_Your Developers Decide Your Security Posture_Not Your Se...
2022 DOI SKILup Days_Your Developers Decide Your Security Posture_Not Your Se...Turja Narayan Chaudhuri
 
DevSecOps in the Cloud from the Lens of a Well-Architected Framework.pptx
DevSecOps in the Cloud from the Lens of a  Well-Architected Framework.pptxDevSecOps in the Cloud from the Lens of a  Well-Architected Framework.pptx
DevSecOps in the Cloud from the Lens of a Well-Architected Framework.pptxTurja Narayan Chaudhuri
 
Agile Architecture and NFR in a Cloud Native Design.pptx
Agile Architecture and NFR in a Cloud Native Design.pptxAgile Architecture and NFR in a Cloud Native Design.pptx
Agile Architecture and NFR in a Cloud Native Design.pptxTurja Narayan Chaudhuri
 
Cloud lunchn learn_howtobecomeacloudarchitect_part3
Cloud lunchn learn_howtobecomeacloudarchitect_part3Cloud lunchn learn_howtobecomeacloudarchitect_part3
Cloud lunchn learn_howtobecomeacloudarchitect_part3Turja Narayan Chaudhuri
 
Cloud lunchn learn_howtobecomeacloudarchitect_part2
Cloud lunchn learn_howtobecomeacloudarchitect_part2Cloud lunchn learn_howtobecomeacloudarchitect_part2
Cloud lunchn learn_howtobecomeacloudarchitect_part2Turja Narayan Chaudhuri
 
Enterprise-Wide Kubernetes Adoption - Principles, Practices and Processes
Enterprise-Wide Kubernetes Adoption - Principles, Practices and ProcessesEnterprise-Wide Kubernetes Adoption - Principles, Practices and Processes
Enterprise-Wide Kubernetes Adoption - Principles, Practices and ProcessesTurja Narayan Chaudhuri
 
Cloud lunchn learn_howtobecomeacloudarchitect_part1
Cloud lunchn learn_howtobecomeacloudarchitect_part1Cloud lunchn learn_howtobecomeacloudarchitect_part1
Cloud lunchn learn_howtobecomeacloudarchitect_part1Turja Narayan Chaudhuri
 
Agile architectures in a modern cloud-native ecosystem
Agile architectures in a modern cloud-native ecosystemAgile architectures in a modern cloud-native ecosystem
Agile architectures in a modern cloud-native ecosystemTurja Narayan Chaudhuri
 

Mais de Turja Narayan Chaudhuri (12)

ADDO_2022_Turja_Your developers decide your security posture , not your secur...
ADDO_2022_Turja_Your developers decide your security posture , not your secur...ADDO_2022_Turja_Your developers decide your security posture , not your secur...
ADDO_2022_Turja_Your developers decide your security posture , not your secur...
 
SUSECON Digital 22 Scale your CICD setup for Cloud Native microservices via I...
SUSECON Digital 22 Scale your CICD setup for Cloud Native microservices via I...SUSECON Digital 22 Scale your CICD setup for Cloud Native microservices via I...
SUSECON Digital 22 Scale your CICD setup for Cloud Native microservices via I...
 
SUSECON Digital 22 Enterprise-Wide Kubernetes Adoption - Principles, Practice...
SUSECON Digital 22 Enterprise-Wide Kubernetes Adoption - Principles, Practice...SUSECON Digital 22 Enterprise-Wide Kubernetes Adoption - Principles, Practice...
SUSECON Digital 22 Enterprise-Wide Kubernetes Adoption - Principles, Practice...
 
OrteliusMicroserviceVisionaries2022_Why do you need a microservice catalog to...
OrteliusMicroserviceVisionaries2022_Why do you need a microservice catalog to...OrteliusMicroserviceVisionaries2022_Why do you need a microservice catalog to...
OrteliusMicroserviceVisionaries2022_Why do you need a microservice catalog to...
 
2022 DOI SKILup Days_Your Developers Decide Your Security Posture_Not Your Se...
2022 DOI SKILup Days_Your Developers Decide Your Security Posture_Not Your Se...2022 DOI SKILup Days_Your Developers Decide Your Security Posture_Not Your Se...
2022 DOI SKILup Days_Your Developers Decide Your Security Posture_Not Your Se...
 
DevSecOps in the Cloud from the Lens of a Well-Architected Framework.pptx
DevSecOps in the Cloud from the Lens of a  Well-Architected Framework.pptxDevSecOps in the Cloud from the Lens of a  Well-Architected Framework.pptx
DevSecOps in the Cloud from the Lens of a Well-Architected Framework.pptx
 
Agile Architecture and NFR in a Cloud Native Design.pptx
Agile Architecture and NFR in a Cloud Native Design.pptxAgile Architecture and NFR in a Cloud Native Design.pptx
Agile Architecture and NFR in a Cloud Native Design.pptx
 
Cloud lunchn learn_howtobecomeacloudarchitect_part3
Cloud lunchn learn_howtobecomeacloudarchitect_part3Cloud lunchn learn_howtobecomeacloudarchitect_part3
Cloud lunchn learn_howtobecomeacloudarchitect_part3
 
Cloud lunchn learn_howtobecomeacloudarchitect_part2
Cloud lunchn learn_howtobecomeacloudarchitect_part2Cloud lunchn learn_howtobecomeacloudarchitect_part2
Cloud lunchn learn_howtobecomeacloudarchitect_part2
 
Enterprise-Wide Kubernetes Adoption - Principles, Practices and Processes
Enterprise-Wide Kubernetes Adoption - Principles, Practices and ProcessesEnterprise-Wide Kubernetes Adoption - Principles, Practices and Processes
Enterprise-Wide Kubernetes Adoption - Principles, Practices and Processes
 
Cloud lunchn learn_howtobecomeacloudarchitect_part1
Cloud lunchn learn_howtobecomeacloudarchitect_part1Cloud lunchn learn_howtobecomeacloudarchitect_part1
Cloud lunchn learn_howtobecomeacloudarchitect_part1
 
Agile architectures in a modern cloud-native ecosystem
Agile architectures in a modern cloud-native ecosystemAgile architectures in a modern cloud-native ecosystem
Agile architectures in a modern cloud-native ecosystem
 

Último

CS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfCS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfBalamuruganV28
 
Paper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdf
Paper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdfPaper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdf
Paper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdfNainaShrivastava14
 
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Erbil Polytechnic University
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdfCaalaaAbdulkerim
 
Katarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School CourseKatarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School Coursebim.edu.pl
 
"Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ..."Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ...Erbil Polytechnic University
 
Prach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism CommunityPrach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism Communityprachaibot
 
Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Romil Mishra
 
Comprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdfComprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdfalene1
 
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.elesangwon
 
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingSystem Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingBootNeck1
 
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书rnrncn29
 
multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communicationpanditadesh123
 
Engineering Drawing section of solid
Engineering Drawing     section of solidEngineering Drawing     section of solid
Engineering Drawing section of solidnamansinghjarodiya
 
Immutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdfImmutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdfDrew Moseley
 
Robotics Group 10 (Control Schemes) cse.pdf
Robotics Group 10  (Control Schemes) cse.pdfRobotics Group 10  (Control Schemes) cse.pdf
Robotics Group 10 (Control Schemes) cse.pdfsahilsajad201
 
List of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdfList of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdfisabel213075
 
Input Output Management in Operating System
Input Output Management in Operating SystemInput Output Management in Operating System
Input Output Management in Operating SystemRashmi Bhat
 
DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM.pdf
DEVICE DRIVERS AND INTERRUPTS  SERVICE MECHANISM.pdfDEVICE DRIVERS AND INTERRUPTS  SERVICE MECHANISM.pdf
DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM.pdfAkritiPradhan2
 

Último (20)

CS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfCS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdf
 
Paper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdf
Paper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdfPaper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdf
Paper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdf
 
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdf
 
Katarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School CourseKatarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School Course
 
"Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ..."Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ...
 
Prach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism CommunityPrach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism Community
 
Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________
 
Comprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdfComprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdf
 
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
 
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingSystem Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event Scheduling
 
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
 
multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communication
 
Engineering Drawing section of solid
Engineering Drawing     section of solidEngineering Drawing     section of solid
Engineering Drawing section of solid
 
Immutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdfImmutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdf
 
Robotics Group 10 (Control Schemes) cse.pdf
Robotics Group 10  (Control Schemes) cse.pdfRobotics Group 10  (Control Schemes) cse.pdf
Robotics Group 10 (Control Schemes) cse.pdf
 
List of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdfList of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdf
 
Designing pile caps according to ACI 318-19.pptx
Designing pile caps according to ACI 318-19.pptxDesigning pile caps according to ACI 318-19.pptx
Designing pile caps according to ACI 318-19.pptx
 
Input Output Management in Operating System
Input Output Management in Operating SystemInput Output Management in Operating System
Input Output Management in Operating System
 
DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM.pdf
DEVICE DRIVERS AND INTERRUPTS  SERVICE MECHANISM.pdfDEVICE DRIVERS AND INTERRUPTS  SERVICE MECHANISM.pdf
DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM.pdf
 

2022 DOI SKILup Days_Google Uses Monorepo, and I Don't - Here's Why.pptx

  • 1. © 2022 Devops Institute CI/CD SKILup Day Google Uses Monorepo, and I Don't - Here's Why Turja Narayan Chaudhuri
  • 2. Thank You all for being here. And , a Big Thank You to the DevOps Institute for hosting this event , and inviting me over . I hope you all have a wonderful session.
  • 3. A brief about me - • Currently , I am working as an Assistant Director, Cloud Practice at EY (Ernst & Young). • Before that I led the CCOE ( Cloud Centre Of Excellence) Team at Accenture. • I have around 10+ years of IT experience, working on Public Cloud technologies since 2017.
  • 4. Expectation management - • This is not an introductory session on how to get started with Source control repositories, or Git. • It is expected that the audience for this session is already familiar with Git, or any other source control repository tool. • This talk is primarily targeted at software developers, devops architects, and build/release engineers who want to know more about different repository structures, their pros and cons, and how to choose between them.
  • 5. Agenda - • Section I - An introduction to Monorepo, and Polyrepo. • Section II - How does Google do Monorepo. • Section III - Monorepo vs Polyrepo : Advantages and Disadvantages. • Section IV - What or how to choose? • Section V - Conclusion and moving forward.
  • 6.
  • 7. •Section I - An introduction to Monorepo, and Polyrepo. • Section II - How does Google do Monorepo. • Section III - Monorepo vs Polyrepo – Advantages and Disadvantages. • Section IV - What or how to choose? • Section V - Conclusion and moving forward.
  • 8. In version control systems, a repository is a data structure that stores metadata for a set of files or directory structure. What is a repository?
  • 9. Primarily, there are 2 types or patterns when it comes to repository structures. Types/patterns of repo
  • 10. The way an enterprise/software company organizes its codebase, normally seems like a trivial topic, but in reality, it has a huge impact on - how fast the development teams can make changes. - how fast they can get those changes released in production. - how well developers can communicate and collaborate amongst each other. - how fast engineering can deliver credible business value to the end users. But, why should you be interested?
  • 11. Monorepo and Polyrepo – A high level view
  • 12. What is a Monorepo? • It is a single repository that contains more than one logical project (e.g. an iOS client and a web-application) • These projects are most likely unrelated, loosely connected or can be connected by other means (e.g. via dependency management tools) • The repository is large in many ways: Number of commits Number of branches and/or tags Number of files tracked Size of content tracked (as measured by looking at the .git directory of the repository)
  • 13. Sample Monorepo structure The Monorepo structure consists of a single code repository with a hierarchical directory structure that includes several projects. A proposed structure is defined here, where each microservice/project/ application can be owned by different teams. One single repo
  • 14. Who uses Monorepo? • Google uses a homegrown version-control system to host one large codebase visible to, and used by, most of the software developers in the company. • Google's monolithic software repository is used by 95% of its software developers worldwide.
  • 15. Who uses Monorepo? • With thousands of commits a week across hundreds of thousands of files, Facebook’s main source repository is enormous — many times larger than even the Linux kernel, which checked in at 17 million lines of code and 44,000 files in 2013. • And while conducting performance tests, the test repository Facebook used were as follows: 4 million commits Linear history ~1.3 million files The size of the .git directory was roughly 15GB The size of the index file was 191MB
  • 16. A polyrepo architecture means using multiple repositories, rather than one repository. For example, a polyrepo can use a repo for a web app project, a repo for a mobile app project, and a repo for a server app project. Polyrepo is also known as many-repo or multi-repo. What is a polyrepo?
  • 17. Sample Polyrepo structure As you can see, in a polyrepo, each logical structure of the code, in this case, say services/domains, get one individual repo. So, in this case the Monorepo shown earlier has been broken down into 3 separate Polyrepo. One repo for apple One repo for banana One repo for grocery
  • 18. High-level summary of Section I – 2 types of repo structures available today – Monorepo where you have all projects/products of an enterprise in a single repo VS Polyrepo where you create multiple repositories, each one dedicated to a project/product/logical segregation of a product.
  • 19. • Section I - An introduction to Monorepo, and Polyrepo. •Section II - How does Google do Monorepo. • Section III - Monorepo vs Polyrepo – Advantages and Disadvantages. • Section IV - What or how to choose? • Section V - Conclusion and moving forward.
  • 20. Scale of Google Monorepo Used by 95% of engineers at Google ,as of 2015 data
  • 21. It’s way bigger than the Linux Kernel As of 2015 data,
  • 22. But why does Google use Monorepo?
  • 23. Google tools for Monorepo management
  • 24. High-level summary of Section II – Google has been able to successfully adopt Monorepo at huge scale, across billions of lines of code. While doing that it has enjoyed the benefits that comes with adopting Monorepo like code reuse, easier dependency management, etc. But at the same time, to be able to use Monorepo properly across such a big enterprise, it had to make significant investments, both time and effort, in its tooling, practices and patterns.
  • 25. • Section I - An introduction to Monorepo, and Polyrepo. • Section II - How does Google do Monorepo. •Section III - Monorepo vs Polyrepo – Advantages and Disadvantages. • Section IV - What or how to choose? • Section V - Conclusion and moving forward.
  • 26. • Single source of truth • Strong collaboration across teams • Standard coding, architectural and testing patterns • Simplified dependency management • Easy refactoring and code reuse Advantages and Disadvantages of Monorepo • IDE lag • Git slowdown • Broken master • Long build times • Codebase complexity • Tooling investment
  • 27. Monorepos are sometimes called monolithic repositories, but they should not be confused with monolithic architecture, which is a software development practice for writing self-contained applications.
  • 28. • Clear/strong ownership • Smaller code base • Narrow clones • Fast build times • Isolated master breakage. Advantages and Disadvantages of Polyrepo • Integration issues • Code searching, and sharing • Functionality duplication • Dependency hell • Silos
  • 29. An enterprise view of Polyrepo
  • 30. Can I change from Monorepo to Polyrepo and vice-versa? Yes, you can, and you might have to based on the state of your application/company from time to time. Uber moved from Monorepo to Polyrepo to back again.
  • 31. • Section I - An introduction to Monorepo, and Polyrepo. • Section II - How does Google do Monorepo. • Section III - Monorepo vs Polyrepo – Advantages and Disadvantages. •Section IV - What or how to choose? • Section V - Conclusion and moving forward.
  • 32. So, what should I choose? The answer like many things in software architecture is -
  • 33. Monorepo vs Polyrepo It is very much like – the concept of a glass being half-empty/ half-full. This topic, in itself has been a topic of a never- ending debate, across engineers and software professionals. Nowadays, this is more of a subjective choice that an organization makes and is related to its engineering team’s toolchain and culture.
  • 34. Don’t follow big companies blindly Many times in enterprises, engineers tend to look at big companies, and try to replicate their practices and patterns, without understanding the monumental effort that has been invested in making those initiatives work for them, at scale. It’s never a good idea to just go with an approach because Google/Facebook/Twitter said so. Instead, the enterprise engineering team should try to measure how the approaches impact the organisation, and then take a decision that works for them.
  • 35. • Section I - An introduction to Monorepo, and Polyrepo. • Section II - How does Google do Monorepo. • Section III - Monorepo vs Polyrepo – Advantages and Disadvantages. • Section IV - What or how to choose? •Section V - Conclusion and moving forward.
  • 36. A forward thinking approach What if we could take the advantages of both approaches, and try to minimize the disadvantages, and come up with our own repo structure, that works for our company, and our teams. The ultimate goal is to come up with a repo structure that facilitates faster development, and does not get in the way of your development teams.
  • 37. You need to strike a delicate balance between – not storing everything in a single repo, and at the same time, keeping the number of repositories to manageable level.
  • 38. Hybrid repo Any solution should be tailored for the specific requirements and needs of the organization. For example, - One single Monorepo for all infrastructure libraries, cross-SL API, security baselines, etc - While individual service and utilities team will continue to live in their separate repositories, one per team.
  • 41. © 2022 Devops Institute CI/CD SKILup Day Google Uses Monorepo, and I Don't - Here's Why Thanks for Watching Why not continue the conversation in the Experts Corner?