How Three Guys Rebuilt the Foundation of Facebook
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.
"Longtime developer and programming pundit David Pollack doesn’t buy the notion that PHP helps Facebook iterate at a faster clip."
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.)