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 (XEP-0047) |
s5b | SOCKS5 Bytestreams (XEP-0065) |
Before using REL, ensure it is a supported service of the remote entity by using Service Discovery (XEP-0030)
The remote entity will advertise the "http://jabber.org/protocol/rel" namespace as a feature to represent they implement this protocol.
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:
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 (XEP-0020)
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:
Or maybe an error:
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)
The XMPP Registrar
]]>