0

From what I understand, when sending notifications from the Firebase compose message console from https://console.firebase.google.com/u/0/project/[projectname]:api-project-[senderID]/notification/compose, only CPU and bandwidth from the Google servers is consumed because the notifications are sent directly from the Google servers, not from mine, correct? If I use cURL to trigger push notifications from my servers, it would still use Firebase and Google servers to send and deliver the notifications, and it would not consume CPU and bandwidth from my servers, correct?

I am trying to fully understand whether or not sending push notifications directly with Firebase Cloud Messaging and without third party solutions such as Urban Airship is CPU and bandwidth intensive on my servers. I am not sure if part of the features/benefits that third party push notifications solutions offer is handling CPU/bandwidth intensive tasks, or if that is something that the Google servers handle directly when connecting and sending push notifications directly with Firebase Cloud Messaging.

I know StackOverflow is not for questions that arise debate, especially about architectures and in-house versus third party software solutions, but the main purpose of my question is knowing who handles the CPU and bandwidth intensive work when push notifications are sent to thousands of devices, is it the Google servers (Firebase Cloud Messaging servers), or the servers of the software company that provides the push notifications service such as Urban Airship, or the servers that trigger the push notifications in case the Firebase Cloud Messaging configuration is built in-house without third party solutions? Thank you.

EDIT: The answer at Why and how is push-notification (like GCM) battery efficient? includes this paragraph: "The android device keeps a single connection open to GCM servers to listen for notifications". However, it still does not answer my question because even though I know that the Firebase Cloud Messaging servers are responsible for sending the push notifications, I am still trying to understand if my servers do not have to provide CPU power or bandwidth at all, even if I use cURL to trigger the push notifications from my server using PHP cURL functions and cron jobs, for instance. If I can make an analogy, imagine using jQuery by importing the library directly from https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js versus downloading the jquery.min.js file and then putting it on your server. If you use https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js you would be using resources from Google servers, not from your own servers. If you download the jquery.min.js to your server, then visitors would be using resources from your own servers, not from Google's servers. That is my analogy, so in the case of push notifications using Firebase Cloud Messaging without third party solutions such as Urban Airship, I was wondering who provides the CPU power and bandwidth, your own servers or Google's servers. Thank you.

Jaime Montoya
  • 6,915
  • 14
  • 67
  • 103
  • Possible duplicate of [Why and how is push-notification (like GCM) battery efficient?](https://stackoverflow.com/questions/22663778/why-and-how-is-push-notification-like-gcm-battery-efficient) – Morrison Chang Nov 29 '17 at 23:40
  • Well, there are quite a few parts to sending push notification to consider * Managing push tokens * Handling ack, * Handling throttle from other party and retry * Cross platform (APNS vs GCM) * Managing collapse key etc So it depends on the complexity of what you are trying to do, and how much control do you want to maintain the solution might vary. – Phuong Nguyen Nov 29 '17 at 23:49
  • @roostertech Initially I want to send plain push notifications to all of my thousands of subscribers, once or twice a day, using two channels or segments based on what they subscribed to. I am already achieving this with Urban Airship, but I am evaluating using Firebase Cloud Messaging only without Urban Airship. – Jaime Montoya Nov 30 '17 at 00:03
  • 1
    In that case, it should be fairly simple since if you use a mechanic like GCM topic. It should not be CPU intensive since you are not sending to each individual user but just one broadcast to the topic and let Google do the heavy lifting. https://developers.google.com/cloud-messaging/topic-messaging https://firebase.google.com/docs/cloud-messaging/android/topic-messaging – Phuong Nguyen Nov 30 '17 at 00:08
  • @roostertech It makes sense. You can put this as your answer, not only as a comment, so that I can choose an answer and report the problem as solved. Thank you. – Jaime Montoya Dec 01 '17 at 11:41

1 Answers1

1

In that case, it should be fairly simple if you use a mechanic like GCM topic. It should not be CPU intensive since you are not sending to each individual user but just one broadcast to the topic and let Google do the heavy lifting.

https://developers.google.com/cloud-messaging/topic-messaging https://firebase.google.com/docs/cloud-messaging/android/topic-messaging

Phuong Nguyen
  • 909
  • 7
  • 20