How Google manages 2 billion lines of code

Source: Internet
Author: User

How Google manages 2 billion lines of code

"Wired" Today, an article about Google's code has reached 2 billion lines, and a brief introduction of how Google manages the code.


These 2 billion lines of code, including search, Gmail, docs, maps, YouTube, Google + and most of the services offered by Google, are stored in the "one" code warehouse, 25,000 Google engineers can access-this is probably the world's largest single code base. There are only a few exceptions: code that involves confidential information, such as the PageRank algorithm, or relatively standalone items, such as Android and Chrome systems, are stored in separate code repositories. It's easy to share code between engineers-meaning that all new projects and features can take advantage of previously written code-2 billion lines are almost all-encompassing, and one improvement, all related projects can benefit.


What is the concept of line 2 billion? 14 years ago, when Windows XP was released, it contained 45 million lines of code--google, approximately 40 XP.


Google uses a system called Piper to manage this huge code warehouse--a system that runs on 10 different data centers and manages about 45,000 commits per day for 85tb,google engineers. What is this concept? It's equivalent to Google engineers rewriting Linux once a week.


Not only that, the system evolved from the predecessor Perforce, but also to help human engineers to take care of trivial code modifications and submissions, such as checking bugs and cleaning up unused code, generating the necessary configuration files, and so on--maintaining the code base health is not only the work of engineers.


In addition, Google is working with Facebook to deliver similar powerful code management tools to the outside world, benefiting all engineers outside of the company. But this system is not based on git, but mercurial. What happens to GitHub when the system is made public?


In fact, not only Google's code is so large and complex, Microsoft is no inferior. Microsoft engineers at Hacker News said they knew the data: only the amount of exchange data generated by the Windows build system on Microsoft's internal network per day is the equivalent of the sum of all Netflix movies!


How Google manages 2 billion lines of code

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.