Using MongooseIM to deliver highly efficient and scalable messaging performance.

The Company

Since 2012, Beekeeper has strived to help companies connect their frontline workers with everything they need to improve lives and help their business thrive. It provides a platform to lead the digital transformation of companies with deskless workers (who make up roughly 80% of the global workforce). Beekeeper does this by providing a mobile-first software platform, with smart integrations. This connects people like hospitality staff, construction workers, police officers or ambulance drivers with all the integrations and team collaborations they need from a mobile application. At the heart of any company, a collaboration tool is a key messaging component. It reduces meetings, increases productivity and allows people to get real feedback and collaboration instantly. For this, Beekeeper looked into MongooseIM as the means to provide the instant messaging they needed.

The Challenge

Some of the basic requirements of a good collaboration messaging tool are:

1. Short-time delivery: Messages that don’t feel like instant, real-time communication don’t provide a good user-experience and can be a blocker to adoption.

2. Full archiving: Like any important workplace communication tool, there will be some messages that are important to revisit.

3. Smooth mobile experience: Where one or multiple devices can go offline, come back online and sync with the server and each other seamlessly.

All of these features are covered in MongooseIM, but there were other challenges specific to Beekeeper that needed to be solved.

One of the main challenges is providing an out-of-the-box solution for multiple companies, often with different needs and business units or working groups, with strict security requirements.

Two different customers might have similar or altogether different needs, but one thing they both require is complete isolation from each other- a space of their own to use.

Beekeeper needed to support an arbitrary and constantly changing number of such customers, all while keeping them isolated: the problem of multi-tenancy.

Of course, duplicating the installations is an inefficient solution which increases the demands on resources, increases the potential for error and increases cost.

Ultimately, what was needed was a partitioned installation with virtualised environments that showed different customers the right isolated version, based on the criteria of the business – aka XMPP dynamic domains. This way, each customer would live under their own XMPP domain that can be added and removed dynamically, at will.

The Solution

Erlang Solutions is a company that specialises in scalable and fault tolerant solutions to digital problems. One of its offerings, MongooseIM, is a messaging platform battle-tested over the years to be just that, a scalable and fault tolerant messaging platform. MongooseIM was chosen as the solution to Beekeeper’s problem, and for that, we prepared a plan of action, where the first point would be to ensure backwards compatibility with the offering Beekeeper already had. Devices needed to learn to speak the new XMPP protocol that supported chat, and likewise, any functionality the old system offered but wasn’t currently offered by MongooseIM needed to be implemented. While we supported the Beekeeper developers with XMPP training, documentation, and assistance, they supported us in implementing the features we were missing.

MongooseIM has a modular architecture. It consists of multiple blocks, such as inbox, group chats, and message archive management (MAM) which can be plugged in or disabled, depending on the project’s needs, and based on the served domain, i.e., one domain can serve MAM and another one might not. The overall idea is that it enables flexible solutions, where blocks can be added to the architecture with ease. Within this framework, we managed to create fine-grained read receipts, conversation metadata, integration with their message broker, and an extensive REST admin endpoint.

Once backwards compatibility was ensured, we added mentions, rich-text formatting, message metadata, simple read markers and the ability to mute or archive conversations.

Then there was the challenge of multi-tenancy. XMPP servers are usually exposed through DNS domains. Therefore it is common to map a single domain, or a very small set of them, to a node on the internet. MongooseIM was originally implemented to support one configuration set per domain and for these domains to be static. We needed to change a lot of the core code of our server in order to map a single configuration set to an uncountable and dynamic set of domains. This way, exposed features would not be looked up based on the domain, but on the configuration type for that domain, ensuring the internal MIM state is kept to a minimum and capable of serving an arbitrary number of domains, dynamically.

Together with Erlang Solutions we truly transformed our chat platform. MongooseIM is delivering unparalleled performance, scalability, and streamlined development for a highly efficient chat experience.

Filip Wieladek VP Technology at Beekeeper

The results & Key benefits

From Beekeeper: Together with Erlang Solutions, we migrated the Beekeeper chat platform to MongooseIM. As a result our chat platform experienced a remarkable improvement in performance, resulting in enhanced responsiveness, reduced latency, and faster message delivery. Beekeeper users now enjoy a seamless and efficient chat experience. The scalability and elasticity provided by MongooseIM’s architecture were crucial in handling our increased customer demand and traffic. The ability to scale horizontally offered the flexibility needed to scale our system efficiently. Decoupling the chat domain from our monolithic core also had a significant impact on our development cycles. This strategic decision led to improved agile development processes, enabling faster iterations, quicker bug fixes, and accelerated our overall feature delivery. Leveraging the power of XMPP, which is the protocol utilised by MongooseIM, Beekeeper’s chat system gained significant advantages. XMPP, as an open standard protocol specifically designed for real-time communication, perfectly aligned with Beekeeper’s Frontline Success System and its messaging capability requirements.