Facebook announces HipHop for PHP

Companies like Facebook not only see their core values centered around delivering products and services which “impact” people but also technology. Besides the OSS contributions to Memcached, Hive, Cassandra and Thrift, facebook team announced HipHop for PHP.

Mark Zuckerberg adopted OSS early on utilizing Memcached, Apache HTTP, MySql and PHP in his Harvard dorm to build the first Facebook site. Facebook is now comprised of millions of lines of PHP code. PHP provides Facebook with an expressive well understood programming environment for quickly generating new web content.

But of course due to their size and scale ( 400 Billion page views per month servicing 350 million people) they were faced with the constraints of an interpreted scripting language and its impact on CPU and memory.

PHP and ZEND runtime are highly optimize but at large scales the inefficiencies are quite costly. HipHop for PHP is a code generation technology with static analysis and transformation capabilities to turn PHP source code into c++ source code able to be compiled by g++. HipHop allows Facebook to run 50% less CPU with equal traffic on their web tier and 30% less CPU with 2x traffic on their application tier. Thats a significant number in terms of 10s of thousands of servers.

By allowing developers to continue to use PHP with its common syntax, tools and debugging, they don’t have to learn another language and deal with changing millions of lines of code (although who knows if that will be inevitable). Developers can code and debug with their natural toolsets and dynamic runtime while in development and than promote their code into a compiled set pushed out to the production systems.

HipHop is a great example of the ingenuity of the developer community to think outside the box and concentrate on delivering value to the business. I am sure their efforts will benefit the community of PHP developers at large in a profound way.

Bravo Facebook team..