4

Does any one have idea about the best way(implantation) to send Bulk Google Cloud Messaging on a Linux server. (Personally I like non-java implementation) Any help, link or suggession appreciated.

Edit

I didn't try any method for bulk messaging. I know there is a php implementation for GCM too, But I like to know what should I consider before go for an implementation. Like, How to handle failed messages, Is there any limitation on http requests goes to GCM server, etc.

Dasun
  • 3,244
  • 1
  • 29
  • 40
  • I didn't try any method for bulk messaging. I have implemented php+mysql+ cron job for APNS. I know there is a php implementation for GCM too, But I like to know what should i consider before go for an implementation. Like, How to handle failed messages, Is there any limitation on http requests goes to GCM server, etc. – Dasun Sep 25 '12 at 07:03
  • Explanation for down votes might help me to improve my self, Be kind enough to give a brief explanation. – Dasun Mar 24 '14 at 08:38

3 Answers3

3

Finally, I found the best answer for my own question. We can send a message to 1000 Google could message recipients using one http request. Sending bulk messaging Shouldn't be that much complicated. Any language or tool are capable of sending appropriate http request to the GCM server is enough.

GCM allows you to attach up to 1,000 recipients to a single message, letting you easily contact large user bases quickly when appropriate, while minimizing the work load on your server.

user229044
  • 232,980
  • 40
  • 330
  • 338
Dasun
  • 3,244
  • 1
  • 29
  • 40
2

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

If you have to setup a Linux server to send GCM push notifications, you can freely chose to use C# or Java at your own discretion.

For what concerns C/C++, however, things are a little more complicated. This question (PHP) shows that GCM notifications can be sent using CURL, so I suspect that a "C/C++" implementation using libCurl could be possible. However you'll have to tweak it yourself, given that it does not seem to be the "standard way" to use GCM.

Community
  • 1
  • 1
Avio
  • 2,700
  • 6
  • 30
  • 50
1

If you are familiar with PHP than 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 am using this for testing). You can find the calls here.

Note that you need a curl.exe which is capable of doing HTTPS. The link from Avio's answer shows you how to do that in PHP, stick to that and do not use C++.

Community
  • 1
  • 1
ChrLipp
  • 15,526
  • 10
  • 75
  • 107