0% found this document useful (0 votes)
10 views

13.Distributed Version Control System_compressed

Uploaded by

sarveshgupta6223
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

13.Distributed Version Control System_compressed

Uploaded by

sarveshgupta6223
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Distributed Version Control

System
• A distributed version control system (DVCS) brings a local copy of
the complete repository to every team member’s computer, so they
can commit, branch, and merge locally.
• The server doesn’t have to store a physical file for each branch, it just
needs the differences between each commit
Advantagaes of DVCS
• Reliable backup copies
• Fast merging and flexible branching
• Rapid feedback and fewer merge conflicts
• Flexibility to work offline
• Enhanced Security
• Reduced Dependency on Central Server
• Enhanced Collaboration
Repository
• A repository is the place where all the files of a project are stored,
organized and maintained. They contain a change history, giving
teams transparency and control over different possible versions.
Mono Repository
• It’s a software development strategy in which a company's entire code base is
stored in a single repository.
Prime behaviour of a Mono repository
• Centralisation: The codebase is contained in a single repository encompassing
multiple projects.
• Visibility: Code is visible and accessible for all intended users
• Synchronisation: The development process is trunk-based; engineers commit
to the head of the repo.
• Completeness: Any project in the repo can be built only from dependencies
also checked into the repo. Dependencies are un-versioned; projects must use
whatever version of their dependency is at the repo head.
• Standardisation: A shared set of tooling governs how engineers interact with
the code, including building, testing, browsing, and reviewing code
Benefits
• Single Source of Truth
• Coding Styles / Architectural Patterns
• Simplified Dependency Management
• Simplified Code Sharing
• Large-Scale Code Refactoring
• Diamond Dependency Problem
Disadvantages
1. Scaling Issues
• The repo can become very large and difficult to manage as projects
grow.

2. Increased Build Times


• Build times can become extensive; may require specialized tools.

3. Complexity in Version Control


• Managing branches and pull requests can become challenging in a
huge codebase.
Multi Repository
• In a multi-repo model, each service or module is in its own
repository, providing a modular structure.
Prime behaviour of a Multi repository –
• Repo per module: Separate repository per service/module
• Simplifies Polyglot: if there is a mix of languages and teams, multi-
repo is a pretty great structure to adopt
• Simplified DevOps Pipeline: New configurations required for each of
the new repositories added, but it does simplify the CI pipeline
execution.
Advantages
1. Modularity
• Each repo focuses on a single service or module.

2. Team Independence
• Teams can develop, test, and deploy independently.

3. Fine-grained Access Control


• Different access controls for each repo.

4. Customizable CI/CD
• Separate CI/CD pipelines for each repo.
Disadvantages
1. Dependency Management
• Dependencies across repos can become complex.

2. Cross-repo Coordination
• Changes affecting multiple services require coordination.

3. Higher Management Overhead


• Separate version control, permissions, and CI/CD setups for each
repo.
Difference
Choosing the Right Model
• Factors to Consider:

1. Project Size and Complexity


• Mono repo for smaller, tightly integrated projects; multi-repo for modular systems.

2. Team Structure and Independence


• Distributed teams benefit more from multi-repos.

3. Dependencies and Cross-Module Changes


• Mono repos handle shared dependencies easily.

4. CI/CD Needs and Scalability


• Multi-repos allow flexibility in automation pipelines.

You might also like