简体   繁体   English

什么是实现生命挽救的最佳方法

[英]what is the best way to implement a livescroll

Please refer to the "RECENT ACTIVITY" in foursquare.com .. a new information pushes the existing info in a panel. 请参考foursquare.com上的“近期活动”。新信息将现有信息推送到面板中。 Now my question is how this should ideally be implemented ? 现在我的问题是理想情况下应如何实施? 1. By having an ajax poll at regular intervals to fetch the data from DB ? 1.通过定期进行ajax轮询来从DB中获取数据? 2. By having this done at the server side, that would schedule at regular intervals to update some datastructures. 2.通过在服务器端完成此操作,可以定期安排更新某些数据结构的时间。 then from client side get these info at regular intervals. 然后从客户端定期获取这些信息。 This would reduce the total number of DB calls, but all the clients would get the same information at any certain time. 这将减少数据库调用的总数,但是所有客户端在任何特定时间都将获得相同的信息。 3. ... 3. ...

If you open foursquare in multiple browsers session, you'll see different "RECENT ACTIVITY" at all the browsers.. 如果您在多个浏览器会话中打开foursquare,您将在所有浏览器中看到不同的“近期活动”。

What is the best way to fetch latest information (or, random information) from DB and show it in the UI ? 从DB获取最新信息(或随机信息)并在UI中显示的最佳方法是什么?

see DWR to make remote calls from a Java web server to a client web browser for server push. 请参阅DWR以从Java Web服务器向客户端Web浏览器进行远程调用以进行服务器推送。 this will reduce traffic as well as db calls 这将减少流量以及数据库调用

Download the example application with full source 下载带有完整源代码的示例应用程序

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM