the Guru
unread,Nov 10, 2011, 9:05:42 PM11/10/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to foursqu...@googlegroups.com
Maybe if I give you the context of my application it might make things a little clearer.
I wrote a wordpress plugin which initially utilized the API to retrieve recent checkins which allowed a blog owner to display where they had been on their blogs. So for starters, the application is only retrieving information belonging to the specific blog owner.
So this API call is actually initiated not by the blog owner but by a visitor to site, which led me to including caching capabilities. It is pointless having 100 visitors come to your blog in the same minute and initiate 100 API calls and so I added an option to cache the data and only call the API when the cache expires.
Next question ... how long do we keep the cache for? I had to snicker at your 'bananas' comment. Consider this ...
Lets say I checkin to the zoo. When will my website actually show I have checked in there? Well that depends on the cache expiry. If I expire my cached data every 15minutes then my website will be uptodate in a maximum of 15minutes. But if I don't expire my cache for 24hours then it will take that long for my site to be correct. (and remember that we live in a NOW society)
So how does this relate to venue data? Well with the current venue data provided as part of another endpoint, I can display basic stats about the venue ... # of tips, # of people who have checked in, total # of checkins.
But with the full venue data I could also display things like how meny people are here now, or how meny of my friends are here with me, or who the current mayor is, etc
Again, caching becomes a big part of this information. If I cached every 24hours and I was the first to the zoo, my site could say that I was 'at the Zoo with no fiends' ... pretty sad really and it could stay that way for up to 24 hours. But if I refreashed the cache after 5 minutes it could say I was 'at the Zoo with 15 friends' because that is what is happening now.
Now I know I have been talking about recent checkins, but checkin history is the same principle. It would be great for me to be able to display information such as -
I've been to Zoo. The last time I went there was on xxx. Currently there are 150 people checked in here and the mayor is xxx. Check out these tips ...
Currently I cant do that unless I API the venue individually, and there could be up to 500 venues, all needing to be updated (assuming the blog is getting visitors of course) every 15minutes to keep the data current.
Make sense?