3

I have long running task and I would like to update the progress to the client running a desktop browser. I want to use Amazon SNS for this. However, I've yet to find any examples or guides on how to do this.

I am using python on my backend. As the process runs, I want to post to Amazon SNS, which will then fire back to the client.

Sid
  • 4,893
  • 14
  • 55
  • 110
user299709
  • 4,922
  • 10
  • 56
  • 88
  • 1
    SNS is a _push_ notification service. For your client to respond to it, it must either have a HTTP listener or you push the SNS notification to a server, which your script can poll it from. The latter seems to be the only option when you want to use SNS as the client/browser can't act as a server (it would need to be subscribed and verified first too). You'd be better off using SQS (Queueing service, which your client could poll directly), I suppose. – sysconfig Nov 24 '14 at 22:14
  • See also http://stackoverflow.com/questions/9624619/is-it-possible-to-receive-an-amazon-sns-message-on-a-js-script – timday Feb 22 '16 at 17:52
  • You may also give a try to [Bow](https://www.npmjs.com/package/bow). – sp00m Oct 25 '17 at 12:43

1 Answers1

1

deepstream.io is a nodejs server for publishing AWS SNS messages directly to the browser. It's mechanism is long-polling https and wss.

Link to their tutorial: Publishing AWS SNS messages to browsers

Dale Navi
  • 66
  • 8