SNS通知浏览器 [英] SNS notifications to Browser

查看:144
本文介绍了SNS通知浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了一个Web应用程序,当用户访问链接时会提供html页面,并根据输入的关键字显示一些数据.现在正在旅途中填充数据,因此我想建模类似存储新数据(通过弹性搜索)时生成的SNS通知,该通知显示给正在查看网页的人.我使SNS通知正常工作,但是我被困在如何在前端显示此通知的部分上?我可以做这样的事情,即SNS将数据推送到SQS队列中,然后Javascript轮询该队列并拾取生成的通知并显示它,或者有更好的方法吗? PS:我不知道NodeJS

解决方案

是的,您绝对可以做到"SNS将数据推送到SQS队列,而Javascript轮询该队列并拾取生成的通知并显示". >

其他方法可以是SNS甚至可以将通知发布到HTTP端点,因此在您的Web应用程序中,您可以拥有SNS订阅者,然后SNS可以将通知直接发布到Web应用程序,然后从那里将其传递给您的客户就像其他数据一样

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

解决方案

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

这篇关于SNS通知浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆