Design an Internal Chat System and Re-engagement Email Workflow
Design a system for an event marketplace company that includes an internal chat feature for employees and a re-engagement email workflow for customers.
Internal Chat System Requirements
- Real-time Messaging: Employees must be able to send and receive one-to-one messages in real time.
- Client Connectivity: Clients will use persistent WebSocket connections.
- Distributed Servers: Users may connect to any available chat server. The sender and recipient of a message may be connected to different servers.
- Message Delivery & Persistence:
- Messages should be delivered immediately to online users.
- Messages must be stored for later retrieval if a user is offline.
- Presence & History: The system should support presence information (e.g., online/offline status) and basic conversation history.
- WebSocket Routing: Explain how bidirectional WebSocket communication is routed across multiple servers.
Re-engagement Email Workflow Requirements
- Inactivity Detection: Implement a workflow to identify customers who have not logged in for 10 days.
- Email Delivery: Send a re-engagement email to these identified customers. This workflow should be part of the same overall platform.
Discussion Points
Candidates should discuss the high-level architecture, APIs, storage choices, message routing, inactivity detection mechanisms, scaling strategies, reliability considerations, and failure handling for both components.
AI interview prep
Core dilemma
Balancing real-time, low-latency message delivery and distributed presence with robust message persistence and scalable, fault-tolerant asynchronous email processing.
3 tradeoffs and 3 stress tests locked
Interview prep
Unlock the interviewer X-Ray rubric, tradeoff matrix, stress tests, clarifying questions, and key concepts.
Design an Internal Chat System and Re-engagement Email Workflow
Design a system for an event marketplace company that includes an internal chat feature for employees and a re-engagement email workflow for customers.
Internal Chat System Requirements
- Real-time Messaging: Employees must be able to send and receive one-to-one messages in real time.
- Client Connectivity: Clients will use persistent WebSocket connections.
- Distributed Servers: Users may connect to any available chat server. The sender and recipient of a message may be connected to different servers.
- Message Delivery & Persistence:
- Messages should be delivered immediately to online users.
- Messages must be stored for later retrieval if a user is offline.
- Presence & History: The system should support presence information (e.g., online/offline status) and basic conversation history.
- WebSocket Routing: Explain how bidirectional WebSocket communication is routed across multiple servers.
Re-engagement Email Workflow Requirements
- Inactivity Detection: Implement a workflow to identify customers who have not logged in for 10 days.
- Email Delivery: Send a re-engagement email to these identified customers. This workflow should be part of the same overall platform.
Discussion Points
Candidates should discuss the high-level architecture, APIs, storage choices, message routing, inactivity detection mechanisms, scaling strategies, reliability considerations, and failure handling for both components.