SlideDevopsSubjectEng set 8 (CVCS DVCS).pptx

43 views 16 slides May 02, 2024
Slide 1
Slide 1 of 16
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16

About This Presentation

devo


Slide Content

Centralized and Distributed Version Control System

Local Version Control Module Objectives 1 Distributed VCS 3 Centralized VCS 2 Comparison between CVCS and DVCS 4

Local Repository Local version control keeps track of the files within the local system. It saves a series of patches, but collaboration or branching is almost impossible with local repositories. A local repository, from a DVCS viewpoint is a collection of files which originates from a certain version of the repository.

Centralized Version Control System (CVCS) CVCS systems keep a single copy of the project on a central server and the developers commit their changes to this central copy of the project. Updates to the code is recorded in the central system; when developers pull the code, changes are automatically applied to the files that were changed and developers pull this updated version. CVCS eliminate the need to keep multiple copied of their files on their hard drives. Examples: CVS, Subversion, Preforce

Distributed Version Control System (DVCS) DVCS replicates the repository onto each user’s machine, i.e. each user has a self-contained first-class repository. There is no need for a privileged master repository, though teams have it by convention, for doing continuous integration.

Features of Distributed Version Control System Private workspace Easier merging Easy to scale horizontally

Advantages of Distributed Version Control System Other than push and pull, all actions can be performed very quickly , since it is the hard drive and not the remote server that is accessed every time. Changesets can be committed to local repository first and than a group of these changesets can be pushed to the central repository in a single shot. Only push and pull need internet connectivity. Every developer has a complete copy of the entire repository and the impact any change can be checked locally before the code is pushed to the central repository. DVCS is built to handle changes efficiently, since every change has a Global Unique Identifier (GUID) that makes it easy to track. Branching and merging is easy. DVCS is easy to manage as compared to CVCS

Disadvantages of Distributed Version Control System It may not always be obvious who did the most recent change File locking doesn’t allow different developers to work on the same piece of code simultaneously. It helps to avoid merge conflicts, but slows down development DVCS enables you to clone the repository – this could mean a security issue Managing non-mergeable files is contrary to the DVCS concept. If your project contains many large, binary files that cannot be easily compressed, the space needed to store all versions of these files can accumulate quickly. If your project has a very long history (50,000 changesets or more), downloading the entire history can take an impractical amount of time and disk space.

CVCS vs DVCS

CVCS vs DVCS

CVCS vs DVCS

Monorepo The monorepo approach uses a single repository to host all the code for the multiple libraries or services composing a company’s projects. The whole codebase from a company - spanning various projects and coded in different languages — is hosted in a single repository. Multirepo The multi-repo approach uses several repositories to host the multiple libraries or services of a project developed by a company. It’ll host every minimum set of reusable code or standalone functionality (such as a microservice) under its repository.

Monorepo Lowers Barriers of Entry Centrally Located Code Management Painless Application-Wide Refactoring More Difficult To Break Adjacent Functionality Teams Share Development Culture Multirepo Independent Library Versioning Independent Service Releases Helps Define Access Control Across the Organization Allows Teams To Work Autonomously Benefits

Monorepo Slower Development Cycles Requires Download of Entire Codebase Unmodified Libraries May Be Newly Versioned Forking Is More Difficult Multirepo Libraries Must Constantly Be Resynced May Fragment Teams Issues

Useful Links: https://www.toolsqa.com/git/git-tutorial/ https://www.atlassian.com/git/tutorials https://www.edureka.co/blog/interview-questions/git-interview-questions/