SNS notifications to Browser

让人想犯罪 __ 提交于 2020-01-25 18:40:12

问题


I developed a web application which serves a html page when user visits the link and displays some data according to keywords entered. Now data is being populated on the go, so I want to model something like when a new piece of data is stored(in elastic search) a SNS notification is generated which is shown to the person who is viewing the webpage. I got the SNS notification working, but I am stuck on the part that how do I display this notification on the front end? Can I do something like this that SNS pushes data to the a SQS queue and Javascript polls the queue and picks up the generated notification and displays it or there is a better way? PS:I dont know NodeJS


回答1:


Yes, you can definitely do that "SNS pushes data to the a SQS queue and Javascript polls the queue and picks up the generated notification and displays".

Other way can be that SNS can publish notifications even to an HTTP endpoint, so in your web app you can have a SNS subscriber and then the SNS can directly publish notifications to the web app and then from there you can pass this to your clients just like any other data



来源:https://stackoverflow.com/questions/43444435/sns-notifications-to-browser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!