How Google Manages 2 Billion Lines of Code

Today's Wired article talks about Google's 2 billion lines of code and briefly describes how Google manages this code.

These 2 billion lines of code, covering search, Gmail, Docs, Maps, YouTube, Google+, and most other services provided by Google, are stored in "one" code repository, accessible to 25,000 Google engineers - which may is the largest single codebase in the world. There are a few exceptions: code that involves confidential information, such as the PageRank algorithm, or relatively independent projects, such as Android and Chrome systems, are stored in other separate code repositories. Easy sharing of code between engineers - which means all new projects and features can take advantage of previously written code - 2 billion lines is pretty much everything, and one improvement, all related projects can benefit.

What is the concept of 2 billion rows? When Windows XP was released 14 years ago, it contained 45 million lines of code—Google's amount of code, about 40+ XP.

Google manages this huge code repository with a system called Piper — which runs on 10 different data centers, manages about 85TB of data, and Google engineers make 45,000 commits a day. What is this concept? The equivalent of Google engineers rewriting Linux once a week.

Not only that, this system evolved from the predecessor Perforce, but also helps human engineers take care of various trivial code modifications and submissions, such as checking for bugs and cleaning up unused code, generating necessary configuration files, etc.— — The job of maintaining the health of the codebase is not just for engineers.

In addition, Google is working with Facebook on plans to make similarly powerful code management tools available to the outside world for the benefit of all engineers outside the company. But this system is not based on Git, but Mercurial. How will GitHub be affected when this system is made public?

In fact, not only Google's code is so huge and complex, but Microsoft is no less. On Hacker News, a Microsoft engineer talked about the data he knew: the amount of data exchanged on Microsoft's internal network every day by the Windows build system alone is several times the sum of all Netflix movies!
original address

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325714619&siteId=291194637