简体   繁体   中英

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. 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. ...

If you open foursquare in multiple browsers session, you'll see different "RECENT ACTIVITY" at all the browsers..

What is the best way to fetch latest information (or, random information) from DB and show it in the UI ?

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

Download the example application with full source

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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