Low Level Design (LLD) Coding

WhatsAppYouTube
Buy Course

Low Level Design (LLD) Coding

Design (LLD) a real-time chat system with support for millions of concurrent users - Machine Coding

Design (LLD) a real-time chat system with support for millions of concurrent users - Machine Coding

Subhahu Jain's photo
Subhahu Jain
·Jul 15, 2023·

9 min read

Table of contents

  • Features Required:
  • Design Patterns Involved or Used:
  • Code (Java)
  • Issues in Above Design
  • 1️⃣ Real-Time Messaging Is Not Real-Time
    • Current Flow
    • Problems
    • Solution
  • 2️⃣ ChatRoom Is Not Thread-Safe (Critical)
    • Current State
    • Concurrency Issues
    • Solution
  • 3️⃣ Message Ordering Is Not Guaranteed
    • Problem
    • Failure Case
    • Solution
  • 4️⃣ PresenceManager Singleton Will Break at Scale
    • Current
    • Issues
    • Solution
  • 5️⃣ Observer Pattern Is Blocking & Unsafe
    • Current
    • Problems
    • Solution
  • 6️⃣ ChatServer Is a Monolith Bottleneck
    • Current
    • Issues
    • Solution
  • 7️⃣ LoadBalancer Logic Is Incorrect
    • Current
    • Problems
    • Solution
  • 8️⃣ Message History Is Unsafe & Incomplete
    • Current
    • Issues
    • Solution
  • 9️⃣ Private Messaging Is Not Enforced
    • Current
    • Solution
  • 🔟 Publish-Subscribe Pattern Is Claimed, Not Implemented
    • Reality
    • Solution
  • 1️⃣1️⃣ No Backpressure Handling
    • Missing
    • Solution
  • 1️⃣2️⃣ No Offline Message Handling
    • Missing
    • Solution
  • 1️⃣3️⃣ MVC Pattern Is Not Applicable Server-Side
    • Issue
    • Solution
  • 1️⃣4️⃣ No Idempotency or Retry Safety
    • Problem
    • Solution
Beginner DevelopersGeneral ProgrammingPythonJavaScriptNode.js

©2026 Low Level Design (LLD) Coding

Publish with Hashnode

Powered by Hashnode - Home for tech writers and readers