Middle+
Practical task: Unified Notification Platform Context There are 3 separate systems in the company that send notifications to users: 1. CRM — sends emails and push notifications about orders. 2. Support Portal — sends messages about tickets to a Telegram bot. 3. Security System — generates SMS alerts about suspicious logins. Each system implements its logic: * own templates, hardcoded recipients; * no centralized notification history; * users complain about duplicates and delays; * no unified SLA, metrics, or control center. Goal Design a new Notification Platform that: * aggregates events from different sources (CRM, Support, Security); * routes them by type and channel (email, SMS, Telegram, push); * ensures uniform templates, logging, and observability, * supports SLA (p95 ≤ 3 sec for delivery), * allows scaling and expanding channels in the future. Candidate task 1. Define functional requirements. 2. Describe non-functional requirements (reliability, performance, error handling). 3. Create a context diagram (C4 Level 2). 4. Add a sequence diagram. For example, sending a message from CRM.
sobes.tech AI
Answer from AI
Functional Requirements:
- Receiving events from CRM, Support Portal, and Security System via API or message queue.
- Routing notifications by type and channel (email, SMS, Telegram, push).
- Centralized management of notification templates with editing capabilities.
- Logging all sent notifications with history and delivery statuses.
- Metrics and SLA monitoring (e.g., p95 ≤ 3 seconds for delivery).
- Support for scaling and adding new notification channels.
- Managing user subscriptions and preferences.
Non-Functional Requirements:
- Reliability: fault tolerance, retries on errors.
- Performance: processing and delivering notifications within SLA.
- Error handling: centralized error logging, alerts on failures.
- Security: authentication of event sources, user data protection.
- Scalability: horizontal scaling of components.
Context Diagram (C4 Level 2):
- External systems: CRM, Support Portal, Security System.
- Notification Platform:
- API Gateway / Event Receiver
- Event Processor / Router
- Template Service
- Notification Sender (Email, SMS, Telegram, Push)
- Logging & Monitoring
- User Preferences Service
Interactions:
- External systems send events to the Notification Platform.
- The platform processes, routes, and sends notifications.
- Logs results and collects metrics.
Sequence Diagram (example of sending a message from CRM):
CRM -> Notification Platform: Send order event
Notification Platform -> Template Service: Get email and push template
Notification Platform -> Notification Sender (Email): Send email
Notification Platform -> Notification Sender (Push): Send push
Notification Sender -> Notification Platform: Delivery status
Notification Platform -> Logging Service: Record notification history
Notification Platform -> Monitoring: Update SLA metrics