Java/Grails 环境中用户通知的最佳解决方案架构?

发布于 2024-09-30 01:57:44 字数 259 浏览 0 评论 0原文

我正在使用 Grails 构建一个社区网站,我想实现用户通知,就像 stackoverflow.com 一样。例如,用户每次返回网站时都会通过电子邮件或邮箱收到新事件通知(“您有新评论”、“您最喜欢的评论之一已更改”...)。

我想这是一个常见问题,我想听听您对在 Grails 领域中实现后端有哪些简单解决方案建议。例如,Java 消息服务是推荐的解决方案吗?

谢谢。

I am building a community website using Grails and I want to implement user notifications exactly like stackoverflow.com. For instance, user will get notified for new events ('You have new comments', 'one of your favorite has changed'...) either by email or in his mailbox anytime he returns to the website.

I suppose that this is a common problem and I'd like to hear what easy solution do you advice for implementing the back-end in Grails realm. For instance, is Java Message Service a recommended solution for this?

Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

故人如初 2024-10-07 01:57:44

恕我直言,没有。 Java 消息服务基本上是执行异步或排队操作。

您只需要一个用户消息系统和通知。我不知道有任何插件可以开箱即用。

我建议您使用 markAsRead 标志来实现绑定到您的用户模型的自己的消息域 POGO。

如果您想将其与电子邮件集成,您可以使用 JMS 来解耦用户导航和电子邮件/发送。如果您有高流量的网站/网络应用程序,这尤其有用

IMHO no. Java Message Service is basically to perform asynchronous or queued operations.

You just need a user messaging system and notification. I'm not aware of any plugin that could do it out of the box.

I suggest you to implement your own Message domain POGO bound to your user model with a markAsRead flag.

If you want to integrate this with email you can use JMS to decouple user navigation and email/sending. This is particularly useful if you have an high traffic website/webapp

很糊涂小朋友 2024-10-07 01:57:44

看起来有一个插件也使用 Grails 邮件插件:
http://grails.org/plugin/notifications
http://grails.org/plugin/mail

Looks like there's a plugin for that which also uses the Grails mail plugin:
http://grails.org/plugin/notifications
http://grails.org/plugin/mail

流年已逝 2024-10-07 01:57:44

我已经使用了 http://grails.org/plugin/mail后台线程插件。这不是一个“完美”的解决方案,但它利用了 grails 生态系统并完成了工作。

I have used the http://grails.org/plugin/mail and the background-thread plugin. Not a "perfect" solution, but it leverages the grails eco-system and gets the job done.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文