Thursday, June 13, 2013

How Three Guys Rebuilt the Foundation of Facebook

Cade Metz:

In a nod to the company’s original PHP converter, they called the system the HipHop Virtual Machine, or HHVM for short, and it was soon installed beneath the live site, where it continues to run today.

HHVM uses what’s called just-in-time compilation, which means Facebook’s PHP code is converted to machine language as it executes on the server. This is the way the Java programming language runs, but the Java virtual machine was built over many years to serve an entire industry of programmers. The HipHop Virtual Machine was built just for Facebook — though, as with so many parts of its infrastructure, Facebook has open sourced the system, so that anyone can use it.

With the HipHop Virtual Machine, Facebook can run PHP at speeds most developers never thought possible. But some still wonder why the company would go to such extremes. Longtime developer and programming pundit David Pollack doesn’t buy the notion that PHP helps Facebook iterate at a faster clip.

1 Comment RSS · Twitter

"Longtime developer and programming pundit David Pollack doesn’t buy the notion that PHP helps Facebook iterate at a faster clip."

“PHP was optimized for doing a quick and dirty website. It’s remarkable to me that Facebook has been able to scale a quick-and-dirty language to a site as powerful and as flexible as the Facebook site,” he says. “But I just can’t see PHP being the best way to build a website. It’s kind of like people who live in New Jersey and call it the Garden State.”

As a non-programmer, with just enough knowledge to have vaguely-informed opinions, I've always been fascinated by the Facebook-like orgs running on PHP. I mean, I'm a non-programming scripter, and I can and have written PHP solutions.

So maybe that's it. I'll posit that low barriers to entry and incredibly broad literacy can trump coding elegance and efficiency on certain large and constantly modified institutional projects.

(And I've spent months in New Jersey and always enjoyed the state motto.)

Leave a Comment