Google How Much..? 2 Billion Lines Of Code, Equal To 40 Windows..!


Google Search, Google Maps, Google Docs, Google +, Google Calendar, Gmail, YouTube ......, to realize the full two billion lines of code all Google services all into a code base management, which is perhaps the largest single code is global in use Library of.

Google how much? We can use the revenue, with the stock price, customer size, or use a virtual influence to answer this question. But these are not all. Google is a software empire. Therefore, we can use the code to answer this question.

When a few days ago to attend the General Assembly Scale, Google's Rachel Potvin gives a fairly close answer. She estimates run Google all Internet service (search, Gmail, Google Maps, etc.) of the desired software roughly equivalent to two billion lines of code. In contrast, since the beginning of 1980 has been developed for Microsoft Windows operating system (software ever single one of the most complex) is about 50 million lines.

That is Google's development of an amount corresponding to 40 times of Windows.

More surprising is that engineers use for Google 25000 This 2 billion lines of code are all placed in a code library. Within the company, Google put its code as a huge operating system. "Although we can not prove the age," Potvin said: "But I guess this is the world's largest with a single code base."

Google is an extreme example. But it's an example showing our software in the Internet age has been developed to the point of how complex - and also shows how we change the code tool and philosophy to adapt to this increased complexity. Google's huge code base is only for internal use. But from the point of view to some extent, it is equivalent to share vast amounts of code hosted on the Internet open source tool GitHub. We are rapidly toward large-scale codes collaborative world. This is the only way we have to keep up with the rapid evolution of Internet services.

Sam Lambert GitHub system director, said: "Like Google, which has had 25,000 developers, it means that people have a variety of different skills together to share the code but as a small company you can use as part of GtHub and get the advantage of open source is. saying called 'gone.' "

The downside is the developer and operator of two billion rows of giant scale is not a simple task.

GitHub achieve is to write code, it is very easy to share code and collaborate. But GitHub hosting is not a software project, but millions. Google is to go further, the combination into a number of projects. Due to coordinate such a large-scale code between so many engineers, this sounds a little crazy. But Potvin said they did.

In fact, Google has developed its own "version control system" to manage these codes, the system is called Piper, Piper traveled all the infrastructure Google built to run all of its online service, covering Google's 10 data centers.

Of course, this system is not installed 2 billion lines of code so that everyone can access internal company so simple. It also gives Google engineer unusual freedom to use and combination of code from the numerous projects. Potvin said: "In this case, when the hands of new projects do have a massive library of almost everything was done.." In addition, engineers can deploy first code changes immediately to all Google services. That is an update on the completion of all the upgrade.

The system also has some limitations. Potvin said some highly secret code - such as Google's Page Rank search algorithm is placed in a separate library inside, only certain employees to access. In addition, Google's Android and Chrome OS device is not online due to the run, and with the other services are very different, it is also stored in a separate stand-alone version control system inside. But most of all Google Code allows software modules, creative solutions and an overall free-flowing.


Meanwhile, Piper also the need to reduce most of the burden of human coders. It must ensure coders code, add all the necessary header files; ensure that the code change will not trample each other; make sure you can easily eliminate errors and useless code. These things are tricky, tricky part of the work to which the person is not able to dry up. So Google has migrated from the original Perforce version control system to Piper, now most of the commit is done automatically by the robots.

This is not to say that a robot to write code. Their job is to generate the required software to run large amounts of data and configuration files. "Need to work together in order to maintain the code of health," Potvin said: "And it's not just people's work, including the robot."

Whether other people can benefit from a similar system? of course. And indeed some people do that. Facebook's main application are about 20 million lines of code, they also put that code as a project. There's also doing something similar, but smaller scale. But once those companies approaching this scale Google or Facebook, it might logistical problems. The good news is Google and Facebook are exploring to change that - for everyone to change this.

The two giants is currently working an open source version control system, so that everyone can code for large-scale processing. Its foundation is Mercurial. "We're trying to see if I can make Mercurial reached the scale Google code base," Potvin said. She said, Google is working closely similar regulatory Facebook programming work Daniel Bryan O 'Sullivan et al.

This approach seems a bit extreme. From now on, there is no code that few companies can do the size of Google or Facebook. But in the near future will. Because the software is eating the world.

Also Check Out: How Big Is Google