How We Built Our In-house Chat Platform for the Web
Jun 29, 2020Vasu Krishnamoorthy

Summary
This post details the technical implementation of an in-house chat platform for the web, focusing on the challenges of handling multiple browser tabs and maintaining a single TCP connection. It introduces the use of JavaScript's SharedWorker and BroadcastChannel APIs to manage state synchronization across tabs and abstract the underlying transport mechanism. The architecture involves a TCP gateway for mobile apps and a hybrid approach for the web using SharedWorker to manage connections and BroadcastChannel for inter-tab communication, ensuring a seamless user experience.
More from the Messaging System Redesign trail
- How we seamlessly migrated high volume real-time streaming traffic from one service to another with zero data loss and duplication
- Message Center - Redesigning the messaging experience on the Grab superapp
- How Kafka Connect helps move data seamlessly
- Real-time data ingestion in Grab
- Search indexing optimisation