Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

Technology Behind Whatsapp Messenger

user-image
Question added by Rusevalt Salim , IT Support Engineer / Business Development Manager , MHC IT Solutions
Date Posted: 2014/06/04
Clarence Edward
by Clarence Edward , Senior System Engineer , F-Secure Corporation

According to http://highscalability.com/blog/2014/2/26/the-whatsapp-architecture-facebook-bought-for-19-billion.html :

 

Platform

Backend

  • Erlang

  • FreeBSD

  • Yaws, lighttpd

  • PHP

  • Custom patches to BEAM (BEAM is like Java’s JVM, but for Erlang)

  • Custom XMPP

  • Hosting may be in Softlayer

Frontend

  • Seven client platforms: iPhone, Android, Blackberry, Nokia Symbian S60, Nokia S40, Windows Phone, ?

  • SQLite

Hardware

  • Standard user facing server:

    • Dual Westmere Hex-core (24 logical CPUs);

    • 100GB RAM, SSD;

    • Dual NIC (public user-facing network, private back-end/distribution);

      General
      • WhatsApp server is almost completely implemented in Erlang.

        • Server systems that do the backend message routing are done in Erlang.

        • Great achievement is that the number of active users is managed with a really small server footprint. Team consensus is that it is largely because of Erlang.

        • Interesting to note Facebook Chat was written in Erlang in2009, but they went away from it because it was hard to find qualified programmers.

      • WhatsApp server has started from ejabberd

        • Ejabberd is a famous open source Jabber server written in Erlang.

        • Originally chosen because its open, had great reviews by developers, ease of start and the promise of Erlang’s long term suitability for large communication system.

        • The next few years were spent re-writing and modifying quite a few parts of ejabberd, including switching from XMPP to internally developed protocol, restructuring the code base and redesigning some core components, and making lots of important modifications to Erlang VM to optimize server performance.

      • To handle50 billion messages a day the focus is on making a reliable system that works. Monetization is something to look at later, it’s far far down the road.

      • A primary gauge of system health is message queue length. The message queue length of all the processes on a node is constantly monitored and an alert is sent out if they accumulate backlog beyond a preset threshold. If one or more processes falls behind that is alerted on, which gives a pointer to the next bottleneck to attack.

      • Multimedia messages are sent by uploading the image, audio or video to be sent to an HTTP server and then sending a link to the content along with its Base64 encoded thumbnail (if applicable).

      • Some code is usually pushed every day. Often, it’s multiple times a day, though in general peak traffic times are avoided. Erlang helps being aggressive in getting fixes and features into production. Hot-loading means updates can be pushed without restarts or traffic shifting. Mistakes can usually be undone very quickly, again by hot-loading. Systems tend to be much more loosely-coupled which makes it very easy to roll changes out incrementally.

      • What protocol is used in Whatsapp app? SSL socket to the WhatsApp server pools. All messages are queued on the server until the client reconnects to retrieve the messages. The successful retrieval of a message is sent back to the whatsapp server which forwards this status back to the original sender (which will see that as a "checkmark" icon next to the message). Messages are wiped from the server memory as soon as the client has accepted the message

      • How does the registration process work internally in Whatsapp? WhatsApp used to create a username/password based on the phone IMEI number. This was changed recently. WhatsApp now uses a general request from the app to send a unique5 digit PIN. WhatsApp will then send a SMS to the indicated phone number (this means the WhatsApp client no longer needs to run on the same phone). Based on the pin number the app then request a unique key from WhatsApp. This key is used as "password" for all future calls. (this "permanent" key is stored on the device). This also means that registering a new device will invalidate the key on the old device.

      • Google’s push service is used on Android.

      • More users on Android. Android is more enjoyable to work with. Developers are able to prototype a feature and push it out to hundreds of millions of users overnight, if there’s an issue it can be fixed quickly. iOS, not so much.

Technology and negativity all behind whatsapp

Mansoor Ali
by Mansoor Ali , Specialist Database Administrator , ETISALAT - Emirates Telecommunication Corporation

Client end user Back End: SQLite

 

Front End : to transfer messages using XMPP

 

Server end : no idea.

Monisha Bala
by Monisha Bala , PAPER PRESENTATION

BACKEND

  1. OS: freeBSD
  2. Server : yaws
  3. Server application : custom ejabberd
  4. Language : erlang
  5. Technology : custom XMPP

FrontEnd :

  1. XMPP : to transfer messages.
  2. Encryption: rc4
  3. Base64 : binary to ASCII over internet

MUHAMMAD IBRAHIM HANIF
by MUHAMMAD IBRAHIM HANIF , COMPUTER OPERATOR , INNOVALUE TRADING

To my knowledge, Ejabberd (http://www.ejabberd.im/ ) is the parent, this is XMPP server which provide quite good features of open source, Whatsapp uses some modified version of this, facebook messaging also uses a modified version of this. Some more chat applications likes Samsung's ChatOn, Nimbuzz messenger all use ejabberd based ones and Erlang solutions also have modified version of this ejabberd which they claim to be highly scalable and well tested with more performance improvements and renamed as MongooseIM.

Ejabberd is the server which has most of the featured implemented when compared to other. Since it is build in Erlang it is highly scalable horizontally

edward ofosu
by edward ofosu , manager , Brithty planet limted

it si ab plus to to world and the easy way to communicate with friend ans family member.

 

Ajin Balraj
by Ajin Balraj , IT Security & Systems Manager , Notions Group (Star Food Industries LLC, LaRonda Emirates LLC, Horizons Adhesive Labels LLC)

Mobile data based compressed messaging

florante ibanez
by florante ibanez , Laptop Technician , Digital World & Wamadhat

This Application gives online messaging plus attachment online or live, same as email but this one is live and giving accurate with fast chatting with sharing images, files such as .jpg .mp3 files just provide your mobile phone with3g/4g/wifi connections

Rusevalt Salim
by Rusevalt Salim , IT Support Engineer / Business Development Manager , MHC IT Solutions

Thank you so much

Anupama Rawat
by Anupama Rawat , Student , BIT MESRA

Ya offcourse Technology behind this Messenger, they connect people immediately anywhere in world. Is all about technology.

WHATSAPP USE A CUSTOMISED VERSION OF OPEN STANDARD XMPP UPON INSTALLATION.

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.