views:

71

answers:

2

On the Mozilla website, there’s a page showing (apparently) live download statistics for Firefox: http://www.mozilla.com/en-US/firefox/stats/

How are they performing their request to get the live stats data? I can not see a constant connection in Firebug.

How is this working?

+1  A: 

Looking at the country_report.json response in the Net tab of firebug, you can see something like this for each country:

{"total":95843579,"rps":[5,6,6,7,4,9,12,9,3,10,6,8,8,7,5,10,8,4,12,8,10,10,7,4,9,13,9,4,9,13,7,7,6,18,10,7,9,5,3,6,5,11,9,5,6,9,7,2,8,9,11,5,10,7,5,6,11,7,7,2],"count":455,"name":"United States","code":"US"}

So those graphs are not being updated every second in real time. Instead, they are plotting a recent history of requests, one point per second, and periodically requesting a new set of data to plot.

It seems they use something called SQLstream on their end to gather that data.

David
okay i get it thanks
wemakeweb
A: 

OK, here goes. The question I don't understand is answered here:

http://blog.mozilla.com/webdev/2009/08/18/download-stats-move-to-mozilla-com/

have fun :-)

seanizer