Archicise
Exercise

Design a Chat Application

Build a real-time messaging platform similar to Slack or Discord that supports direct messages, group chats, and channels.

Functional Requirements

  • Real-time messaging with instant delivery
  • Support for direct messages and group conversations
  • Message history with search functionality
  • File and media sharing within chats
  • Online presence indicators and typing status
  • Message reactions and threads

Non-Functional Requirements

  • Sub-second message delivery globally
  • Support millions of concurrent connections
  • Message persistence and offline sync
  • 99.9% availability

Questions to Consider

  • What protocol will you use for real-time communication?
  • How will you handle millions of concurrent WebSocket connections?
  • How do you ensure message ordering and delivery guarantees?
Your Solution

Real-time Communication

Design the real-time messaging protocol. Consider WebSockets vs SSE, connection management, heartbeats, and reconnection strategies.