System Overview - Push notification integration
This system sends push notifications to users' devices. It must handle many users, deliver messages quickly, and retry if delivery fails.
Jump into concepts and practice - no test required
This system sends push notifications to users' devices. It must handle many users, deliver messages quickly, and retry if delivery fails.
User Devices
|
v
+----------------+
| Push Service |
| (API Gateway) |
+----------------+
|
v
+----------------+
| Notification |
| Dispatcher |
+----------------+
|
v
+----------------+ +----------------+
| Message Queue |<----->| Retry Service |
+----------------+ +----------------+
|
v
+----------------+
| Push Provider |
| (APNs/FCM) |
+----------------+onNotificationReceived(notification) {
if (notification.type === 'message') {
showAlert(notification.title);
}
}
What happens when a notification with type 'message' arrives?function handleNotification(notification) {
if notification.isRead = false {
displayNotification(notification);
}
}