GCM (Google Cloud Messaging) bulk with Linux

Does anyone have any ideas on the best way (implantation) to send Bulk Cloud Cloud Messaging on a Linux server. (Personally, I like the non-java implementation) Any help, link or suggestion is appreciated.

Edit

I did not try to use any method for bulk messaging. I know that GCM also has a PHP version, but I like to know what I should consider before moving on to implementation. For example, how to handle failed messages, are there any restrictions on HTTP requests for the GCM server, etc.

+4
source share
3 answers

Finally, I found the best answer for my own question. We can send a message to 1000 Google message recipients using a single http request. Sending bulk messages Shouldn't be that hard. Any language or tool can send the corresponding http request to the GCM server.

GCM allows you to connect up to 1000 recipients to a single message, allowing you to easily connect to large user bases quickly when necessary, minimizing the workload on your server.

+3
source

As shown in this example , it seems that server-side code can even be written in C# . This question also confirms that this approach works. Other people seem to be able to configure standalone Java applications, as shown here .

If you need to configure your Linux server to send GCM push notifications, you can freely use C# or Java as you wish.

As for C/C++ , though, things are a little more complicated. This question (PHP) shows that GCM notifications can be sent using CURL , so I suspect that implementing "C / C ++" using libCurl might be possible. However, you will have to configure it yourself, given that it is not a β€œstandard way” to use GCM .

+2
source

If you are familiar with PHP, than you implement it in PHP. Since GCM uses only 2 GETs with HTTPS, you can easily implement it in any language, even batch processing with curl (I use this for testing). You can find the challenges here .

Please note that you need curl.exe that can execute HTTPS. The link from Avio's answer shows you how to do this in PHP, stick with it and don't use C ++.

+1
source

Source: https://habr.com/ru/post/1436071/


All Articles