Problem Statement
Design an LLD for a Notification service supporting email and SMS with retries and templates.
Explanation
Define NotificationRequest, Channel (Email/SMS), TemplateEngine, and ProviderClient adapters. Use a queue for async delivery and a RetryPolicy with exponential backoff and idempotent request keys.
Store status per message and expose a query API. Keep templates versioned and variables validated at submission; protect providers behind adapters for swap and test doubles.
Code Solution
SolutionRead Only
interface Channel{ send(msg:Message): SendResult }
class RetryPolicy{ nextDelay(attempt): Duration }Practice Sets
This question appears in the following practice sets:
