Design Chat Based application like whatsapp/wechat.

Medium
Company: Premium
GoogleAmazon

Let's design a chat application, think WhatsApp or WeChat, but simplified and focused on the core chatting functionality. We'll concentrate on the low-level design aspects: how to structure the classes, handle different message types, manage users, and ensure thread safety. We'll leave aside features like voice calls, video calls, stickers, and complex group management. The system should support one-on-one chats, group chats, and different message formats. The goal is to create a robust, extensible, and maintainable codebase that can form the foundation for a more feature-rich application. Think about how to add new message types (e.g., location sharing) without modifying existing core classes. How would you handle concurrent access to the chat history? This exercise isn't about building a distributed, scalable system for millions of users; it's about crafting a clean, well-designed, in-memory application.

Requirements

Interview Simulation

Experience a realistic interview conversation. The interviewer will ask clarifying questions,and you'll reveal your understanding of the requirements.

Interviewer

Let's start by understanding the scope. What are the core functionalities this system needs to provide?

💡 Interview Tip

Identify the Actors (Who uses the system?) and their Use Cases (What are they trying to achieve?). Start with the 'Happy Path' scenarios.

Press ⌘ + Enter to submit

Premium Content

View detailed solutions.

UNLOCK PREMIUM