Architecture
A push message’s path, from being sent from an application’s provider to getting delivered to the intended audience, can be described in a few general steps for both web and mobile applications. This section helps you understand these steps, as well as the role that Catalyst plays in helping you incorporate push notifications in your application with ease.
The generic key elements involved in passing a push message to the target devices as a notification in a web, iOS, or Android app include the following.
Service Provider
Your iOS, Android, or web application that initiates a push message to be delivered to target users is the service provider. Along with the push message, the request must contain the information that is necessary for a push service to route the message to the right client and to wake up the right service worker.
Server
The server makes the API call to the push service to request the delivery of a push message. In this case, Catalyst provides the servers that are required to handle all backend activities. API calls to a push service can only be made after Catalyst is configured with it.
Push Service
For web applications, each browser like Chrome and Firefox implements its own push service. The Safari browser and iOS applications implement APNs. Android applications use Firebase Cloud Messaging for this purpose.
The push service is responsible for validating a push message, waking up the right service worker, and routing your message to the targeted devices as notifications. In the case of a web application, the push service also queues your push message until a target device is available to receive it.
Service Worker
A service worker is a JavaScript file that is idle and listens for a push event to occur. When the push message is routed to a particular device by the push service, the service worker assigned to that device briefly awakens and displays the message as a notification.
It follows the constraints as defined in the notification API and displays the notification to the user accordingly. The service worker handles the user’s interaction with the push notification. After the interaction is done, the service worker becomes idle again. Catalyst handles the implementation of the service workers for various web browsers, iOS, and Android.
This entire process takes only a brief amount of time and the push messages that you initiate are delivered to the user devices within seconds, provided all conditions are met.
You can refer to the iOS, Android, and Web help sections for further details on the specific platforms.
Last Updated 2024-11-12 01:42:48 +0530 +0530
Yes
No
Send your feedback to us