即时通知,如Facebook [英] Instant notifications like Facebook
问题描述
我建立一个社交应用,并想知道Facebook的如何实现他们的通知。
如你所知,Facebook的通知是瞬间。只要有人需要一个动作,人们会收到通知。
I am building a social application and was wondering how facebook achieve their notifications. As you know, facebooks notifications are instant. As soon as someone takes an action, people are notified.
我认为他们没有在数据库上运行的所有时间的查询。
I assume they don't have a query running on the database all the time.
有人能指出我在正确的方向。谢谢
Can someone point me in the right direction. Thanks
推荐答案
由于您的问题是标签用C#,ASP.NET你应该使用真棒 SignalR
库。基本上 SignalR
使您发送推送通知到客户端。其确切底层技术,它使用由服务器和客户端的功能的影响。
Since your question is tagged with C#, ASP.NET you should use the awesome SignalR
library. Basically SignalR
enables you to send push notifications to the clients. Which exact underlying technique it uses is influenced by the capabilities of the Server and the Client.
有一个名为jabbR一个大的实时聊天网站,是建立在之上 SignalR
:
There is a big real time chat site called jabbR that is built on top of SignalR
:
下面是一些应该让你开始,更多的链接。
Here are some more links that should get you started.
- 项目网站: http://signalr.net/
- 托管code(开源): https://github.com/SignalR/SignalR
- 百科: https://github.com/SignalR/SignalR/wiki
- 项目使用它:<一href=\"https://github.com/SignalR/SignalR/wiki/Projects-Using-SignalR\">https://github.com/SignalR/SignalR/wiki/Projects-Using-SignalR
- Project site: http://signalr.net/
- Hosted Code (Open Source): https://github.com/SignalR/SignalR
- Wiki: https://github.com/SignalR/SignalR/wiki
- Projects using it: https://github.com/SignalR/SignalR/wiki/Projects-Using-SignalR
这篇关于即时通知,如Facebook的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!