Wednesday, 18 September 2013

Amazon SNS dynamic topics case scenario

Amazon SNS dynamic topics case scenario

In my case scenario I need to send push notifications every time a user
posts a new message into a thread. It's like a mobile app forum. You can
post messages into threads and then you can reply messages. I'm trying to
migrate from custom APNS code to Amazon SNS in order to simplify and get
rid of code manteinance. But as far as I know, I need topics to publish
push notifications in order to deliver a push to all the people inside a
discussion thread.
In my custom approach, I send the device tokens to an async task and
deliver that bulk of messages in one APNS connection. Thus, this is like a
"dynamic topic" I'm generating each time a new message is posted into a
thread (I notify all the participants of a thread, and that number should
be able to scale from a few to thousands).
How can this approach be done with Amazon SNS? Do I have to create a topic
for each thread? Instead of connecting and writing all the push messages
into APNS, can I mantain this approach with Amazon SNS only knowing the
device token of the receivers?

No comments:

Post a Comment