How to Quickly Add Real-Time Chat Functionality to Your Software

Regardless of your field — whether it’s transportation, healthcare, education, or sales — you might need to implement live chat functionality in your web or mobile software. Live chat functionality will help your company ensure smooth and cost-effective online real-time communication between employees, partners, and customers by providing two main benefits:  

Improved service and problem resolution. Real-time web chat helps your staff multitask, communicate with several users at once, and delegate tasks to colleagues. This enables organizations to decrease personnel costs compared to phone-based support.

Easy oversight of communication. The availability of chats allows administrators and supervisors to easily access chat histories and find bits of conversation by sorting and filtering. Administrators and supervisors can also benefit from reports that provide metrics on the team’s performance and customer satisfaction.

Why you should consider ready-made live chat solutions 

Consumers expect a top-notch experience like what’s provided by popular social chat apps including Telegram, WhatsApp, and WeChat. But developing similar chat functionality from scratch requires lots of time and resources. 

Luckily, there are many ready-made real-time chat products that boast advanced features such as read receipts, group chats, emojis, the ability to share image, audio, and video files, and integrations with third-party APIs. These off-the-shelf solutions often ensure secure data transfer and are ISO 27001, HIPAA, and GDPR compliant, which is important for healthcare organizations and financial institutions.

Today, we’ll discuss how to build a real-time messaging app, what real-time third-party software as a service (SaaS) chat solutions exist, and how to choose the right real-time messaging service for your app.

medical chat functionality implemented by yalantis

Hosted and self-hosted chat services

Luckily for developers, there are numerous real-time messaging SDKs and chat APIs for embedding in-app messaging into web and mobile apps. With APIs, developers don’t have to reinvent the wheel and build complex chat solutions from the ground up. SaaS chat platforms can be divided into two groups: hosted and self-hosted.

Let’s find out how they differ and consider the advantages and disadvantages of each type.

Hosted real-time messaging services

Hosted messaging services offer a quick and easy way to add messaging capabilities to your software product using just a few lines of code. 

Essentially, a hosted messaging solution is a locked ecosystem that your web and mobile clients (and sometimes servers) connect to via SDKs and APIs in order to provide chat functionality. All you need to do is place a special code snippet in your app via an SDK and your users will be able to exchange text, voice, and video messages and share files.

Examples of hosted messaging services are LiveChat, PubNub, Pusher, QuickBlox, and Applozic. These services are easy to implement, and the companies behind them provide maintenance and support. 

Easy to implement. The idea behind paid messaging services is to simplify what would otherwise be a complex development process. Implementing a turnkey messaging solution allows businesses to focus on what makes their apps different from others (unique features or a  unique style) while the service provider takes care of the messaging functionality. 

Maintenance and support provided. By using a ready-made third-party messaging service, developers don’t have to worry about deploying code, supporting and maintaining code, fixing bugs, configuring servers, and so on, as this is all carried out by the hosted messaging service provider.

But there are also drawbacks of hosted messaging services:

Lack of control and limited customization options. Developers don’t have full control over a hosted system and have limited opportunities to configure chat functionality. Any changes to the system’s design and configuration are impossible without involving the service provider. And, of course, making these changes costs extra.

Relatively high cost for large projects. The more actively users communicate on your platform, the more costly the service. Chat services commonly charge based on an app’s monthly active users. We usually recommend hosted messaging solutions for small and medium-sized projects that have up to 50,000 users. For larger software products or those that expect to grow, hosted services won’t be the most cost-effective option.

If you need more control over your chat functionality and your project is large, consider using a self-hosted real-time messaging service.

Self-hosted real-time messaging services

Roughly speaking, a self-hosted messaging solution is something between a chat project developed from scratch and a ready-made solution provided by a third-party platform. A self-hosted messaging service offers source code that you can buy and deploy on your own servers, offering superior opportunities for making customizable features and styles.

However, along with greater customizability comes greater responsibility. For example, your developers will be responsible for configuring servers and deploying server-side code. They’ll also need to constantly support and maintain your real-time chat application. 

This entails spending more time, effort, and resources compared to a hosted service. For instance, you’ll need a separate team of engineers to support your chat solution. In special cases (e.g. when a new chat update arrives), developers may also need to spend time and effort figuring out how to integrate updates. Moreover, you’ll need to spend money to host your project on a server.

However, for large projects with over 100,000 users, a self-hosted solution is typically cheaper than a ready-made solution that charges for your users’ every move.

Read also: How to Choose the Proper Web Hosting Service for Your Website: Types and Tips

in-app chat in a web recruiting platform by yalantis

What hosted and self-hosted services we use to integrate live chat into apps

Our clients often ask us what third-party messaging solutions we use to integrate chat functionality into our projects. So we decided to prepare a list of reliable solutions we typically use to build chat-based apps and chat blocks for web and mobile applications. Let’s see what’s on the list.


The first solution we use is LiveChat, a popular customer service platform that according to Wikipedia is used by 27,000 customers from more than 150 countries. Large brands such as PayPal, IKEA, and Adobe use the service’s live chat software.

LiveChat can be embedded in web, desktop, and mobile apps. It’s appreciated by users for its ease of use, for its rich feature set that includes a helpdesk tool and a chatbot that can communicate with several users simultaneously, and for ensuring great security (all conversations are protected via 256-bit SSL encryption).  

To optimize the user experience, you can enable automatic welcome messages, pre-chat questions, and scripted responses for common inquiries. In case a chat agent can’t answer a user’s question or resolve an issue, the agent can transfer the user to another specialist. When a chat ends, the user can leave feedback.

LiveChat is relatively expensive compared to most other real-time chat solutions, especially if you need to set up several agent groups. 


Pusher is a hosted service that provides real-time communication and collaboration APIs (supported by easy-to-integrate SDKs for web, mobile, and back end) and cloud infrastructure that lets developers power their apps with real-time functionality such as instant messaging and push notifications.

Pusher serves as a real-time layer between an app’s server and its clients. This layer enables stable connections to clients over WebSockets, which we’ll get back to a bit later. If your servers have new data they need to push to clients, they can do it in no time using Pusher.

Pusher's architecture

Pusher offers libraries in some of the most popular languages including PHP, Ruby, Python, Java, .NET, and Go on the server side and JavaScript, Objective-C (iOS), and Java (Android) on the client side.

This service powers a number of popular products including GitHub, DoorDash, and Buffer.


Founded in 2010, PubNub is a real-time infrastructure as a service company that provides a secure and reliable two-way data network: the PubNub Data Stream Network, or simply DSN. The PubNub DSN is used by apps and other services that rely on regular and small signaling messages and powers everything from dating apps with integrated instant messaging blocks to smart IoT devices that communicate with each other in real time. Some of PubNub’s most prominent clients are McDonald's, Coca-Cola, and Adobe.

PubNub data stream network scheme

PubNub provides a set of powerful and robust APIs and SDKs to build fully functional, reliable, and secure web and mobile chat-based apps. PubNub chat is preloaded with all common chat functionality including chat rooms, typing indicators, and read receipts.

Moreover, PubNub provides point-to-point TLS network encryption and end-to-end AES message encryption and is HIPAA and EU-US Privacy Shield compliant, meaning it’s perfect for building chat blocks for all kinds of apps from delivery to healthcare. Read this post to learn about end-to-end encryption best practices.


Unlike LiveChat, Pusher, and PubNub, MongooseIM is a self-hosted massively scalable messaging platform. MongooseIM is enterprise-oriented, meaning it’s typically used to build large, high-performance, stable chat solutions. According to the company behind it, MongooseIM can successfully support 1,000 to 100,000 active users.

First of all, MongooseIM is an open source messaging platform. It was released under the GNU General Public License vol. 2 and can be used at any volume without license fees. Moreover, thanks to its clean and modular design, it can easily be integrated with existing solutions.

Even though the MongooseIM platform is open source, it has a dedicated support team ready to help you install, run, and scale it (for a price, of course).

When it comes to configuring your chat, custom chat app features can be developed in a private repository by a support team (which gives you sole access to them) or as open features that are maintained and expanded by the community.

MongooseIM architecture scheme

The MongooseIM team has contributed to a number of open source third-party libraries such as Smack for Android, the XMPPFramework for iOS, and Mongoose Push for the server side, which allows for more convenient integration with clients and servers.

All in all, MongooseIM is a stable, reliable, and easily integrated self-hosted platform that’s perfect for building large and high-performance messaging solutions.

Read also: An Extensive Guide to Messaging App Development 

What to consider when choosing a messaging service

Now that you have a basic understanding of what third-party messaging platforms exist, it’s time to find out what developers and business owners should take into account when choosing a third-party chat solution.

1. Protocol independence

A number of real-time communication protocols – such as WebSockets, MQTT, XMPP, BOSH, COMET, and long polling – are used to enable instant data exchange between an app’s clients and its server. At the end of the day, however, each protocol has its limitations. Moreover, the landscape of mobile devices, browsers, and protocols is constantly changing.

What this means is that businesses and developers need to choose a solution that can easily adapt to ever-changing environments and technologies.

Such protocol-independent solutions include PubNub and MongooseIM, which provide support for the most popular real-time communication protocols and are able to work in every network environment.

Read also: How to Use Websockets in Golang: Best Tools and Step-by-Step Guide

2. Cross-application support

With the immense diversity of devices, it’s important to choose a solution that provides support for as many runtimes and frameworks as possible. PubNub, for example, has over 70 SDKs for different client-side and server-side languages including Xamarin, React, Python, Go, Erlang, and Cocoa.

Pusher provides a number of its own libraries for a variety of platforms as well as a number of libraries developed and supported by members of the Pusher Channels Developer Community.

3. Support for rich media content

Modern users no longer send bold text messages. They love using emoji and stickers, audio, video, images, contacts, and locations – what’s called rich media. That’s why it’s important to let your users spice up their conversations with rich content.

Most instant messaging platforms support rich media. PubNub, for instance, allows users to upload and send videos, images, and documents up to 5 MB each. 

4. Pricing and business models

On the whole, hosted messaging solutions like PubNub offer a free tier that allows developers to build prototype apps, then push them to market and check if they resonate with the audience. PubNub offers a free plan for up to one million messages a month or 200 monthly active users to get your app up and running. It also includes basic support to handle minor challenges.

PubNub charges based on an app’s monthly active users, meaning the more people use your app and exchange messages, the more you’ll pay. On its official website, PubNub lets businesses calculate approximately how much they’ll pay for a certain number of messages exchanged.

Other services, like Pusher, offer a number of predefined subscription packages that contain different features.

A few words on Yalantis’ experience with real-time chat app development

At Yalantis, we have experience building messaging solutions based on Golang. The first advantage of Golang is its concurrency by design. The language provides lots of tools and features that make building concurrent programs simple and explicit. The second advantage is the fact that this language is statically typed and compiled to the native machine code.  

These two advantages of Golang allow for high processing speed and capability to bear up to million connections on the server.

To spice up your chats, you can use our own animated open source messaging solution called ForceBlur for displaying private content. This solution is great for cases when a user wants to surprise whoever they’re messaging. For example, if someone just got engaged and wants to let their friends know but doesn’t want to ruin the surprise, they might temporarily hide an image attached to a message. With ForceBlur, the image will only be visible after the recipient has “uncovered” it.

Thanks to our tutorial, you now know more about what messaging solutions exist and what services and tech stack we prefer to use in our projects at Yalantis. Need help building a custom instant messenger application? Drop us a line.

4.8/ 5.0
Article rating
Remember those Facebook reactions? Well, we aren't Facebook but we love reactions too. They can give us valuable insights on how to improve what we're doing. Would you tell us how you feel about this article?
Want to know us better?

Great idea

Explore our expertise

We use cookies to personalize our services and improve your experience on this website and its subdomains. We may use certain personal data for analytics and marketing purposes. Please read our Privacy Policy before using this website.