How does our system tackle if we want to send bulk notifications?
Let’s say for all the users who have ordered a TV in the last 24 hours, we have to send them a notification for installation service, these things are a part of something called as bulk notification. So the very first requirement for this would be a UI, which is represented as Bulk Notification UI (in the architecture above), which will talk to something called as Bulk Notification service, which takes a filter criteria. Filter criteria would be something like finding all the users who have placed a milk order in the last three days and sending them a notification.
Query Engine
On top of this data store, there’s something called as Query Engine. That Query Engine basically takes a query, which is like an aggregator plus filter kind of thing, and can be used to find out all the users who are in Bangalore, or who have ordered some food item in the last few days. This Query Engine is not only used by the Notification service, it could be used by a lot of services.
Scheduler
A scheduler is a component that manages the timing and scheduling of tasks or events. In the context of a notification service, the scheduler determines when to send notifications based on user preferences, timing settings, and priorities.
Pipelines
Pipelines are a series of steps or stages through which data or tasks flow. In a notification service, pipelines can be used to process and transform notifications before dispatching them to different channels. For example, a pipeline might include steps to format the notification content, add personalization, or apply language localization.
Batch Jobs
Batch jobs are recurring tasks or processes that are executed in batches, typically with a predefined frequency or schedule. In a notification service, batch jobs can be used to perform periodic tasks such as generating aggregated reports, updating user preferences, or cleaning up old notifications.
Design Notification Services | System Design
If we are building an e-commerce application or a booking system or anything of that sort, we will always have a notification service that will be used to notify your consumers. Let us now look at the requirements to build a notification service.
Topics for Designing Notification Services
- Requirements
- Components
- How does our system tackle if we want to send bulk notifications?
- Scheduler
- Pipelines
- Batch Jobs
- Use case for Notification Service