Amazon SNS and push notifications in Rails

69 views
Skip to first unread message

Chris McCann

unread,
Dec 2, 2015, 5:08:56 PM12/2/15
to SD Ruby
I'm in the process of implementing push notifications for a Rails app using Amazon's SNS via the aws-sdk gem (v2).

I've got it working but am curious if anyone else has done this before and has words of wisdom about managing device tokens, endpoint ARNs, etc.

Cheers,

Chris

Peter Fitzgibbons

unread,
Dec 2, 2015, 6:07:42 PM12/2/15
to sdr...@googlegroups.com
What’s the “subscribe” client for the push?   Browser?  IOSapp?

--
--
SD Ruby mailing list
sdr...@googlegroups.com
http://groups.google.com/group/sdruby
---
You received this message because you are subscribed to the Google Groups "SD Ruby" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sdruby+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chris McCann

unread,
Dec 2, 2015, 6:10:52 PM12/2/15
to sdr...@googlegroups.com
We are initially just pushing to iOS devices via APNS but will be adding Android via GCM shortly.

You received this message because you are subscribed to a topic in the Google Groups "SD Ruby" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sdruby/D4SjIchJGcw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sdruby+un...@googlegroups.com.

Peter Fitzgibbons

unread,
Dec 2, 2015, 6:17:03 PM12/2/15
to sdr...@googlegroups.com
So, I’m working this right now, and for the app I’m on, each IOS client subscribes to PubNub channel with the channel name associated to the logged-in User account.   like “updates.<id>” channel.

PubNub has the ability to ACL the transmission so requiring an “auth key” for the subscription (and publish).  This is not working right now.

Device tokens may or may not help with this.  Since you are posting to APN and GCM, there is no opportunity to encrypt the message.

I haven’t looked into SNS directly so I am probably missing a nuance in the mapping PubNub <-> SNS

Chris McCann

unread,
Dec 2, 2015, 6:18:31 PM12/2/15
to sdr...@googlegroups.com
Thanks, Peter, my question was specifically about Amazon SNS.  Guess I'll blaze a trail here!

Misha Manulis

unread,
Dec 2, 2015, 8:26:48 PM12/2/15
to SD Ruby
Hey Chris,

I've setup SNS for Rails apps before but not for pushing to mobile.  I've used it as a PubSub system, email notifications and with Lambda for Slack notifications.

Mostly, I've used it to connect services running inside AWS garden and it's been good for that.

My experience with it has been ok.  It's a bit of a pain to setup, but once you have the permissions and ARNs worked out, it's fine.  When DynamoDB had issues a few months back, that really effected everything, including SNS, so we were "down" for that part of the app, luckily it wasn't a "business crucial" piece.

I haven't tested it at any real scale, so can't speak to that.

The hardest part was coordinating all the Roles and ARNs, after that it was pretty straight forward.

Would love to hear how your experience with SNS goes as I'm considering using it for mobile push.

Best,

Misha
Reply all
Reply to author
Forward
0 new messages