Question

No, not another question that asks, "How can I make my messages flow like on Foursquare???"

What I want to know is, how they are getting their messages in the right order and timeframe.

Here's my situation. I have a proc that can get messages for a given day, and then return the selected result set to the web and have on the front end, my code show them and slide new ones on top. However, these "new" ones, aren't new ones, they are just the ones in the set that didn't initially fit on the page, although they "look new". Now what happens when I get to the end, and the set is empty finally...I make another call right?

Well this call is going to get, yes some ones they didn't see, but also all the ones they already saw.

What's a work around for this?

Thanks.

Was it helpful?

Solution

If you only want to show messages once, then persist the Id of the last message and use that as input into the proc on the second call, basically asking for any messages that came in since the last call.

re: Foursquare, I assume you are referring to the "recent activity" on their main page. They seem to call for 30 activities, then just cycle through them showing 11 at a time. They loop through a static list of 30. No second call that I can see.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top