Complete Guide to the Chat Architecture

Image for post
Image for post

So, what is a well-architectured chat? Hmmm, that’s the question!

The major task that we at Yellow have to solve every time that we embark on a new chat building project is how to make the chat scalable and tailored to the customer’s wishes. Having engineered chats for a wide range of products, we found out that the task can be resolved at the level of chat architecture.

In this article, we’re going to share our approach to chat architecting and explain why we consider it a good chat building practice. Here we go!

First, let’s take a look at our version of chat architecture and its components.

Chat Architecture: How We Approach It

A chat consists of two major parts:

Both parts contain various components that communicate with each other and bring the chat into action.

Image for post
Image for post

Chat Server Engine is a core of the chat architecture that handles message delivery and dispatch. In our version of chat architecture, it includes the following components:

Chat App is the other major part of the chat architecture, the one that users directly interact with. It’s split into three separate root components:

What Are The Benefits Of Our Approach?

Separation of components is at the core of our chat architecture. All the services that the architecture comprises are independent from each other. Why? It’s beneficial from many perspectives:

The same is true for migration. If you want to migrate one component to another service, you can do so without disturbing the rest of the components. We’ve seen it ourselves when we migrated one of our products, Famlicious, from one service to another.

The Yellow’s Case: Famlicious

Famlicious is a family messenger app for keeping in touch with all family members.

Some of the components of the Famlicious architecture-WebSocket Server, Chat Server Engine, and Chat Client Engine-were run on QuickBlocks. One day, QuickBlocks stopped being supported, which means we couldn’t use it in the project anymore. We started thinking of the alternatives and chose PubNub.

As far as all of the components in the Famlicious architecture are fully independent from each other, we managed to migrate the three components from QuickBlocks to PubNub without involving the entire architecture. And what’s even more important, migration didn’t affect the app operation at all and went totally unnoticed by the users.

That was a brief introduction to the topic of chat architecture. In the coming articles, we’re going to go deeper into the role of every chat component and share more good practices on how to build chats. Stick around and remember to visit our LinkedIn page for other engaging topics.

Image for post
Image for post

Originally published at

Written by

A team of engineers writing about web & mobile applications, here’s how we think ( and live (

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store