Foursquare: Here’s A Solution to Your PleaseRobMe Problem
March 11, 2010 – 12:50 PM | 0 Comments

By now you have probably heard of PleaseRobMe a service which aggregates all of the foursquare check-in’s into one place using the tweets sent out through the application.  There has been a lot of uproar …

Read the full story »
Geek

Read about the latest geek trends, news, and gadgets right here!

Malware Report

Learn about the latest threats online, how to remove them, and even how to prevent them.

Software

Find all the latest and greatest software out there for Windows, Mac, and Linux.

Twitter

Keep up with the latest from one of the web’s hottest sites (twitter.com).

Video

Never miss another of my videos again – view the latest videos from live.besttechie.net!

RSS FeedEmail SubscriptionsTwitterYouTubeFacebook
buzz_button

Home » Web
    Share/Bookmark

Facebook Introduces HipHop for PHP

Submitted by Michael Morris on February 2, 2010 – 5:40 PM0 Comments
Facebook Introduces HipHop for PHP

Facebook is a very large and complex content driven website. Like many other large websites, resource management is key to Facebook. Not only does it keep down CPU load and memory usage on their vast array of servers, but it is also used to ensure a fast load for every user that browses the website.  Due to Facebook being the size that it is, there are billions of page loads every month. Both from the users perspective, but also behind the scenes from AJAX loads to make the site more user appealing. This enormous amount of load means that they have to use a programming language that is not only easy to write and debug, but is also superior at ensuring the resources of the server that it is executed on is maintained to a standard.

So what programming language does Facebook use? Facebook uses one of the most popular choices amongst web developers: PHP. This simple yet powerful language is not only easy to write but also easy to maintain and debug. Unfortunately, when a website becomes as large as Facebook, there is millions on top of millions of lines of code to execute, so overtime performance is lost. Facebook over the years has made many contributions to the PHP project in order to try and boost overall performance, but it still did not meet their needs.

For two years a small group of engineers at Facebook have been working on a project to help increase the performance of PHP in order to make it an even greater platform for development and expandability. The project which is known as “HipHop for PHP” is said to have “… reduced the CPU usage on our Web servers on average by about fifty percent, depending on the page.” This achievement means Facebook is able to output the content of web pages at an even greater pace while also maintaining a level of resource usage that would require less servers to be used.

Facebook has been able to achieve this level of performance by changing how the PHP code is interpreted:

HipHop for PHP isn’t technically a compiler itself. Rather it is a source code transformer. HipHop programmatically transforms your PHP source code into highly optimized C++ and then uses g++ to compile it. HipHop executes the source code in a semantically equivalent manner and sacrifices some rarely used features — such as eval() — in exchange for improved performance.

Facebook will be making available HipHop for PHP at 7:30pm Pacific time as an open source project on github released under the PHP License. For the official announcement and to obtain HipHop for PHP when it becomes available, swing over to the Facebook Developer Blog entry on HipHop for PHP. This is a very exciting move for people who maintain PHP based websites, so be sure to check it out.

Related Products:

The Talent Code: Greatness Isn't Born. It's Grown. Here's How.
Code Complete: A Practical Handbook of Software Construction
The Code Book: The Science of Secrecy from Ancient Egypt to Quantum Cryptography
The Code
The Code [Blu-ray]

You might also like:

Facebook Connect: Login’s Made Easy

Facebook Chat Now Available In An IM Client Near You

Facebook Stopping Application Notifications March 1st

Facebook Attempts To Covers Its Bases On Variations Of Usernames

Tags: , , ,