How Facebook Copes with Scale: Three Approaches
theplatform.net
theplatform.net
That's why I don't get it, why they wrote Hack/etc. When I would be Facebook I would've tried to write something like JPHP where PHP could run on top of the JVM, since that introduces way more languages like Scala, Groovy, Java itself. However they gone from PHP to their self hosted language where it will even be hard to find developers when Hack won't grow.
"Our results have demonstrated the fantastic scalability of Erlang, and in this talk we will share some of the discoveries and modifications we have made along the path to supporting millions of connected users per server. "
Some of the speculations about why facebook bought them is their architecture build on top of Erlang
The web frontend: PHP/Hack
However they gone from PHP to their self hosted language
where it will even be hard to find developers when Hack
won't grow.
Hack is close enough to PHP where it's not hard to find devs who know 90% of the syntax right away -- and PHP syntax is quirky but not hard to learn either.Furthermore, developers don't need to have history with a specific language to be effective; hiring procedures at companies like Facebook and Google generally don't care what languages your background involved, except that you should be really familiar with some language.
Ultimately Hack made sense because they had a company of folks who've been writing PHP at scale and at speed for a long time. They wanted the subset of PHP that wasn't so unusable, and to make it good and fast. They've largely achieved that. It definitely makes sense.
And they do use other languages: Haskell, Erlang, JVM/C++ where needed.
> JPHP where PHP could run on top of the JVM, since that introduces way more languages like Scala, Groovy, Java itself
Using the JVM to move closer to the metal only works if you use another statically typed language with it, so only Scala and Java would qualify in this regard. Groovy's a dynamically typed language used for scripting and hence fairly slow. The static typing they introduced in version 2 didn't have any uptake, either on the JVM in version 2.0 or on Android in version 2.3, hence it's still buggy for this use case.
Facebook doesn't/can't/won't delete photos so how on earth is this sustainable? After 10-20 years wouldn't hosting costs just be too high to function?
[1] Aaverage cost per GB in 2014 was $0.03: http://www.statisticbrain.com/average-cost-of-hard-drive-sto...