Hi, can anyone give us some info on how the countdown works?
Is it really counting edits? Anything else?
Thanks!
Delphine
---------- Forwarded message ---------- From: Jay Walsh jwalsh@wikimedia.org Date: Mon, Apr 12, 2010 at 8:00 PM Subject: Re: [Wmfcc-l] a few days...
Can anyone confirm the specifics around the toolserver app doing this countdown? http://toolserver.org/~emijrp/wikimediacounter/ The speed that it moves up is a bit predictable. I'd like to draw some attention to it, but need a bit of background before we get there. Seems to me like the 10s are moving up in 1 second increments. -- Jay Walsh
Delphine Ménard wrote:
Hi, can anyone give us some info on how the countdown works?
Is it really counting edits? Anything else?
---------- Forwarded message ---------- From: Jay Walsh jwalsh@wikimedia.org Date: Mon, Apr 12, 2010 at 8:00 PM Subject: Re: [Wmfcc-l] a few days...
Can anyone confirm the specifics around the toolserver app doing this countdown? http://toolserver.org/~emijrp/wikimediacounter/ The speed that it moves up is a bit predictable. I'd like to draw some attention to it, but need a bit of background before we get there. Seems to me like the 10s are moving up in 1 second increments.
Why not just ask emijrp -- it's his script.
Anyway, the animation is done in JavaScript, so you can just look at the source to see what it's doing. The relevant part is
var editinit=997162411; var timeinit=1271109001000; var timenow=new Date().getTime(); var period=1000/10; // period update in miliseconds var editrate=0.010; //per milisecond
The editinit and timeinit values increase when you reload the page, as one might expect. I haven't seem any change in the editrate value, but that could be either because it's just pulled out of a hat (it does look suspiciously round) or because it's a long-term average.
It probably wouldn't be too hard to write a better "real-time" edit counter. For example, one could make it do an AJAX request back to to server, say, every minute or so to adjust the rate to match reality. Also, making the intervals between increments Poisson-distributed would look more realistic that having them stay constant, although of course the individual "edits" would still be fake.
In principle, it should also be possible to make a true live Wikimedia edit counter: all you'd need to do is subscribe to the IRC RecentChanges feed and condense it down to some suitably low-bandwidth, low-latency format for transmitting to the browser. I'm not sure how practical that would be with plain old AJAX, though (you really don't want to make a new request for every edit), but Java or Flash or something like that ought to handle it fine.
On Tue, Apr 13, 2010 at 12:11 AM, Ilmari Karonen nospam@vyznev.net wrote:
In principle, it should also be possible to make a true live Wikimedia edit counter: all you'd need to do is subscribe to the IRC RecentChanges feed and condense it down to some suitably low-bandwidth, low-latency format for transmitting to the browser. I'm not sure how practical that would be with plain old AJAX, though (you really don't want to make a new request for every edit), but Java or Flash or something like that ought to handle it fine.
You could go the "half" way: make a php script that just makes a count(rev_id) on revisions (or whatever the table is named, haven't worked with MW DBs for ages) of all wikis, maybe make this run by a 10-second-cronjob and just write to a textfile. Then, your "livecounter" makes a request to this every 10 sec and can then see the current number of edits in 10sec based on the difference of revisions. Sure, this doesn't take into account revision hiding, oversight and log entries, but this should be fairly accurate.
Marco
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Ilmari Karonen:
In principle, it should also be possible to make a true live Wikimedia edit counter: all you'd need to do is subscribe to the IRC RecentChanges feed and condense it down to some suitably low-bandwidth, low-latency format for transmitting to the browser. I'm not sure how practical that would be with plain old AJAX, though (you really don't want to make a new request for every edit), but Java or Flash or something like that ought to handle it fine.
I did something similar to this in JS alone:
http://toolserver.org/~river/recentchanges/
It requires 1 request per second to update, but the backend is a C++ FastCGI and the database query is trivial, so the requests create no noticeable load. I imagine it should be fairly simple to do something similar for a plain number-of-edits counter. (You would only need to return number of edits, rather than the edits themselves, so a little less bandwidth would be used.)
- river.
Cool thing!
We need sth. similar for OSM! :)
Peter
River Tarnell schrieb:
Ilmari Karonen:
In principle, it should also be possible to make a true live Wikimedia edit counter: all you'd need to do is subscribe to the IRC RecentChanges feed and condense it down to some suitably low-bandwidth, low-latency format for transmitting to the browser. I'm not sure how practical that would be with plain old AJAX, though (you really don't want to make a new request for every edit), but Java or Flash or something like that ought to handle it fine.
I did something similar to this in JS alone:
http://toolserver.org/~river/recentchanges/
It requires 1 request per second to update, but the backend is a C++ FastCGI and the database query is trivial, so the requests create no noticeable load. I imagine it should be fairly simple to do something similar for a plain number-of-edits counter. (You would only need to return number of edits, rather than the edits themselves, so a little less bandwidth would be used.)
Hi all;
The counter page is generated every 5 minutes, using the last data available in site_stats table for every wiki project. So, the editrate can change every 5 minutes, I think that it is a good estimation.
Regards!
[1] http://www.mediawiki.org/wiki/Manual:Site_stats_table
2010/4/13 Peter Körner osm-lists@mazdermind.de
Cool thing!
We need sth. similar for OSM! :)
Peter
River Tarnell schrieb:
Ilmari Karonen:
In principle, it should also be possible to make a true live Wikimedia edit counter: all you'd need to do is subscribe to the IRC RecentChanges feed and condense it down to some suitably low-bandwidth, low-latency format for transmitting to the browser. I'm not sure how practical that would be with plain old AJAX, though (you really don't want to make a new request for every edit), but Java or Flash or something like that ought to handle it fine.
I did something similar to this in JS alone:
<http://toolserver.org/~river/recentchanges/http://toolserver.org/%7Eriver/recentchanges/
It requires 1 request per second to update, but the backend is a C++ FastCGI and the database query is trivial, so the requests create no noticeable load. I imagine it should be fairly simple to do something similar for a plain number-of-edits counter. (You would only need to return number of edits, rather than the edits themselves, so a little less bandwidth would be used.)
Toolserver-l mailing list (Toolserver-l@lists.wikimedia.org) https://lists.wikimedia.org/mailman/listinfo/toolserver-l Posting guidelines for this list: https://wiki.toolserver.org/view/Mailing_list_etiquette
You can see the ugly source code here[1]
[1] http://code.google.com/p/toolserver/source/browse/trunk/tools/wpcounter.py
2010/4/13 emijrp emijrp@gmail.com
Hi all;
The counter page is generated every 5 minutes, using the last data available in site_stats table for every wiki project. So, the editrate can change every 5 minutes, I think that it is a good estimation.
Regards!
[1] http://www.mediawiki.org/wiki/Manual:Site_stats_table
2010/4/13 Peter Körner osm-lists@mazdermind.de
Cool thing!
We need sth. similar for OSM! :)
Peter
River Tarnell schrieb:
Ilmari Karonen:
In principle, it should also be possible to make a true live Wikimedia edit counter: all you'd need to do is subscribe to the IRC
RecentChanges
feed and condense it down to some suitably low-bandwidth, low-latency format for transmitting to the browser. I'm not sure how practical
that
would be with plain old AJAX, though (you really don't want to make a new request for every edit), but Java or Flash or something like that ought to handle it fine.
I did something similar to this in JS alone:
<http://toolserver.org/~river/recentchanges/http://toolserver.org/%7Eriver/recentchanges/
It requires 1 request per second to update, but the backend is a C++ FastCGI and the database query is trivial, so the requests create no noticeable load. I imagine it should be fairly simple to do something similar for a plain number-of-edits counter. (You would only need to return number of edits, rather than the edits themselves, so a little less bandwidth would be used.)
Toolserver-l mailing list (Toolserver-l@lists.wikimedia.org) https://lists.wikimedia.org/mailman/listinfo/toolserver-l Posting guidelines for this list: https://wiki.toolserver.org/view/Mailing_list_etiquette
Hi,
2010/4/13 emijrp emijrp@gmail.com:
You can see the ugly source code here[1]
Haven't checked yet.
I wrote a small script last night which fetches the editcount via Special:Statistics (just to have a quick'n'dirty comparison to your number) from the projects listed here: http://meta.wikimedia.org/wiki/List_of_Wikimedia_Projects_by_Size/Table
Apparently it shows more edits than yours anytime I checked: http://toolserver.org/~avatar/temp/get-counter.php (playing perhaps tomorrow night a bit with http://toolserver.org/~avatar/temp/test.png) Not sure where the difference is.
Bye, Tim.
2010/4/13 Tim 'avatar' Bartel wikipedia@computerkultur.org
Hi,
2010/4/13 emijrp emijrp@gmail.com:
You can see the ugly source code here[1]
Haven't checked yet.
I wrote a small script last night which fetches the editcount via Special:Statistics (just to have a quick'n'dirty comparison to your number) from the projects listed here: http://meta.wikimedia.org/wiki/List_of_Wikimedia_Projects_by_Size/Table
Apparently it shows more edits than yours anytime I checked: http://toolserver.org/~avatar/temp/get-counter.phphttp://toolserver.org/%7Eavatar/temp/get-counter.php(playing perhaps tomorrow night a bit with http://toolserver.org/~avatar/temp/test.pnghttp://toolserver.org/%7Eavatar/temp/test.png ) Not sure where the difference is.
Bye, Tim.
Toolserver-l mailing list (Toolserver-l@lists.wikimedia.org) https://lists.wikimedia.org/mailman/listinfo/toolserver-l Posting guidelines for this list: https://wiki.toolserver.org/view/Mailing_list_etiquette
good.
Hi Tim;
My script doesn't count www.mediawiki.org edits, which has about 321,000 [1] (project 230). That is why my counter shows less edits than yours.
You can see that my bot only counts projects in the following families in Toolserver replication database:
families=["wikibooks", "wikipedia", "wiktionary", "wikimedia", "wikiquote", "wikisource", "wikinews", "wikiversity", "commons", "wikispecies"]
Regards
[1] http://meta.wikimedia.org/w/index.php?title=List_of_Wikimedia_Projects_by_Si...
2010/4/13 Tim 'avatar' Bartel wikipedia@computerkultur.org
Hi,
2010/4/13 emijrp emijrp@gmail.com:
You can see the ugly source code here[1]
Haven't checked yet.
I wrote a small script last night which fetches the editcount via Special:Statistics (just to have a quick'n'dirty comparison to your number) from the projects listed here: http://meta.wikimedia.org/wiki/List_of_Wikimedia_Projects_by_Size/Table
Apparently it shows more edits than yours anytime I checked: http://toolserver.org/~avatar/temp/get-counter.phphttp://toolserver.org/%7Eavatar/temp/get-counter.php(playing perhaps tomorrow night a bit with http://toolserver.org/~avatar/temp/test.pnghttp://toolserver.org/%7Eavatar/temp/test.png ) Not sure where the difference is.
Bye, Tim.
Toolserver-l mailing list (Toolserver-l@lists.wikimedia.org) https://lists.wikimedia.org/mailman/listinfo/toolserver-l Posting guidelines for this list: https://wiki.toolserver.org/view/Mailing_list_etiquette
Hey emijrp,
2010/4/13 emijrp emijrp@gmail.com:
My script doesn't count www.mediawiki.org edits, which has about 321,000 [1] (project 230). That is why my counter shows less edits than yours.
Matches the difference pretty good, so most likely this is the explanation. Great, thank you.
Bye, Tim.
emijrp wrote:
Hi all;
The counter page is generated every 5 minutes, using the last data available in site_stats table for every wiki project. So, the editrate can change every 5 minutes, I think that it is a good estimation.
Regards!
You should document it a little. Just a link there to a page saying that. I think this is not the first time this discussion arises. Technical people will start wondering when seeing a javascript counter.
OK, I have added a brief explanation just before editrate variable in the HTML source.
2010/4/13 Platonides platonides@gmail.com
emijrp wrote:
Hi all;
The counter page is generated every 5 minutes, using the last data available in site_stats table for every wiki project. So, the editrate can change every 5 minutes, I think that it is a good estimation.
Regards!
You should document it a little. Just a link there to a page saying that. I think this is not the first time this discussion arises. Technical people will start wondering when seeing a javascript counter.
Toolserver-l mailing list (Toolserver-l@lists.wikimedia.org) https://lists.wikimedia.org/mailman/listinfo/toolserver-l Posting guidelines for this list: https://wiki.toolserver.org/view/Mailing_list_etiquette
---------- Forwarded message ---------- From: Jay Walsh jwalsh@wikimedia.org [..] Seems to me like the 10s are moving up in 1 second increments.
-----Original Message----- From: toolserver-l-bounces@lists.wikimedia.org
[mailto:toolserver-l-bounces@lists.wikimedia.org] On Behalf Of Ilmari Karonen
var editrate=0.010; //per milisecond
I haven't seem any change in the editrate value, but that could be either because it's just pulled out of a hat (it does look suspiciously round) or because it's a long-term average.
First time I had a look at the source, it was at 0.013, and earlier yesterday it was at 0.011, and just now it's 0.008
Regards
Stwalkerster
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 4/12/2010 4:38 PM, Delphine Ménard wrote:
Hi, can anyone give us some info on how the countdown works?
Is it really counting edits? Anything else?
Thanks!
Delphine
No, somehow it guessed the number of edits at some arbitrary point, figured an average edit rate, and increases at that rate. It's not accurate by any stretch of the word.
toolserver-l@lists.wikimedia.org