How kousiknath/lowleveldesign works
High-Level Project Structure
a. Core Systems (Group the implementations into categories):
• Gaming Systems (Snake, Tic-tac-toe, Connect Four)
• Booking Systems (BookMyShow, Meeting Room)
• Infrastructure Systems (Thread Pool, Connection Pool, Logger)
• E-commerce Systems (Amazon)
• Communication Systems (Chat, Notification)
• Transportation Systems (Uber, Elevator)
• Financial Systems (Stock Broker)
Common Architectural Patterns
a. Standard Layers (vertical layers):
• Models (Domain Objects)
• Services (Business Logic)
• Repositories (Data Access)
• Constants (Enums/Types)
• Exceptions (Error Handling)
b. Common Components (horizontal layers):
• Main Application
• Configuration
• Controllers/Handlers
• Workers/Threads
Specific Implementation Details
For each system, show:
a. Core Components:
• Use rectangles for services
• Use hexagons for models
• Use circles for workers/threads
b. Relationships:
Implementation-Specific Elements
For example, for the Thread Pool implementation:
ThreadPool
• Components
• FixedThreadPool
• WorkerThread
• ThreadPoolFactory
• States
• ThreadState
• State
• Exception Handling
• RequestRejectionException
Interaction Patterns
Common patterns like:
• Producer-Consumer pattern (Kafka, BlockingQueue)
• Observer pattern (Notification system)
• Factory pattern (Multiple implementations)
• Strategy pattern (Gaming systems)