Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GCM message to all users (without topics)

I have the following dilemma:

  • I need to send a heartbeat message every 5 minutes (or less) to all users of my app
  • I thought about topic messaging, but the 1 million subscriber limit is not acceptable for my application
  • So: the only possibility left is sending out the message in batches of 1000
  • This is really resource intensive

Now my question:
How can I make this process of batching and sending really efficient? Is there a good solution already made, preferably in node.js?

Thank you,
Sebastian

like image 629
Sebastian Walker Avatar asked Dec 03 '25 09:12

Sebastian Walker


1 Answers

You may use XMPP, instead of HTTP.

As google says, it is less resource intensive in respect to HTTP:

The asynchronous nature of XMPP allows you to send more messages with fewer resources.

Also you can have 1000 similtanouis connection per app (sender ID):

For each sender ID, GCM allows 1000 connections in parallel.

Also there exists a node-xmpp solution available for that.

like image 85
Ali Avatar answered Dec 04 '25 23:12

Ali



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!