javascript – Trello保持更新?

前端之家收集整理的这篇文章主要介绍了javascript – Trello保持更新?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
trello.com如何保持所有的用户屏幕更新与新的信息,因为它进来?

例如,如果我在屏幕上更改某些内容,它会自动在所有其他用户屏幕上显示谁也在该页面上…他们是不断刷新页面还是他们的其他事情?

解决方法

原始答案

虽然我不为Trello工作,但从外部看,它似乎正在使用AJAX polling来查看在firebug中的网站上显示的信息的更新.

您也可以使用Comet来实现.

更新

所以我已经做了一点挖掘,我发现这在Hacker News

Trello does use Socket.io. If your browser supports websockets it will use them,but it will transparently fall back to polling if necessary. – 07003

后来呢

We’re scaling back a little to handle the usage spike from the initial launch,so some users will get polling even if their browsers support websockets. As the load stabilizes,we’ll be switching them back on and you should see performance improve quite a bit. – 07004

我只能假设ianthehenry正在为FogCreek工作,但我无法确认.

他还继续提到他们使用的其他一些项目:

Express,Async,Mongoose,Redis,Socket.io,CoffeeScript,Less,and Underscore,off the top of my head. We also use Node Inspector during development; that’s a great little tool. – 07005

再次更新

Trello自己刚刚写了一篇博客帖子,确认他们的堆栈:http://blog.fogcreek.com/the-trello-tech-stack/

原文链接:https://www.f2er.com/js/154269.html

猜你在找的JavaScript相关文章