Hacker News new | ask | show | jobs
by anonyfox 4571 days ago
Facebook just can't "switch" their backend. The mountain of built PHP stuff, including HHVM, is just too big to give up. They're of course not the typical beginners, but it's really easy to "get shit done" in PHP, so it happened that they used PHP when it all exploded in popularity, and mostly had to think on how to scale a running system massively, and not to rewrite everything from scratch again.

On the libraries side: compare with javascript... all the NPM stuff and frameworks out there, and all the clientside-libraries in addition (think alone jQuery plugins). There is much crap in the JS-Land, but the sheer amount beats PHP clearly i'd say.

Or take the JVM: the VM is a masterpiece of engineering/programming and has a lot of libraries availably, not only for web stuff, and supports many languages on top of it.

Or, if you have some experience in the .NET world and know your visual studio, you can literally drag'n'drop your website together out of layouts and components.

So far you can't share PHP code seamlessly between server & client (-> JS), your runtime doesn't run quite everywhere and allows you to use the language you like (-> JVM) or is preinstalled on every windows system today and has an excellent visual development tool (-> .NET).

Yes, every language and ecosystem has it's flaws, but mostly they have also some single strengths that outweight the disadvantages. When you must nail down what PHP's is: I say incredible cheap hosting, and tons of legacy stuff (ironically often dropped on shitty cheap hosting platforms).

You may find more stuff pro/con for all the samples i mentioned above, but i hope you understand the core problem.

1 comments

Unless the Facebook backend is a giant monolithic service, they seemingly could have used a loosely-coupled service-oriented architecture and rewrite individual services in some new language or platform. That's how Twitter migrated from Ruby to Java.