Wordpress-android: Notifications + Pinghub

Created on 9 Nov 2016  路  9Comments  路  Source: wordpress-mobile/WordPress-Android

Implement Pinghub WebSocket client, to receive updates, regardless of the Push Notifications setting.

### Details:

  • [ ] Maybe create Automattic/pinghub-android repository.
  • [ ] Keep synching notifications right after launch / login, and introduce updates driven by Pinghub.
  • [ ] Make PingHub working fine together with Push Notification payload.

Verify:

  • [ ] Verify that Notification Actions (Edit Comment / Reply) result in a Pinghub update message
  • [ ] Verify that marking a Note as Read (in another device) results in a Pinghub update message
  • [ ] Verify that destructive actions result in "notification deleted" notification
Notifications Remove Simperium [Pri] Low [Type] Task

Most helpful comment

We won't replace GCM with Pinghub for PNs.

Instead we want use it to keep the clients in synch with the server and use less REST calls.

I know we can use GCM for almost the same things we want to achieve by using Pinghub, but there are few key advantages with Pinghub:

  • We will have one single code on the server that updates clients, regardless if they're Android, Desktop, or iOS. No more double implementations.
  • Communication is 2-ways. Clients can write messages on the channel and the server acts in response of them. Basically we can update, mark it as seen, delete a note from the client, and send the changes on the server by using a pinghub message.
  • We can reach users with PNs disabled.
  • No more payload limit.

cc @jleandroperez @dmsnell
and @mzorz (but probably you're already seen this).

All 9 comments

How PingHub will benefit our users? GCM does the same job already, I don't really see the point of adding more complexity to the app.

We won't replace GCM with Pinghub for PNs.

Instead we want use it to keep the clients in synch with the server and use less REST calls.

I know we can use GCM for almost the same things we want to achieve by using Pinghub, but there are few key advantages with Pinghub:

  • We will have one single code on the server that updates clients, regardless if they're Android, Desktop, or iOS. No more double implementations.
  • Communication is 2-ways. Clients can write messages on the channel and the server acts in response of them. Basically we can update, mark it as seen, delete a note from the client, and send the changes on the server by using a pinghub message.
  • We can reach users with PNs disabled.
  • No more payload limit.

cc @jleandroperez @dmsnell
and @mzorz (but probably you're already seen this).

So, we're going to replace all the REST calls for notifications with PingHub?

initially not all, but hopefully many :)

What is GCM?

Google Cloud Messaging (now "Firebase")

So, we're going to replace all the REST calls for notifications with Pinghub?

Almost all the REST calls could be easily migrated to PingHub. (When we'll be ready to accept and process incoming messages on the server).
I would say, the initial notes refresh, and pull to refresh, can use the REST API, at least in the first version of Pinghub integration. If everything works OK we can move all calls to PH in a second sprint.

Ok that would make sense to only have one way to communicate with the notification "server", my fear is having an extra complicated implementation for such a simple screen.

Closing as the Notifications Refresh project has reached to an end

Was this page helpful?
0 / 5 - 0 ratings