Development of notification service based on google app engine

125 views
Skip to first unread message

Deepesh Mathuria

unread,
Feb 28, 2016, 11:53:41 AM2/28/16
to Google App Engine
I was developing a web app based on google app engine, which consists of various users (user entities essentially) and also framing groups of users (i.e, you can create groups and post content).
 In the groups I want that when anyone posts some content, text/image/file or anything, I want to send notifications in real time to all the users of that group. 
  I had an idea to embed a notification list in each of the user entities, and whenever somebody posts I'll iterate through the users of that group and append the notification for a new post in each of the member's notification list. 
And I'd keep checking in time-sessions of around 5 seconds if there's been any change in the state of my notification list and if there is I'd notify the user (I know it's a lay man idea, but it's all I got for now).
 I wanted to know will it work? 'cause when I read on the internet there were several places mentioning the use of channel API to sockets and what-not (I am just a CS sophomore without any prior networking experience so I did not understand much of it, as a matter-of-fact).
Any help would be appreciated about whether my method is correct or what are the caveats or if there are any better approaches or code samples from where I can deduce how to adapt things to suit my situation.
 

Deepesh Mathuria

unread,
Feb 28, 2016, 12:29:00 PM2/28/16
to Google App Engine
I just remembered this, could GCM be of any help, actually most of the articles i read about GCM suggested that it works only for mobile devices, Is that true? Or can I use it for a website? If it is possible to do so, please do share from where I can learn how to implement it. 

Adam (Cloud Platform Support)

unread,
Feb 28, 2016, 3:36:14 PM2/28/16
to Google App Engine
If you want to be able to push notifications to the client-side of a web application (JavaScript), use the Channel API:

If you want to be able to push notifications to the server-side of a web application using webhooks, use Cloud Pub/Sub:

Finally, If you want to be able to send push notifications to devices (iOS / Android), use GCM:
Reply all
Reply to author
Forward
0 new messages