Why Google stores Billions of lines of codes in a Single repository.

Ian CarsonIan Carson
2 min read

What is Google? - Tech Monitor

Google's monolithic repository provides a common source of truth for thousands of developers globally as they use it for 95% of their source codes. Only Google chrome and Android have separate specific ones.

Funny thing is they used CVS until they migrated to Perforce and later replaced that with Piper. The 2016 source says it has more than 2 Billion lines of codes and 40,000 commits per day by more than 10,000 engineers.

The engineers mainly use trunk-based development models at scale with a lot of success. Regarding branching, changes are pushed to the main branch and submitted for code reviews.All this removes nightmares of merge hell.

Tricorder carries out the first automatic checks when they try to submit new code and provides the initial automated feedback to the developer. And then, code review can be done using critique tool for code reviews.

Engineers use Rosie, a solution for massive refactoring, optimizations, code cleaning, and other tools. It enables changes to be divided, and reviews by each owner done before being built.

Advantages this approach brings is:

  • Unified Versioning.

  • Extensive code sharing.

  • Simplified dependency management.

  • Atomic changes.

  • Large scale refactoring.

  • Collaboration across teams.

  • Flexible code ownership.

  • Code visibility.

Disadvantages.

  • Having to create and scale tools for development overtime.

  • Code health and execution becomes more complex.

  • Codebase complexity increases.

More information can be read here

Thank you for stopping by and see you in the next one.

0
Subscribe to my newsletter

Read articles from Ian Carson directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Ian Carson
Ian Carson

A Disciplined, keen on details, and curious problem solver. I read and code a lot. I believe in Teamwork, Accountability, Transparency, and Competency.