Engineering 

| 24 June 2016

Which technologies should be considered for making chat applications like Messenger and WhatsApp?


Building a chat application like whatsapp, fb messenger, hike, etc involves quite some setup. However, with modern SDKs building your own chat service has become a cake walk. It is about using the existing mechanism and plugging into your system. You can try Applozic for free and save your development time. However, to get an idea in the simplest manner about how the structure looks like, read below.

The whole setup is split into 3 blocks .

    1. Client facing app

    2. Messaging Channel

    3. Server setup/infra to handle messaging transactions at scale

In summary the tech involved would be

Client facing app

1. App ( which involves all the UI and basic UX, Android/iOS/Windows) [You can use libraries here]

2. Database to save data in device/work offline [SQLite/Realm]

3. Manage states for the device (i.e network change, calls ,etc) and respond for messaging based events [API dependent and available in target OS]

4. Maintain a connection with the server ( via Sockets, XMPP, MQTT)

5. Push Notifications [Firebase Cloud Messaging, Urban Airship, One Signal]

6. [optional] Media ( video/picture) and location feature [Google Maps SDK, Android Media Framework API].

Channel

1. Choose from Socket, XMPP or MQTT [Could be a mix of them too, depending on use case]

2. Make sure of the use cas,

    1. mqtt is for mobile devices and iot (preferred, refer to Paho Project)

    2. socket if you have desktop app (preferred)

    3. xmpp can work in both depending on the scale (GCM uses this).

Server

1. Setup an infra that takes care of saving messages as they come/go.

2. Load balancing on the server to manage scale when the number of connections increase/decrease

3. Id management to know which connection to use between two Id, maintaining the messaging logic

4. Setup topics to manage delivering messages as well as push notes

5. Database management

6. Error Handling to be resilient to messages being lost and error in network

7. [optional] Set up end-to-end encryption , to maintain user privacy, if not ..make sure data is not sent in plain text over the air.

8. To handle all the above you have to

    1. Code the logic in one of the server side language. Possible contenders would be NodeJS, Erlang, etc.

    2. Have a cloud infrastructure , possibly Google Cloud Platform / AWS / Azure

    3. API Specifications based of protocol(MQTT/XMPP/SOckets) used for messaging.

    4. Database could be NoSQL – Mongodb / Aerospike or SQL

    5. End-to-End encryption via the open source tech available OpenWhisper Systems

P.S : This is a simple answer , the stuff that goes on is complex and involves a lot of understanding on how to manage messages.

This post was originally published on Quora here.

With the rise in competition wherein chat and messaging is playing a vital role for various businesses it becomes imperative for every application to have an established real-time communication channel. On top, it is just matter of minutes to integrate such an awesome user-friendly functionalities/features with readily available chat and messaging SDKs like Applozic.

See how a real-time chat SDK and API can boost, enhance, and optimize your user experiences.

</section>

Applozic Chat is easy for
developers, invaluable for
businesses, and addictive for users

See how in-app chat, voice and video messaging can transform your app from ordinary to unforgettable, for any industry and any platform.

Related articles

blog-3

Development

12 min read

What’s New: Product Updates From November 2020 | Applozic

In the month of November, we have released the latest version of iOS SDK. The fastest way to integrate high-quality 1:1 voice and video calls inside your application [...]

ana mayer
Ana Mayer