Last modified: 2014-05-13 18:12:19 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T19450, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 17450 - Make Recent Changes available via XMPP
Make Recent Changes available via XMPP
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
Recent changes (Other open bugs)
unspecified
All All
: Low enhancement with 10 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
http://brightbyte.de/page/RecentChang...
:
: 23001 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-02-11 20:04 UTC by Siebrand Mazeland
Modified: 2014-05-13 18:12 UTC (History)
24 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Siebrand Mazeland 2009-02-11 20:04:52 UTC
Daniel Kinzler wrote an excellent piece on why it makes sense to make RC available over IRC. In his blog post, he also describes some ideas, and why he cannot be the one to code it up.

Just so that this does not only gather dust on his blog, I'm adding this feature request here.

While we're at it, I guess that Watchlist over XMPP would also be interesting...
Comment 1 Daniel Kinzler 2009-02-12 00:03:21 UTC
marking the more general bug 14045 as dependant on this.
Comment 2 Daniel Kinzler 2009-02-12 00:04:29 UTC
To carify: I wrote about why it does NOT make sense to provide the feed via IRC, and why XMPP would be much better. http://brightbyte.de/page/RecentChanges_via_Jabber
Comment 3 Brion Vibber 2009-02-12 00:13:01 UTC
nom nom nom :)

To summarize for those too lazy to go read the awesome blog post:

* Provide for Jabber output embedding XML payload in format of API recentchanges feed
* Some internal interface making it easy for MW to ship those out to a Jabber server to send to the outside world (some handy UDP-packet-stream-to-XMPP-bridge so we can use off-the-shelf Jabber server for that part?)
* in future, consider options for pubsub/filtering fancy stuff
Comment 4 Mike.lifeguard 2009-02-12 00:16:20 UTC
(In reply to comment #1)
> marking the more general bug 14045 as dependant on this.
> 

So the intent is definitely to provide an easy-to-parse/machine-readable feed specifically intended for this use? *drools*
Comment 5 Daniel Kinzler 2009-04-15 07:33:05 UTC
This was discussed at the developer meet-up in Berlin. Notes here: http://www.mediawiki.org/wiki/Project:Developer_meet-up_2009/Notes/XMPP

Catrope and Leafnode said they would work on it.
Comment 6 Derk-Jan Hartman 2009-05-22 14:15:06 UTC
This would also be wonderful for SUL talkpage changes. I'd love to be able to receive notifications of stuff like that in my Adium client for instance. 
Comment 7 Daniel Kinzler 2009-11-08 10:11:08 UTC
Code for generating the XML notification messages, and some rudiments of XMPP integration, are in SVN at <http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/XMLRC/>. The code is somewhat incomplete and largely untested though, pending a test setup with a working XMPP server (poke poke brion wink wink).
Comment 8 Gurch 2010-02-28 12:25:13 UTC
Is this still being worked on? I've been told not to make changes to the IRC recent changes feed because it's going to be replaced by this, yet all I see is some old discussion. Meanwhile core MediaWiki functionality is completely unsupported in the feed making client applications far more inefficient than they should be.  I don't have the necessary access/knowledge to progress this issue further (apparently some kind of test server needs to be set up) but I am more than capable of modifying the feed code.
Comment 9 Daniel Kinzler 2010-02-28 21:06:43 UTC
@Gurch this has been sitting on my todo-list for some time now, but I plan to make serious progress on this in march and April. The part for emitting XML via UDP is pretty much done, the bit I have to do is a udp-to-xmpp-bridge that stuffs that XML info a MUC or, better, pubsub  channel. 

Poke me again in a month or so.
Comment 10 Guandalug 2010-06-05 13:50:53 UTC
Just a 2-Months-later-poke....
Comment 11 tisane2718 2010-06-05 17:08:06 UTC
Is there any possibility of, in addition to summary, user, etc., also distributing the new article contents via XMPP when edits are made? That could take some load off the servers by eliminating the need for bots to query the API for article contents, e.g. when they suspect vandalism and need to check it out.
Comment 12 Brion Vibber 2010-06-06 20:46:39 UTC
Best way to include text is probably to have distinct feeds you could subscribe to for metadata-only and metadata-plus-full text.  That'll keep the main feeds lightweight, but let's those who need the text avoid an extra web hit.
Comment 13 tisane2718 2010-07-16 15:53:47 UTC
I notice that XMLRC_XMPP.class.php has this line: include( "XMPP.php" );

But, there is no XMPP.php in the XMLRC directory in SVN. What PHP XMPP library should be used with this? There seem to be several available on the Internet.
Comment 14 Daniel Kinzler 2010-07-17 09:41:54 UTC
@tisane: that class is work in progress, i never got around to finishing it. i think i was using the xmpphp library, but i'm not sure any more. writing the xmpp connector (direct, and more imprtantly a standalone udp-to-xmpp bridge) is still on my todo list.
Comment 15 tisane2718 2010-07-17 15:26:10 UTC
*** Bug 23001 has been marked as a duplicate of this bug. ***
Comment 16 X! 2010-07-19 01:02:05 UTC
Perhaps an alternate method while this is being implemented is to set up an alternate IRC server that sends JSON-encoded messages to make it easier to program bots?
Comment 17 Niklas Laxström 2010-07-19 05:35:06 UTC
You would hit the size limit of one message quite quickly.
Comment 18 tisane2718 2010-07-22 23:44:56 UTC
What XMPP size limit are you referring to? I thought one of the advantages of XMPP is that it does not specify a hardcoded limit on the size of XMPP stanzas. http://xmpp.org/extensions/inbox/stanzalimits.html
Comment 19 MZMcBride 2010-07-22 23:55:27 UTC
(In reply to comment #18)
> What XMPP size limit are you referring to? I thought one of the advantages of
> XMPP is that it does not specify a hardcoded limit on the size of XMPP stanzas.
> http://xmpp.org/extensions/inbox/stanzalimits.html

I think comment 17 was referring to the IRC-related idea in comment 16.
Comment 20 Daniel Kinzler 2010-08-17 15:31:56 UTC
I finished XMLRC, an extension implementing this: <http://www.mediawiki.org/wiki/Extension:XMLRC>. I have set up a demo on the toolserver (fed by polling the API). You can join it at enwiki@conference.jabber.toolserver.org using any jabber client. 

The human readable messages are similar to the ones send to the RC channels on IRC, but there's extra XML payload in the messages, like this:

<message xmlns="jabber:client" to="john@jabber.org/mars"
         from="enwiki@conference.jabber.toolserver.org/xmlrc"
         id="38" type="groupchat">
  <body>[[List of Knight's Cross recipients: Z]]  
        http://en.wikipedia.org/w/index.php?diff=378715833&amp;rcid=389791968&amp;oldid=378714319&amp;title=List+of+Knight%27s+Cross+recipients%3A+Z * 
        MisterBee1966 * (+1203) /* Recipients */</body>
  <rc comment="/* Recipients */ " newlen="26554" rcid="389791968"
      pageid="8089657" title="List of Knight's Cross recipients: Z"
      timestamp="2010-08-13T14:08:49Z" wikiid="enwiki" 
      revid="378715833" old_revid="378714319" user="MisterBee1966"
      ns="0" type="edit" oldlen="25351">
    <tags />
  </rc>
</message>

The extension includes a demo client in python.
Comment 21 X! 2010-08-17 15:46:30 UTC
You may want to set the xml:space="preserve" attribute in the <body> tag, so XML parsers will leave whitespace in the content alone.
Comment 22 Daniel Kinzler 2010-08-17 15:58:34 UTC
(In reply to comment #21)
> You may want to set the xml:space="preserve" attribute in the <body> tag, so
> XML parsers will leave whitespace in the content alone.

Uh, i could, but... there's no text, all information is in attributes. So i see no point...
Comment 23 Daniel Kinzler 2010-08-17 15:59:30 UTC
(In reply to comment #21)
or do you mean in the regular xmpp message body? that'S up the xmpp library, i won't mess with that. anyway, it's all on one line.
Comment 24 X! 2010-08-17 17:36:06 UTC
All right then, don't bother with the library. I would LOVE to see this, at least on test.wikipedia.org for testing.
Comment 25 X! 2010-08-17 23:33:40 UTC
Quick query, why use just XML? It would be nice to be able to get an alternate format on request, such as JSON or serialized PHP.
Comment 26 Daniel Kinzler 2010-08-18 07:29:55 UTC
(In reply to comment #25)
> Quick query, why use just XML? It would be nice to be able to get an alternate
> format on request, such as JSON or serialized PHP.

Two reasons: 

1) XMPP supports XML payload - that means I can embed XML natively in XMPP stanzas. No need for wrapping, escaping or encoding. It will also get parsed automatically, and is accessible directly in the xmpp client framework. 

2) there are no requests. Everyone gets the same data, this is basically a multicast setup. Broadcasting everything in all formats would be silly.

That being said: I'm thinking about making an XMPP interface to the API, so people can send queries and receive answers via XMPP. In that case, supporting different formats would be an option, though it still seems silly: with XMPP, XML parsing comes for free, handling any other format adds work and cost.
Comment 27 Daniel Kinzler 2010-08-18 08:30:42 UTC
I have described the prototype setup at http://meta.wikimedia.org/wiki/Recentchanges_via_XMPP
Comment 28 Robin Krahl 2010-10-11 16:11:51 UTC
I would appreciate having XMLRC enabled on the Wikimedia wiki family soon as it is *really* helpful in writing RC appliations.  Especially on writing new programs and scripts (as I am doing at the moment) it is suboptimal if you have to implement IRC support knowing that a. it will be outdated soon and b. it is very complicated to extract the real information from the mixture of color codes and special characters.  So I want to confirm the previous wishes for quick activation.
Comment 29 X! 2010-10-11 17:11:50 UTC
Just realized that this would not be able to be placed in core as it stands (which is what I would like to see eventually), due to the Python prerequisite.
Comment 30 Daniel Kinzler 2010-10-11 21:29:27 UTC
perhaps the bit that emits the udp packets could be split of and put into core - that's the part that is actually a proper mediawiki extension. the rest is utilities, really...
Comment 31 MZMcBride 2010-10-11 22:54:43 UTC
(In reply to comment #24)
> All right then, don't bother with the library. I would LOVE to see this, at
> least on test.wikipedia.org for testing.

This is bug 24836.

(In reply to comment #29)
> Just realized that this would not be able to be placed in core as it stands
> (which is what I would like to see eventually), due to the Python prerequisite.

Well, there's nothing to say that core has to be pure PHP. In fact, parts currently aren't (like math support). It should certainly be discouraged, though.
Comment 32 X! 2010-10-12 00:16:57 UTC
math is in there for historical reasons. However, I do know that extensions like timeline, etc have been denied merging with core for non-PHP-ness.
Comment 33 Nemo 2012-02-19 10:03:23 UTC
This feature would be the long-term solution to problems like 34508 (not marking as blocker since a near-term solution will be pursued perhaps).
Comment 35 Gerrit Notification Bot 2014-05-05 01:17:17 UTC
Change 131040 had a related patch set uploaded by Ori.livneh:
Add 'rcstream' module for broadcasting recent changes over WebSockets

https://gerrit.wikimedia.org/r/131040
Comment 36 Gerrit Notification Bot 2014-05-09 12:21:52 UTC
Change 131040 merged by Faidon Liambotis:
Add 'rcstream' module for broadcasting recent changes over WebSockets

https://gerrit.wikimedia.org/r/131040
Comment 37 Siebrand Mazeland 2014-05-09 12:38:46 UTC
Sometimes it takes more than 5 years, but it's great to see that stuff is happening!
Comment 38 Krinkle 2014-05-13 16:59:45 UTC
Closing this bug in MediaWiki core.

* MediaWiki now provides the wgRCFeeds and MachineReadableRCFeedFormatter interfaces. These don't set up their own subscribable web service, but that seems outside of the scope for MediaWiki. The interface to broadcast to such a service (set up by the server admin) exists, and that seems enough.



* While this bug specifically requested XMPP, the overall use case for Wikimedia wikis is bug 14045. It focusses on setting up a public service that will make use of this feed for Wikimedia wikis (though JSON-based, not XML like this bug suggested). If we really want XMPP specifically, we should file a new bug for that I think,
Comment 39 Ed Summers 2014-05-13 18:12:19 UTC
Thanks for this work, much appreciated!

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links