实现livescroll的最佳方式是什么?

时间:2022-09-02 11:38:26

Please refer to the "RECENT ACTIVITY" in foursquare.com .. a new information pushes the existing info in a panel. 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 ? 2. By having this done at the server side, that would schedule at regular intervals to update some datastructures. 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. ...

请参阅foursquare.com中的“最近活动”。新信息会在面板中推送现有信息。现在我的问题是如何理想地实现这一点? 1.定期进行ajax轮询以从DB获取数据? 2.通过在服务器端完成此操作,将定期安排更新某些数据结构。然后从客户端定期获取这些信息。这将减少数据库调用的总数,但所有客户端在任何特定时间都会获得相同的信息。 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中显示它的最佳方法是什么?

1 个解决方案

#1


0  

see DWR to make remote calls from a Java web server to a client web browser for server push. this will reduce traffic as well as db calls

请参阅DWR以从Java Web服务器远程调用客户端Web浏览器以进行服务器推送。这将减少流量以及数据库调用

Download the example application with full source

使用完整源代码下载示例应用程序

#1


0  

see DWR to make remote calls from a Java web server to a client web browser for server push. this will reduce traffic as well as db calls

请参阅DWR以从Java Web服务器远程调用客户端Web浏览器以进行服务器推送。这将减少流量以及数据库调用

Download the example application with full source

使用完整源代码下载示例应用程序