Facebook Revamps PHP-Based Web Pages

By

They may not know it, but Facebook users are navigating the ultra-popular social network with a new and improved computing infrastructure. Company officials announced Dec. 9 that it is again revamping the way it handles PHP-based Web pages, to improve the experience for its 800 million users.

Last year, Facebook deployed HipHop for PHP to help support the growing number of Facebook users.

“While HipHop has helped us make significant gains in the performance of our code, its reliance on static compilation makes optimizing our code time consuming. We were also compelled to develop a separate HipHop interpreter (hphpi) that requires a lot of effort to maintain. So, early last year, we put together a small team to experiment with dynamic translation of PHP code into native machine code,” explained Jason Evans, a software engineer on the HipHop team at Facebook, one of nearly 20 people who have contributed to the hhvm project so far.

According to Evans, the upshot of all that work is a new PHP execution engine based on the HipHop language runtime called the HipHop Virtual Machine (hhvm).

“We’re excited to report that Facebook is now using hhvm as a faster replacement for hphpi, with plans to eventually use hhvm for all PHP execution,” Evans wrote in a Facebook Note.

According to Facebook, this PHP execution engine is 60 percent faster than its current PHP interpreter and uses 90 percent less memory.

“The difference between eight-second and five-second reloads due to switching from hphpi to the hhvm interpreter makes a big difference to productivity, and this improvement will be even more dramatic once we enable the translator,” Evans said.

Originally, PHP was designed as a Web scripting language to add dynamic content to Web pages. “PHP is a vital part of Facebook, in that it, along with JavaScript, is used to help assemble each user’s unique home page,” ComputerWorld explained.

“As with code rendered by most scripting languages, however, PHP applications do not run as fast as programs written in full-fledged programming languages such as C++, which are compiled into machine-readable byte code ahead of time,” the report said.

Ultimately, Facebook’s HipHop transforms PHP extensions into highly optimized C++ code, which means they run faster when executed.


Erin Harrison is Executive Editor, Strategic Initiatives, for TMC, where she oversees the company's strategic editorial initiatives, including the launch of several new print and online initiatives. She plays an active role in the print publications and TechZone360, covering IP communications, information technology and other related topics. To read more of Erin's articles, please visit her columnist page.

Edited by Rich Steeves

Executive Editor, Strategic Initiatives

SHARE THIS ARTICLE
Related Articles

Coding and Invention Made Fun

By: Special Guest    10/12/2018

SAM is a series of kits that integrates hardware and software with the Internet. Combining wireless building blocks composed of sensors and actors con…

Read More

Facebook Marketplace Now Leverages AI

By: Paula Bernier    10/3/2018

Artificial intelligence is changing the way businesses interact with customers. Facebook's announcement this week is just another example of how this …

Read More

Oct. 17 Webinar to Address Apache Spark Benefits, Tools

By: Paula Bernier    10/2/2018

In the upcoming webinar "Apache Spark: The New Enterprise Backbone for ETL, Batch and Real-time Streaming," industry experts will offer details on clo…

Read More

It's Black and White: Cybercriminals Are Spending 10x More Than Enterprises to Control, Disrupt and Steal

By: Cynthia S. Artin    9/26/2018

In a stunning new report by Carbon Black, "Hacking, Escalating Attacks and The Role of Threat Hunting" the company revealed that 92% of UK companies s…

Read More

6 Challenges of 5G, and the 9 Pillars of Assurance Strategy

By: Special Guest    9/17/2018

To make 5G possible, everything will change. The 5G network will involve new antennas and chipsets, new architectures, new KPIs, new vendors, cloud di…

Read More