Hacker News new | past | comments | ask | show | jobs | submit login

> WhatsApp was built almost entirely in Erlang + Mnesia. I honestly don't think they could have done it in PHP + Postgres.

WhatsApp backend is a heavily customised ejabberd - an XMPP server written in Erlang. Sure, they could have picked one of the other XMPP servers in a different language (I know of at least servers in Java, Lua, C).

So, I would say (as a developer who uses PHP in some situations) that while PHP is completely the wrong choice for an XMPP server, that isn't the main reason why WhatsApp used Erlang - they used it because they used an existing open source project as their base.




I doubt WhatsApp chose XMPP first and then ejabberd/Erlang. Even if they had built a custom protocol, the massive-scale concurrency required would have made Erlang just as good a target to build on. Java could have come close, but Erlang was the language with first class Actor-model and native massive-scale concurrency support.

Actually, they do use a custom protocol, one that heavily derives from XMPP. Turns out, they didn't need to build a backend from scratch in their chosen language because a similar one already existed.

Without inputs from the WhatsApp engineers on their early choices, my version of things^ is at least just as valid as yours.

EDIT: I was wrong. Source: an interview one of the creators of WhatsApp gave to wired: https://www.wired.com/2015/10/whatsapps-co-founder-on-how-th...


> I doubt WhatsApp chose XMPP first

You think it's just a coincidence that WhatsApp, FB messenger, Google Talk, EA Origin, PlayStation, HipChat, Cisco WebEx all use(d) XMPP for their IM/chat/VoIP?

Just because it's open only to a single vendor's client and isn't federated, doesn't mean it isn't still basically XMPP.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: