Closed jmt85 closed 8 years ago
https://docs.aws.amazon.com/sns/latest/dg/mobile-push-gcm.html
We need an endpoint for android devices to register their ID with one or many drop ids. Such a registration has a timeout of 2 weeks after which the registration must be renewed. Registrations are idempotent, so that a client can just hit the register endpoint once a day to refresh it. The endpoit allows deleting a registration which is authorized by providing the device ID.
When a new drop is posted to the drop id, that drop should be send via GCM to that device ID with high priority. It should be logged how many push messages each device receives. The number of push messages should be also logged to Prometheus. Since a drop message has a max size of 2573 byte and the maximum payload size of GCM is 4ks, it should fit without a problem.
GCM is now depreciated and we should use Firebase Cloud Messaging which is more or less the same.
FCM doesn't seem to be supported by AWS SNS ATM. OTOH it supports the other methods (APNS, ...), if a port ever happens. It maybe also better for use from AWS EC2.
SNS does WNS, which....
Windows Push Notification Services (WNS) is a service that enables you to send push notification messages and updates to Windows 8 (and later) and Windows Phone 8.1 (and later) apps.
may allow notifications for the desktop app at least on Windows. APNS may work for OSX. The biggest issue with these two is probably that additional terms & conditions apply. Maybe better use long-polling or other strategies there.
The AWS SDK should work with the client no matter which OS shouldn't it? I mean, this is why we use Java in the first place afaik.
From the client perspective, I don't care which technology is used as long as there is a good library available for it. WebSockets over long-polling because (except for the content of the messages) it is spec`d which long-polling per se afaik isn't. But SNS the AWS SDK should work, too.
Since Amazon isn't moving we have now decided to
django-push-notifications is an existing package that accomplishes neither, but has the principial aim to. We may roll our own our try to work with d-p-n. Rolling our own is quite possibly easier and faster.
WebSockets moved to #61
Extend the drop server that he can send Drop Messages via push notifications to a client.