News for hackers. Stuff that matters.
Re:How Facebook Copes with Scale: Three Approaches by merb on Friday September 18, 2015 @05:37PM (#10242201)
I always wondered how much power could be saved if those platforms would be implemented nearer to the metal. I mean I don't want to flame PHP, etc.. but I think running at the scale of Facebook it will definitely matter which language you use, especially in the matter of computing power, I mean Facebook could throw enough people at anything so the choice of language shouldn't be a problem.

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.

Re:How Facebook Copes with Scale: Three Approaches by gt565k on Friday September 18, 2015 @06:38PM (#10242444)
Check out whats app's architecture

"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. "

https://vimeo.com/44312354

Some of the speculations about why facebook bought them is their architecture build on top of Erlang

Re:How Facebook Copes with Scale: Three Approaches by simonw on Friday September 18, 2015 @07:49PM (#10242711)
Facebook Chat was originally written in Erlang: https://www.facebook.com/notes/facebook-engineering/chat-sta... - but they ended up switching it from Erlang to C++: https://www.quora.com/When-did-Facebook-switch-away-from-usi...
Re:How Facebook Copes with Scale: Three Approaches by kajecounterhack on Friday September 18, 2015 @11:18PM (#10243155)

  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.

Re:How Facebook Copes with Scale: Three Approaches by vorg on Saturday September 19, 2015 @08:33AM (#10244100)
> I always wondered how much power could be saved if those platforms would be implemented nearer to the metal.

> 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.

Re:How Facebook Copes with Scale: Three Approaches by segmondy on Friday September 18, 2015 @09:36PM (#10242971)
You must be living under a rock if you think facebook is doing everything in PHP. Do you really believe the neural network and video encoding mentioned in the article was written in PHP?
Re:How Facebook Copes with Scale: Three Approaches by frik on Saturday September 19, 2015 @01:56AM (#10243441)
Neural network: Lua

The web frontend: PHP/Hack