开发者

Best solution architecture for user notifications in Java/Grails environment?

I am buildin开发者_JAVA技巧g 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.


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


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜