-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi everybody,
For long time it was acknowledged that our current way of serving the recent changes feed to users (IRC with formatting using funny control codes) is one of the worst-suited for this purpose. It made the life miserable both for users who had to parse it (since nobody is actually reading it from IRC) and for developers who had to fit that thing into IRC line length limit. Time passed, and many ways were suggested to fix this (including https://meta.wikimedia.org/wiki/Recentchanges_via_XMPP and https://www.mediawiki.org/wiki/Requests_for_comment/Structured_data_push_notification_support_for_recent_changes), but nobody actually went ahead and made it work.
After recent discussion on this list I realized that this has been in discussion for as long as four years I went WTF and decided to Just Go Ahead and Fix It. As a result, I made a patch to MediaWiki which allows it to output recent changes feed in JSON: https://gerrit.wikimedia.org/r/#/c/52922/
Also, I wrote a daemon which captures this feed and serves them through WebSockets and simple text-oriented protocol which serves same JSON without WebSocket wrapping (for poor souls writing in languages without proper WebSocket support): https://github.com/wikimedia/mediawiki-rcsub
This daemon is written in Python using Twisted and Autobahn and it takes ~200 lines of code (initial version took ~80).
As a bonus, this involves no XML streaming in any form (unlike XMPP or PubSubHubbub), so the unicorns are happy and unharmed, and minds of programmers implementing this will remain unfried.
I hope that now getting recent changes via reasonable format is a matter of code review and deployment, and we will finally get something reasonable to work with (with access from web browsers!).
- -- Victor.