Abstract: | This specification defines a method for microblogging over XMPP. |
Authors: | Peter Saint-Andre, Joe Hildebrand |
Copyright: | © 1999 - 2010 XMPP Standards Foundation. SEE LEGAL NOTICES. |
Status: | Deferred |
Type: | Standards Track |
Version: | 0.1 |
Last Updated: | 2010-01-27 |
WARNING: Consideration of this document has been Deferred by the XMPP Standards Foundation. Implementation of the protocol described herein is not recommended.
1. Introduction
2. Protocol
2.1. Location
2.2. Subscribing to a Microblog
2.3. Publishing a Post
2.4. Receiving a Post
2.5. Replying to a Post
3. Message Body
4. Security Considerations
5. IANA Considerations
6. XMPP Registrar Considerations
7. XML Schema
8. Acknowledgements
Appendices
A: Document Information
B: Author Information
C: Legal Notices
D: Relation to XMPP
E: Discussion Venue
F: Requirements Conformance
G: Notes
H: Revision History
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 Personal Eventing Protocol [1] profile of Publish-Subscribe [2] 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 RFC 4287 [3] over XMPP as described in AtomSub [4]. 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 RFC 5122 [5] and RFC 3986 [6]).
xmpp:romeo@montague.lit?;node=urn%3Axmpp%3Atmp%3Amicroblog
Naturally, this node can be discovered by contacting romeo@montague.lit directly using Service Discovery [7].
Let us imagine that Juliet wishes to receive the posts that Romeo publishes to his microblog. She has two options:
Romeo can publish a post via any interface provided by his service, such as a website, the Atom Publishing Protocol (see RFC 5023 [9]), SMS, an IM bot, or XMPP pubsub. Here we assume that the post is provided via XMPP pubsub.
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).
<iq from='romeo@montague.lit/pda' id='pub1' to='romeo@montague.lit' type='set'> <pubsub xmlns='http://jabber.org/protocol/pubsub'> <publish node='urn:xmpp:microblog:0'> <item id='1cb57d9c-1c46-11dd-838c-001143d5d5db'> <entry xmlns='http://www.w3.org/2005/Atom'> <source> <title>Romeo&apos;s Microblog</title> <link href='http://montague.lit/romeo'/> <id>tag:montague.lit,2008:home</id> <updated>2008-05-08T18:30:02Z</updated> <author> <name>Romeo Montague</name> </author> </source> <title>hanging out at the Caf&#233; Napolitano</title> <link rel='alternate' type='text/html' href='http://montague.lit/romeo/posts/1cb57d9c-1c46-11dd-838c-001143d5d5db'/> <link rel='alternate' href='xmpp:romeo@montague.lit?;node=urn%3Axmpp%3Atmp%3Amicroblog;item=1cb57d9c-1c46-11dd-838c-001143d5d5db'/> <id>tag:montague.lit,2008-05-08T18:30:02Z:posts-1cb57d9c-1c46-11dd-838c-001143d5d5db</id> <published>2008-05-08T18:30:02Z</published> <updated>2008-05-08T18:30:02Z</updated> </entry> </item> </publish> </pubsub> </iq>
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).
<message from='romeo@montague.lit' to='juliet@capulet.lit' type='headline'> <body>hanging out at the Caf&#233; Napolitano</body> <event xmlns='http://jabber.org/protocol/pubsub#event'> <items node='urn:xmpp:microblog:0'> <item id='1cb57d9c-1c46-11dd-838c-001143d5d5db'> <entry xmlns='http://www.w3.org/2005/Atom'> <source> <title>Romeo&apos;s Microblog</title> <link href='http://montague.lit/romeo'/> <id>tag:montague.lit,2008:home</id> <updated>2008-05-08T18:30:02Z</updated> <author> <name>Romeo Montague</name> </author> </source> <title>hanging out at the Caf&#233; Napolitano</title> <link rel='alternate' type='text/html' href='http://montague.lit/romeo/posts/1cb57d9c-1c46-11dd-838c-001143d5d5db'/> <link rel='alternate' href='xmpp:romeo@montague.lit?;node=urn%3Axmpp%3Atmp%3Amicroblog;item=1cb57d9c-1c46-11dd-838c-001143d5d5db'/> <id>tag:montague.lit,2008-05-08T18:30:02Z:posts-1cb57d9c-1c46-11dd-838c-001143d5d5db</id> <published>2008-05-08T18:30:02Z</published> <updated>2008-05-08T18:30:02Z</updated> </entry> </item> </items> </event> </message>
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 RFC 4685 [10] 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.
<iq from='benvolio@montague.lit/mobile' id='uv2x37s5' to='benvolio@montague.lit' type='set'> <pubsub xmlns='http://jabber.org/protocol/pubsub'> <publish node='urn:xmpp:microblog:0'> <item id='c4145006-1c53-11dd-b2d5-000bcd82471e'> <entry xmlns='http://www.w3.org/2005/Atom' xmlns:thr='http://purl.org/syndication/thread/1.0'> <source> <title>Benvolio&apos;s Microblog</title> <link href='http://montague.lit/benvolio'/> <id>tag:montague.lit,2008:home</id> <updated>2008-05-08T18:31:21Z</updated> <author> <name>Benvolio Montague</name> </author> </source> <title>@romeo cappuccino this late in the day?</title> <link rel='alternate' type='text/html' href='http://montague.lit/benvolio/posts/c4145006-1c53-11dd-b2d5-000bcd82471e'/> <link rel='alternate' href='xmpp:benvolio@montague.lit?; node=urn%3Axmpp%3Atmp%3Amicroblog; item=c4145006-1c53-11dd-b2d5-000bcd82471e'/> <id>tag:montague.lit,2008-05-08T18:31:21Z:posts-c4145006-1c53-11dd-b2d5-000bcd82471e'</id> <published>2008-05-08T18:31:21Z</published> <updated>2008-05-08T18:31:21Z</updated> <thr:in-reply-to ref='tag:montague.lit,2008-05-08T18:30:02Z:posts-1cb57d9c-1c46-11dd-838c-001143d5d5db' type='application/xhtml+xml' href='http://montague.lit/romeo/posts/1cb57d9c-1c46-11dd-838c-001143d5d5db'/> <thr:in-reply-to ref='tag:montague.lit,2008-05-08T18:30:02Z:posts-1cb57d9c-1c46-11dd-838c-001143d5d5db' href='xmpp:romeo@montague.lit?;node=urn%3Axmpp%3Atmp%3Amicroblog;item=1cb57d9c-1c46-11dd-838c-001143d5d5db'/> </entry> </item> </publish> </pubsub> </iq>
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.
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 <title/> child of the Atom <entry/>.
This specification does not introduce new security concerns above and beyond those already discussed in the specifications on which it depends.
This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [11].
The XMPP Registrar [12] 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.
Thanks to Ralph Meijer and Paul Scott for their suggestions.
Series: XEP
Number: 0277
Publisher: XMPP Standards Foundation
Status:
Deferred
Type:
Standards Track
Version: 0.1
Last Updated: 2010-01-27
Approving Body: XMPP Council
Dependencies: None
Supersedes: None
Superseded By: None
Short Name: NOT YET ASSIGNED
Source Control:
HTML
RSS
This document in other formats:
XML
PDF
Email:
stpeter@jabber.org
JabberID:
stpeter@jabber.org
URI:
https://stpeter.im/
Email:
jhildebr@cisco.com
JabberID:
hildjj@jabber.org
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 3920) and XMPP IM (RFC 3921) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.
The primary venue for discussion of XMPP Extension Protocols is the <standards@xmpp.org> discussion list.
Discussion on other xmpp.org discussion lists might also be appropriate; see <http://xmpp.org/about/discuss.shtml> for a complete list.
Errata can be sent to <editor@xmpp.org>.
The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".
1. XEP-0163: Personal Eventing Protocol <http://xmpp.org/extensions/xep-0163.html>.
2. XEP-0060: Publish-Subscribe <http://xmpp.org/extensions/xep-0060.html>.
3. RFC 4287: The Atom Syndication Format <http://tools.ietf.org/html/rfc4287>.
4. Atomsub: Transporting Atom Notifications over the Publish-Subscribe Extension to the Extensible Messaging and Presence Protocol (XMPP) <http://xmpp.org/internet-drafts/draft-saintandre-atompub-notify-07.html>. Work in progress.
5. RFC 5122: Internationalized Resource Identifiers (IRIs) and Uniform Resource Identifiers (URIs) for the Extensible Messaging and Presence Protocol (XMPP) <http://tools.ietf.org/html/rfc5122>.
6. RFC 3986: Uniform Resource Identifiers (URI): Generic Syntax <http://tools.ietf.org/html/rfc3986>.
7. XEP-0030: Service Discovery <http://xmpp.org/extensions/xep-0030.html>.
8. XEP-0115: Entity Capabilities <http://xmpp.org/extensions/xep-0115.html>.
9. RFC 5023: The Atom Publishing Protocol <http://tools.ietf.org/html/rfc5023>.
10. RFC 4685: Atom Threading Extensions <http://tools.ietf.org/html/rfc4685>.
11. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.
12. The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <http://xmpp.org/registrar/>.
Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/
Initial version as accepted for publication by the XMPP Council.
(psa)First draft.
(psa/jh)END