%ents; ]>
Microblogging over XMPP This specification defines a method for microblogging over XMPP. &LEGALNOTICE; 0277 Experimental Standards Track None Council microblog &stpeter; &hildjj; Sergey Dobrov binary@jrudevels.org binary@jrudevels.org http://jrudevels.org/ Valérian Saliou vanaryon@gmail.com vanaryon@jappix.com http://vanaryon.eu/ 0.5 2011-06-15 vs

Changed the commenting Pubsub service from PEP to external.

0.4 2011-06-01 vs

Added microblog informations feature, ID innacurracy fixed, urn:xmpp:inbox support added, new commenting namespaces, first comment marker, security considerations added.

0.3 2011-04-26 vs

Comments link "link[rel=related]" is now "link[rel=replies]" and "title" is now "content[type=text]" or "content[type=xhtml]"; added geolocation feature; added commenting feature on attachments.

0.2 2011-04-20 vs

Added file attachment and commenting features; updated XML namespaces in examples.

0.1 2010-01-27 psa

Initial version as accepted for publication by the XMPP Council.

0.0.1 2008-05-07 psa/jh

First draft.

Microblogging is an increasingly popular technology for lightweight interaction over the Internet. It differs from traditional blogging in that:

These characteristics map well to instant messaging systems such as those built using Jabber/XMPP technologies (e.g., permissions can be based on existing presence subscriptions as reflected in the XMPP roster or "buddy list"). Furthermore, the push nature of XMPP (especially as formalized in the &xep0163; profile of &xep0060; overcomes the problems of polling for updates via HTTP, which has caused scaling issues in existing microblogging services. Therefore this specification defines a method for microblogging over XMPP, building on the existing method for transporting Atom syndication data &rfc4287; over XMPP as described in &atomsub;. These XMPP-based methods are complementary to HTTP-based methods, and can provide an XMPP interface to existing microblogging services (which may also be accessible via HTTP, Short Message Service (SMS), and other message transports).

A person's microblog SHOULD be located at a personal eventing (PEP) node whose name is "urn:xmpp:microblog:0" but MAY be located at a generic publish-subscribe node that is not attached to a user's IM account. For instance, if the Shakespearean character Romeo has a JabberID of <romeo@montague.lit> then his microblog would be located at that JID with a node of "urn:xmpp:microblog:0". Outside of native XMPP systems, this node can be referred to as the following XMPP URI (the ":" character from the namespace URN is percent-encoded in the query component; see &rfc5122; and &rfc3986;).

Naturally, this node can be discovered by contacting romeo@montague.lit directly using &xep0030;.

Let us imagine that Juliet wishes to receive the posts that Romeo publishes to his microblog. She has two options:

  1. Implicitly subscribe by advertising support for "urn:xmpp:microblog:0+notify" in her &xep0115; data. Romeo's PEP service then automatically sends posts to her when it receives presence from her, until and unless she sends presence of type unavailable or stops advertising an interest in microblog updates.
  2. Explicitly subscribe by sending a formal subscription request to the "urn:xmpp:microblog:0" node at Romeo's JabberID. Romeo's PEP service may send her all posts even if she is offline at the time (depending on service policies regarding presence integration).

Romeo can publish a post via any interface provided by his service, such as a website, the Atom Publishing Protocol (see &rfc5023;), SMS, an IM bot, or XMPP pubsub. Here we assume that the post is provided via XMPP pubsub.

The post content itself can be either text ("content" element "type" attribute with "text" value) or XHTML ("content" element "type" attribute with "xhtml" value). If Romeo publishes XHTML content, his client MUST publish two "content" elements: a text one, and a XHTML one. For XHTML publishing, see &xep0060;.

Note: Publishing via HTTP, AtomPub, SMS, or IM bot is simpler for the client (e.g., because the client does not need to generate an Item ID).

Romeo Montague xmpp:romeo@montague.lit hanging out at the Caf&#233; Napolitano tag:montague.lit,2008-05-08:posts-1cb57d9c-1c46-11dd-838c-001143d5d5db 2008-05-08T18:30:02Z 2008-05-08T18:30:02Z ]]>

Because Juliet has sent presence to Romeo including Entity Capabilities data that encapsulates the "urn:xmpp:microblog:0+notify" feature, Romeo's XMPP server will send a PEP notification to Juliet. The notification can include an XMPP message body for backwards-compatibility with Jabber clients that are not pubsub-capable (see Message Body).

hanging out at the Caf&#233; Napolitano Romeo Montague xmpp:romeo@montague.lit hanging out at the Caf&#233; Napolitano tag:montague.lit,2008-05-08:posts-1cb57d9c-1c46-11dd-838c-001143d5d5db 2008-05-08T18:30:02Z 2008-05-08T18:30:02Z ]]>

Anyone can publish a post in reply to Romeo's post. Here we assume that a reply comes from Benvolio.

Note: Inclusion of the <in-reply-to/> element defined in &rfc4685; indicates the post to which the user is replying. This reply includes two such elements (one pointing to the HTTP URL for the post and the other pointing to the XMPP URI for the post.

Benvolio Montague xmpp:romeo@montague.lit @romeo cappuccino this late in the day? tag:montague.lit,2008-05-08:posts-c4145006-1c53-11dd-b2d5-000bcd82471e 2008-05-08T18:31:21Z 2008-05-08T18:31:21Z ]]>

Assuming that Romeo has also shared presence with Benvolio and has advertised support for "urn:xmpp:microblog:0+notify", he will receive the reply that Benvolio sent.

When Benvolio wants to repeat a Romeo's post, his client publishes the same post under a different name. But to be able to track the repeated post original author, Benvolio's client MAY use two specific <author /> child nodes, <name /> and <uri />, containing, respectively, the name of the original post author, and his XMPP URI (JID).

If a comments link is present (see the Post Comments section of this document), the client SHOULD repeat it to keep the same discussion about the post.

Romeo Montague xmpp:romeo@montague.lit hanging out at the Caf&#233; Napolitano tag:montague.lit,2008-05-08:posts-1re57d3c-1q46-11dd-748r-024943d2d5rt 2008-05-08T18:30:02Z 2008-05-08T18:32:02Z ]]>

Thus, a different author JID value lets the client know the microblog item has been repeated from another one.

Romeo might want to attach some files, such as pictures of his last vacations, or documents he wants to share. For each file to publish, Romeo's client MUST add a <link /> element. The "href" and "rel" attributes MUST be added; the "title", "type" and "length" ones MIGHT be added.

Romeo Montague xmpp:romeo@montague.lit Beautiful Eiffel Tower! tag:montague.lit,2008-05-08:posts-1df87v1q-2d12-43se-761w-318790d3g1sq 2008-05-08T18:35:02Z 2008-05-08T18:35:02Z ]]>

If client can generate some thumbnails images of the attached file (for pictures, videos or documents), it MAY create one or more <link /> sub-elements to the parent file <link /> element. It MUST set "xmlns" attribute to "urn:xmpp:microblog:0"; "rel" attribute to "self"; "title" attribute to "thumb"; "href" to the path of the thumbnail image. It SHOULD also have a "type" attribute specifying the thumbnail file MIME type.

Juliet and Benvolio may want to discuss about latest Romeo's post. Romeo's client MIGHT add a element to the PubSub item. The element MUST have "rel", "title" and "href" attributes, where "rel" MUST have the "replies" value; "title" MUST have the "comments" value; "href" MUST be an XMPP URI (see &rfc5122; and &rfc3986;).

We assume Romeo's client first created a comments node (named "urn:xmpp:microblog:0:comments/ID", where "ID" is the microblog item ID, or the SHA-1 encoded attachement URI, as defined in &rfc3174;), with defaults "pubsub#access_model" and "pubsub#publish_model" privacy settings (see &xep0060; for node creation and configuration).

Romeo Montague xmpp:romeo@montague.lit hanging out at the Caf&#233; Napolitano tag:montague.lit,2008-05-08:posts-2ze57d9c-1c46-21df-830c-002143d3d2qgf 2008-05-08T18:38:02Z 2008-05-08T18:38:02Z ]]>

If the comment to publish is the first item of the node, the client MAY add a "link" element, with the "rel=start" attribute. In this way, clients can determine which comment is the first one of a discussion.

As we do for Post Comments, Romeo's client MAY create one comments PubSub node for each attachement of a post (see section of Attaching files to a Post of this document).

The element to create MUST be children of the parent "link" element of the attachement. Some attributes differ from the original commenting specification: "xmlns" attribute MUST be set to value "urn:xmpp:microblog:0"; "title" attribute MUST be set to value "comments_file".

Romeo Montague xmpp:romeo@montague.lit I love cranberries! tag:montague.lit,2008-05-08:posts-1af87d4i-3f09-41gt-871e-098182g4b2az 2008-05-08T18:54:02Z 2008-05-08T18:54:02Z ]]>

If Juliet wants to comment Romeo's latest post, her client MUST then send a new Atom entry to the defined PubSub node.

Note: A comments node SHOULD be located at a generic publish-subscribe node that is not attached to a user's IM account, but MAY be located at a personal eventing (PEP) node.

Juliet Capulet xmpp:juliet@capulet.lit She is so pretty! 2008-05-08T18:39:02Z ]]>

If Benvolio wants to retrieve the comments node, his client will send a standard PubSub stanza to request all items (see &xep0060; for all items retrieving).

Juliet may want to know which places are Romeo's notices related to. That's why Romeo's client MIGHT geotag microblog entries, using the &xep0080; protocol for storing geolocation informations.

Romeo's client MUST create a "geoloc" element, with the &xep0080; reference namespace: "http://jabber.org/protocol/geoloc".

Romeo Montague xmpp:romeo@montague.lit Is lost in the forest. Need help! tag:montague.lit,2008-05-08:posts-1zr23z8a-3g12-34fh-750b-120867gjc1sqh 2008-05-08T18:43:01Z 2008-05-08T18:43:01Z 48.171761 -3.3667986 France FR Brittany ]]>

Romeo may want to publish some informations about his microblog, such as its title, an alternate web-version URI or the last time it was updated.

Romeo's client MAY publish these informations once he defined them. If so, his client MUST send them to the "urn:xmpp:microblog:0:informations" node, containing one only item, with the ID set to "0".

Romeo&apos;s Microblog tag:montague.lit,2008:home 2008-05-08T18:30:02Z Romeo Montague xmpp:romeo@montague.lit ]]>

When replying to a comment, it is RECOMMENDED the user's client send a notification to the people who commented on the comments node, as defined in a forthcoming specification currently located at <http://xmpp.org/extensions/inbox/notification-inbox.html>.

When quoting an user's name (e.g., by using @user tag), it is also RECOMMENDED to send a similar notification.

Depending on service policies and the value of the "pubsub#include_body" node configuration option, microblogging notifications SHOULD include a message <body/> element for backwards-compatibility with Jabber clients that are not pubsub-capable. It is RECOMMENDED for the XML character value of the <body/> element to be the same as that of the <content/> child of the Atom <entry/>.

The client SHOULD check that the comment author informations (provided in the "author" element) are valid, by checking that the "publisher" item attribute value matches the "uri" element value. If there is a difference, the comment MIGHT be displayed, but it is RECOMMENDED to specify there is a security problem.

This document requires no interaction with &IANA;.

The ®ISTRAR; is requested to issue an initial namespace of "urn:xmpp:microblog:0".

This specification re-uses the schema for the Atom content format, i.e., the 'http://www.w3.org/2005/Atom' namespace (see RFC 4287).

Thanks to Ralph Meijer and Paul Scott for their suggestions.