SlideShare une entreprise Scribd logo
1  sur  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?

Contenu connexe

Similaire à 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
 

Similaire à 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
 

Plus 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
 

Plus 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
 

Dernier

High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 

Dernier (20)

High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 

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?