XEP-0041: Reliable Entity Link

Abstract
Protocol for linking a bytestream between two Jabber entities.
Author
Justin Karneges
Copyright
© 1999 – 2020 XMPP Standards Foundation. SEE LEGAL NOTICES.
Status

Retracted

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 (XEP-0065).
Type
Standards Track
Version
0.2 (2003-09-30)
Document Lifecycle
  1. Experimental
  2. Retracted
  3. Proposed
  4. Draft
  5. Final

1. Overview

1.1 Introduction

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.

1.2 Stream transport properties

A REL-compatible stream transport must have the following properties:

Table 1: Link states
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:

Table 2: Supported streams
Short name Protocol
ibb In-Band Bytestreams (XEP-0047) [1]
s5b SOCKS5 Bytestreams (XEP-0065) [2]

2. Usage

2.1 Service discovery

Before using REL, ensure it is a supported service of the remote entity by using Service Discovery (XEP-0030) [3]:

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>

The remote entity will advertise the "http://jabber.org/protocol/rel" namespace as a feature to represent they implement this protocol.

Example 2. Response
<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>

2.2 Obtaining a REL context

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>
Example 4. Possible response
<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.

2.3 Selecting a Stream

The next step is to ask the remote entity which stream method it would like to use. We will use Feature Negotiation (XEP-0020) [4] for this. The streams are listed using the short names from the table of supported streams.

Example 5. Selecting a stream
<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:

Example 6. Possible response
<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:

Example 7. 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.

3. Security Considerations

There are no security considerations.

4. IANA Considerations

This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [5].

5. XMPP Registrar Considerations

The XMPP Registrar [6] shall register the 'http://jabber.org/protocol/rel' namespace as a result of this document.

6. XML Schema

<?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>

Appendices

Appendix A: Document Information

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
XMPP Core, XEP-0020, XEP-0030
Supersedes
None
Superseded By
XEP-0065
Short Name
rel
Source Control
HTML

This document in other formats: XML  PDF

Appendix B: Author Information

Justin Karneges
Email
justin@affinix.com
JabberID
justin@andbit.net

Copyright

This XMPP Extension Protocol is copyright © 1999 – 2020 by the XMPP Standards Foundation (XSF).

Permissions

Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.

Disclaimer of Warranty

## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##

Limitation of Liability

In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.

IPR Conformance

This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at <https://xmpp.org/about/xsf/ipr-policy> or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).

Visual Presentation

The HTML representation (you are looking at) is maintained by the XSF. It is based on the YAML CSS Framework, which is licensed under the terms of the CC-BY-SA 2.0 license.

Appendix D: Relation to XMPP

The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) 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.

Appendix E: Discussion Venue

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>.

Appendix F: Requirements Conformance

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".

Appendix G: Notes

1. XEP-0047: In-Band Bytestreams <https://xmpp.org/extensions/xep-0047.html>.

2. XEP-0065: SOCKS5 Bytestreams <https://xmpp.org/extensions/xep-0065.html>.

3. XEP-0030: Service Discovery <https://xmpp.org/extensions/xep-0030.html>.

4. XEP-0020: Feature Negotiation <https://xmpp.org/extensions/xep-0020.html>.

5. 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/>.

6. 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 <https://xmpp.org/registrar/>.

Appendix H: Revision History

Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/

  1. Version 0.2 (2003-09-30)
    At the request of the author, the status of this specification has been changed to Retracted since it has been superseded by XEP-0065.
    psa
  2. Version 0.8 (2003-06-26)
    Refactored to old jidlink roots
    jk
  3. Version 0.7 (2003-04-29)
    Overhaul and rename
    jk
  4. Version 0.6 (2002-11-23)
    Reflect changes to DTCP
    jk
  5. Version 0.5 (2002-10-10)
    Table of stream transports
    jk
  6. Version 0.4 (2002-10-10)
    New name, cleaned up the text, added test mode.
    jk
  7. Version 0.3 (2002-09-12)
    Changed the implementation.
    jk
  8. Version 0.2 (2002-08-16)
    Fixed spelling errors, simplified the document.
    jk
  9. Version 0.1 (2002-08-15)
    Initial version.
    jk

END