| Abstract: | Protocol for linking a bytestream between two Jabber entities. |
| Author: | Justin Karneges |
| Copyright: | © 1999 - 2011 XMPP Standards Foundation. SEE LEGAL NOTICES. |
| Status: | Retracted |
| Type: | Standards Track |
| Version: | 0.2 |
| Last Updated: | 2003-09-30 |
WARNING: This document has been retracted by the author(s). Implementation of the protocol described herein is not recommended. Developers desiring similar functionality are advised to implement the protocol that supersedes this one (if any).
1. Overview
1.1. Introduction
1.2. Stream transport properties
2. Usage
2.1. Service discovery
2.2. Obtaining a REL context
2.3. Selecting a Stream
3. Security Considerations
4. IANA Considerations
5. XMPP Registrar Considerations
6. XML Schema
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
Reliable Entity Link (or simply 'REL'), is a system for coordinating reliable bytestreams between two Jabber entities for the purpose of keeping applications (and application specifications) simple. However, this proposal does not define any specific bytestream protocol. It is expected that there will be multiple ways to obtain a bytestream between Jabber entities (thru-server and peer-to-peer are two methods that come to mind), but applications can refer to REL instead of some particular stream transport.
A REL-compatible stream transport must have the following properties:
| Code | Description |
|---|---|
| INIT | Initiation |
| GOOD | Successful initiation (connected) |
| BAD | Unsuccessful initiation (stream is closed, no further state) |
| CLOS | Successful closure after establishment (stream is closed, no further state) |
| ERR | Link failure after establishment (stream is closed, no further state) |
The following stream transports that meet these guidelines are:
| Short name | Protocol |
|---|---|
| ibb | In-Band Bytestreams [2] |
| s5b | SOCKS5 Bytestreams [3] |
Before using REL, ensure it is a supported service of the remote entity by using Service Discovery [4]:
Example 1. Requesting disco information
<iq type="get" to="joe@blow.com/Home" id="sd_1"> <query xmlns="http://jabber.org/protocol/disco#info"/> </iq>
<iq type="result" from="joe@blow.com/Home" id="sd_1">
<query xmlns="http://jabber.org/protocol/disco#info">
<feature var="http://jabber.org/protocol/rel"/>
</query>
</iq>
To use REL, the entities must obtain a REL Context ID (or cid) through some action. A cid is simply an opaque alphanumeric string. For example, perhaps the link is needed for a file transfer:
Example 3. Possible File Transfer
<iq type="set" id="ft_1" to="joe@blow.com/Home"> <query xmlns="filexfer" filename="coolfile.txt"/> </iq>
<iq type="result" id="ft_1" from="joe@blow.com/Home">
<query xmlns="filexfer">
<cid xmlns="http://jabber.org/protocol/rel" value="myCID"/>
</query>
</iq>
All high-level protocols that use Reliable Entity Link MUST have a way of providing such a cid. The cid must be unique among all other REL cids between the two entities.
The next step is to ask the remote entity which stream method it would like to use. We will use Feature Negotiation [5] for this. The streams are listed using the short names from the table of supported streams.
<iq type="get" id="rel_1" to="joe@blow.com/Home">
<query xmlns="http://jabber.org/protocol/rel" cid="myCID" keepAlive='true'>
<feature xmlns="http://jabber.org/protocol/feature-neg">
<x xmlns="jabber:x:data">
<field var="method" type="list-single">
<option><value>s5b</value></option>
<option><value>ibb</value></option>
</field>
</x>
</feature>
</query>
</iq>
The keepAlive attribute indicates that the initiator is planning on trying another method if the one selected here is to fail. An entity SHOULD use keepAlive for all attempts but the last for a given application. If keepAlive is omitted, then it is considered false.
The remote entity will then agree on a method:
<iq type="result" id="rel_1" from="joe@blow.com/Home">
<query xmlns="http://jabber.org/protocol/rel" cid="myCID">
<feature xmlns="http://jabber.org/protocol/feature-neg">
<x xmlns="jabber:x:data" type="submit">
<field var="method">
<value>s5b</value>
</field>
</x>
</feature>
</query>
</iq>
Or maybe an error:
<iq type="error" id="rel_1" from="joe@blow.com/Home"> <error code="501">No supported protocols.</error> </iq>
If the entity returns error, then the REL cid is invalidated and the application fails. If a stream method has been chosen successfully, then now it must be initiated using the REL cid as the stream's identifier (the stream goes into INIT state).
On GOOD: This indicates the stream is ready for use within the original context, and data exchanged over the stream is to be left up to the application.
On BAD: If the keepAlive="true" attribute was specified, then the initiator MUST repeat this section over again to attempt with a different method. If keepAlive was not specified, then the REL cid is invalidated and the application fails.
On CLOS or ERR, the REL cid is invalidated.
There are no security considerations.
This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [6].
The XMPP Registrar [7] shall register the 'http://jabber.org/protocol/rel' namespace as a result of this document.
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='http://jabber.org/protocol/rel'
xmlns='http://jabber.org/protocol/rel'
elementFormDefault='qualified'>
<xs:element name='query'>
<xs:complexType>
<xs:attribute name='cid' type='xs:string' use='required'/>
<xs:attribute name='keepAlive' type='xs:boolean' use='optional'/>
</xs:complexType>
</xs:element>
</xs:schema>
Series: XEP
Number: 0041
Publisher: XMPP Standards Foundation
Status:
Retracted
Type:
Standards Track
Version: 0.2
Last Updated: 2003-09-30
Approving Body: XMPP Council
Dependencies: None
Supersedes: None
Superseded By: None
Short Name: rel
Source Control:
HTML
This document in other formats:
XML
PDF
Email:
justin@affinix.com
JabberID:
justin@andbit.net
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-0065: SOCKS5 Bytestreams <http://xmpp.org/extensions/xep-0065.html>.
2. XEP-0047: In-Band Bytestreams <http://xmpp.org/extensions/xep-0047.html>.
3. XEP-0065: SOCKS5 Bytestreams <http://xmpp.org/extensions/xep-0065.html>.
4. XEP-0030: Service Discovery <http://xmpp.org/extensions/xep-0030.html>.
5. XEP-0020: Feature Negotiation <http://xmpp.org/extensions/xep-0020.html>.
6. 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/>.
7. 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/
END