提醒用户有新纪录 [英] Alert users to new records

查看:104
本文介绍了提醒用户有新纪录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好我试图找出如何架构我的提醒服务,为我的用户。有场景,其中用户将需要提醒

Hi i am trying to figure out how to architecture my alert service for my users. There are scenarios where a user will need to be alerted.

1),当用户从另一个用户收到新邮件
2)当用户的目的是启动任务

1) When a user receives a new message from another user 2) When a user is meant to start a task

警报被保存在缓存中,但是我认为这将是矫枉过正检查此缓存每隔几分钟,尤其是与我有用户的数量。我想要做的是,只有当已添加一个新的记录显示一个警告。谁能告诉我,他们将如何去了解这一情况。谢谢

Alerts are saved in a cache, however i thought it would be overkill to check this cache every few minutes, especially with the number of users i have. What i want to do is only display an alert when a new record has been added. Can anyone tell me how they will go about this scenario. Thanks

推荐答案

有一个技术名为彗星及其之一,你可以在你的情况下使用。

There is a technique called Comet and its the one that you can use on your case.

彗星技术 创建并打开连接到您的从客户端,并在服务器关闭连接服务器也就是说,有您的客户端的新邮件,客户端读取信息,并打开一个新的连接等待下一条消息。另一种方法是只打开一个连接和流中的数据,当其是可从服务器到客户端,而不是在所有关闭连接。唯一认为你需要照顾是增加允许你的网站打开的连接数。

Comet technique creates and open connection to your server from the client, and when the server close the connection means that there is a new message for your client, your client reads the messages, and opens a new connection wait for the next message. The other way is to just open a connection and streaming the data, when their are available from the server to the client, and not close the connection at all. The only think that you need to take care is to increase the number of open connection that allowed to your site.

检查该网站与asp.net彗星

Check this sites for comet with asp.net

http://www.frozenmountain.com/websync/

http://www.aaronlerch.com/blog/2007/07/08/creating-comet-applications-with-aspnet/

这篇关于提醒用户有新纪录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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