node-gcm icon indicating copy to clipboard operation
node-gcm copied to clipboard

Persistent connection and upstream messaging over CCS

Open hypesystem opened this issue 9 years ago • 6 comments

CCS allows for a persistent connection between server and client. https://developers.google.com/cloud-messaging/ccs

Upstream messaging (the server receiving messages from the clients) depends on CCS, and is the primary reason for implementing this.

I expect this to be a big change to implement (hence no milestone yet).

hypesystem avatar Feb 27 '15 20:02 hypesystem

This would be awesome to have added to your library. Benchmarking this for one registration id at a time I get about 300/second where apn gives me about 15000/second to iOS devices since it uses a persistent connection. I know I can bulk-send up to 1000 pushIds with your module over https, but when I personalize the messages this no longer works because the payload changes per target device. Please consider adding this. The performance gains would be incredible.

ericdolson avatar Jun 15 '15 18:06 ericdolson

+1 to this!

rolivav avatar Nov 10 '15 11:11 rolivav

What is the status of this feature? I want to use this library but I need to use upstream messages.

pzienowicz avatar Feb 02 '16 17:02 pzienowicz

@hypesystem How hard is this to implement? Can you summarize the tasks and changes involved?

I imagine this being a new API call in sender.js that receives a callback (or event emitter?) and calls it whenever a device has sent an upstream message.

eladnava avatar Feb 02 '16 22:02 eladnava

The project has not yet been started, and this would require implementing a connection to an entirely new API. In addition, it would introduce concerns that we have not even considered yet (like a persistent long-running connection, instead of discrete HTTP connections for each call).

I don't have an overview of exactly what would need to happen, but it seems like a big addition :smile:

If anyone has time for it, I would recommend making a new branch explicitly for developing this interface, and I would love to review everything you do. Unfortunately, however, this is not a feature that is high on my own list.

hypesystem avatar Feb 03 '16 05:02 hypesystem

i needed upstream messaging and tried this but then realized this is just using the http protocol. there's a node project with xmpp/upstream support: https://github.com/jacobp100/node-gcm-ccs it seems to work.

kzahel avatar Apr 30 '16 05:04 kzahel