"Certainly, Facebook has stuck with PHP in large part because it would be an even bigger task to rewrite the entire site in another language. It’s called The Legacy Problem. “Eventually, you get to a size where it’s not feasible to rewrite it all,” says Paroksi."
They're not going to rewrite all of the PHP code to some other language, but they've effectively got a shim in there in the form of the HHVM. They could introduce new aspects to the language via their VM, giving new ways to solve problems with new code/extensions but without sacrificing backwards compatibility. I will not be surprised if this evolves from Facebook in the next few years. What they produce may never leave Facebook's internal users (beyond what the HHVM exposes in its open source incarnation) but it may end up being a necessary way forward.
I always wondered why they don't do a more traditional web services-style rewrite. Break the site up into a smaller and smaller services first, then start rewriting individual services in Java or C++ or whatever. Pound away at it for a while, and eventually you'll have the whole site rewritten and refactored in a much more maintainable way.
3 comments
[ 3.3 ms ] story [ 19.9 ms ] threadThey're not going to rewrite all of the PHP code to some other language, but they've effectively got a shim in there in the form of the HHVM. They could introduce new aspects to the language via their VM, giving new ways to solve problems with new code/extensions but without sacrificing backwards compatibility. I will not be surprised if this evolves from Facebook in the next few years. What they produce may never leave Facebook's internal users (beyond what the HHVM exposes in its open source incarnation) but it may end up being a necessary way forward.