Build vs. Buy: Adding chat to your app

Chat: a great addition to your app

In-app chat is picking up momentum. People are increasingly asking for social interaction to play a part in marketplace and on-demand service apps. When it comes to customer support, chat has long been a standard for websites, and it’s now gaining traction in mobile apps. As developers race to keep up with users’ expectations of communication features, they’re also taking advantage of benefits like boost in user engagement and ability to interact with customers directly.

Today, it’s a no-brainer to add chat to your app, but how? Should you build your own or choose an off-the-shelf API? This article reviews the costs of building your own app, and discusses what you can get with off-the-shelf add-ons, so you can make an educated decision.

Flexibility and customization

Some developers choose to create their own in-app chat because they are looking to integrate special types of interaction. When you build from scratch, the main benefit will be that it will operate exactly as you want it to. In this case, before starting development, you’ll want to create a clear specification with user workflow and some level of mock-up screens. Creating a detailed specification will allow you to have total clarity on what you need.

Typically, chat is built for one or more of the following applications:

  • Community building, for interactions among app users.
  • Commentary on live streaming or shared events, so that users can enjoy and share commentary in a live room while enjoying a live experience.
  • Collaboration, for example, in business applications where people are creating projects together.
  • Customer support, either for the app itself, or for the organization associated with the app (for example, a food delivery service that allows users to chat to support about problems with their order).

Once you have a specification, it’s worth reconsidering whether there are already APIs on the market that can fulfil your needs. You can compare your specifications to the capabilities of APIs like Pusher Chatkit, to make sure you really require something completely custom. 

If you are looking at articles about how to implement chat for free in 10 minutes, you might find out that the apps aren’t adequate, and conclude too quickly that you need your own full implementation. However, if you look into more professional plans, you’ll find there are rich and extensive APIs available, which will help you build almost anything you could imagine for your chat.

Time to market

The most obvious drawback of building your own application is the time to market. In the best case, it takes between a year and 18 months. Even if you are considering building your own chat interface, it might make sense to temporarily include an add-in. Let’s face it: today’s users don’t want to wait 18 seconds, much less 18 months for new features. And if your competition already has built-in chat, you really can’t afford to wait. 

Costs of building from scratch

One of the biggest pitfalls to avoid when building your chat app is to underestimate the amount of time and effort it will take. Yes, there are open source libraries and other components you can build on, but then you lose some control of the code. You’ll also need to consider the implications of needing to provide support for a component you might not understand in real life, because you don’t have the benefit of having written it yourself.

Building your own chat application typically requires the following components:

  • Elastic infrastructure (2 months): Building the backend infrastructure to handle tens of thousands of simultaneous chats. 
  • Elastic data storage (1-4 weeks, plus ongoing hosting costs): Chats accumulate a large amount of persistent state data which needs to be hosted. It is possible to do this part fairly quickly, but you will have ongoing cloud hosting costs.
  • Realtime infrastructure (2 months): It often comes as a surprise how much time is required to sustain realtime chats on mobile. Because this is somewhat straightforward on web infrastructure, most teams underestimate the complexity of maintaining realtime connections for mobile applications. This requires not just time, but the appropriate expertise. 
  • Seamlessness and integration (2 months): The realtime systems and persistent systems need to work together seamlessly. The complexity of getting these systems to work together can be daunting because of their distributed nature. 
  • Realtime features (6 months plus ongoing): Only after doing all of the infrastructure above, can the team focus on building the app according to those specifications you wrote in the last section. Not only will it take a few months to implement these features, but when it’s your proprietary software you have the ongoing maintenance to be accountable for.
  • Client state management (2 months): Finally, it’s necessary to manage the client state and manage the data consistency and relevance of the data to each client.

For most teams, this development would take 15 months and 3-5 full-time salaried programmers for development. Of course, we know, because we spent that much developing a chat app. And, it doesn’t end there. Security updates, added features, and keeping up with developments and changes in the source app are also necessary.

Dealing with bugs 

  •       Testing, debugging, costs when something goes wrong.

Additional features

As we described above, chat apps vary drastically depending on whether they are built for groups, community, customer support, or live stream commentary. A comprehensive chat app will allow you to implement any or all of these different features. Furthermore, as your app grows, you may want to make additions such as:

  • Indication of who has read a message.
  • Auto-responders when participants are not available for the chat.
  • Conversion of chat conversations to email records.
  • Control of private and public rooms and different levels of administrator privileges.
  • Ability to add files, images, videos, GIFs and emojis.
  • Typing indicators to know when someone is responding to a message.
  • Presence updates to know when participants are online and offline.
  • Jump to last read item or read cursors, so that each individual can see where they last left off the conversation and catch up easily.
  • Notifications for direct messages, mentions in a chat, etc.
  • Provisioning and permissions to create different levels of users for chat rooms and groups.
  • Push notifications for the app owner to keep conversations going, send out updates, and automate aspects of the conversation.

When developing your own chat app, you would have to individually develop each one of these features. Choosing an API will give you access to these and any other features that become popular. To remain competitive, we at Pusher need to make sure that we’re constantly adding features — and you’ll benefit from them with no additional costs to you.

Ongoing maintenance

Total cost of ownership (TCO) is always a concern when you are building your own chat app. First of all, you’ll have ever-increasing cloud provider costs as your app gains traction and you expand your operations.

Secondly, your development team will need to maintain the code. As you already know, there are ongoing security updates and changes to the operating system (Android and iOS) to take into consideration. Maintenance costs will vary, but any issues or bugs will be your problem, not to mention scalability. 

Choosing an API with proven high throughput will save you the headaches of dealing with scalability as your app adoption increases. Chat is intrinsically designed to increase the usage time of your app, so it’s predictable that your needs will grow. 

Conclusions

Adding chat to a mobile app doesn’t have to be time-consuming or costly. You can have an API-based chat app added and customized for your needs in a matter of days. Chat apps like Pusher’s Chatkit have been proven for a myriad of applications, with tens of thousands of simultaneous users. Not only will using an off-the-shelf API save you time and money, it will lower the risk of development. It’s still important to create a basic specification and needs definition before choosing the API that’s right for you, but in almost every case, you can find options that will be faster, cheaper, and risk-optimized compared to in-house development. 

About Pusher Chatkit

Pusher Chatkit provides the fastest and most flexible API on the market. Designed to work with any operating system, Chatkit can be integrated in a matter of days to your application. Chatkit is the quickest API for onboarding and rapid implementation, with a rich set of tutorials and documentation to get you started independently. Our pricing is completely transparent, so developers can get up and running right away. Most customers don’t need any personal support from our staff (but we’re on hand if you need us).

Another attribute that differentiates Pusher Chatkit from all the rest is our emphasis on realtime backend and data consistency. Our extensive experience with channels, distributed databases and channel bus systems sets us apart. You can be confident that your app will run quickly and consistently, with no downtime and lightning-fast messaging for your end users. The fully-featured system can be used for peer-to-peer chat as well as push notifications and chat assistance. A variety of customizations can be performed through the API, making it possible for you to meet the specifications you require, whatever they are.

Get started with Chatkit today.

Ready to begin?

Start building your realtime experience today.

From in-app chat to realtime graphs and location tracking, you can rely on Pusher to scale to million of users and trillions of messages