Professional Documents
Culture Documents
Nikhil Saini
Nikhil Saini
Feb01
FacebookLinked In
WhatsApp is the most sought after messaging application that has revolutionized the
messaging app market. Several attempts have been made in vain to clone WhatsApp as
a chat app, but none of them yielded the result. Despite introducing similar
functionalities, no chat app has ever been able to topple WhatsApp�s supremacy as a
chat app.
In order to build a WhatsApp like chat application, one should have a detailed
understanding of its functioning mechanism and technicalities.
ERLANG is the programming language used to code WhatsApp. Code restructuring and
some important changes were made to the Ejabberd server to achieve optimal server
performance.
Further, Erlang is agile to adapting to instant updates and hot fixes. This is what
helps WhatsApp to quickly push the changes to live implementation without requiring
restarts.
In case of multimedia messages, contents (audio, video, or image) are uploaded into
a HTTP server and are linked with the content and then sent to the receiving node
(receiver) in the form of a thumbnail. Based on the user�s preference the content
can either be viewed or discarded.
As and when message is sent, it is queued on the server. The message waits in the
queue until the recipient reconnects to receive the message. As and when a message
is delivered the sender gets notified by a double check mark near the message.
After the delivery the messages are instantly deleted from the server memory.
This instant deletion from server memory helps WhatsApp keep its resources to a
bare minimum.
FreeBSD is the OS upon which WhatsApp is built. Improvising on the ERLANG based
applications and optimizing FreeBSD, WhatsApp is able to achieve better
performance. For storing multimedia files, the app uses an exclusive web server
YAWS.
5. End-to-end encryption
Whatsapp�s end-to-end encryption ensures rocks-solid for safety of text &
multimedia content. When you send messages, you phone does the encryption and send
it to Whatsapp server. The server gets the replies from the receiver�s end,
encrypts it and sends to your smartphone. Now, your phone decrypts the messages and
displays it.
7. Location Sharing
WhatsApp integrates Google Maps Android API and Google Places API. This API is used
for location sharing among the users. WhatsApp is enhanced according to their
multiple needs.
Ejabberd
Ejabberd, the open source Jabber server has been customized by Contus Fly to
improve operational efficiency. The XMPP protocol has also been customized to
speedup signing in and re-signing in sessions. To protect the app from DDOS attacks
and to prevent account spoofing, this mobile chat application has been encrypted
with HMAC.
Mnesia and MySQL
For data storing, Contus Fly makes use of both Mnesia and MySQL. While Mnesia is
used to maintain user login sessions, MySQL contributes in maintaining the user
details, right from account credentials to other personal data.
Cassandra database
Chat logs are a key for instant messaging applications. In order to save chat
history between several nodes, Contus Fly has deployed . This database offers a
good read write speed thus helping users to retrieve chat logs as and when they
need.
Amazon S3 bucket
Multimedia messages including audio, image, video are saved in Amazon S3 bucket.
Registration for the app usage can be done in multiple ways including mobile
number, email, user name password and social login.
As and when a user triggers a message, the chat app SDK sends a request to the
Ejabbered server. In return the server checks for the availability of the recipient
and if available, the delivery request is sent to the recipients SDK and then
delivered. If the recipient is offline, the data is stored in the Ejabbered as
message will be queued in the server.