Hi,
I'm experiencing a performance bottleneck when sending notifications to a large number of devices (more than 20 at a time). Our platform allows users to select specific recipients, making device groups and topics unsuitable for this use case.
To address this, I'm considering using Sidekiq to handle the notification sending. However, the current implementation requires instantiating a new FCM client for each job, which leads to unnecessary re-authentication and performance overhead.
I propose the following improvement:
- Generate the authentication token in the main application service.
- Pass the token and firebase_project_id to the Sidekiq worker.
- Instantiate the FCM client within the Sidekiq worker using the provided token and firebase_project_id, instead of passing the full google_credentials again.
This approach would avoid redundant authentication and significantly improve the performance of sending notifications to multiple devices.
Thank you for considering this suggestion.
Hi,
I'm experiencing a performance bottleneck when sending notifications to a large number of devices (more than 20 at a time). Our platform allows users to select specific recipients, making device groups and topics unsuitable for this use case.
To address this, I'm considering using Sidekiq to handle the notification sending. However, the current implementation requires instantiating a new FCM client for each job, which leads to unnecessary re-authentication and performance overhead.
I propose the following improvement:
This approach would avoid redundant authentication and significantly improve the performance of sending notifications to multiple devices.
Thank you for considering this suggestion.