git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@2757 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
Peter Saint-Andre 2009-02-19 22:15:59 +00:00
parent 743b30dccb
commit f68191a0a9
1 changed files with 7 additions and 147 deletions

View File

@ -26,13 +26,13 @@
&stpeter;
<revision>
<version>0.9</version>
<date>2009-02-11</date>
<date>2009-02-19</date>
<initials>psa</initials>
<remark>
<ul>
<li>Moved Jingle definitions of IBB and S5B transports to standalone documents.</li>
<li>Because the jingle-ibb and jingle-s5b transport methods are backwards-incompatible, incremented protocol version number from 0 to 1 and changed namespace from urn:xmpp:jingle:apps:file-transfer:0 to urn:xmpp:jingle:apps:file-transfer:1.</li>
<li>Simplified fallback flow by removing transport-accept round trip.</li>
<li>Moved Jingle definitions of S5B and IBB transports to standalone documents.</li>
<li>Because the jingle-s5b and jingle-ibb transport methods are backwards-incompatible, incremented protocol version number from 0 to 1 and changed namespace from urn:xmpp:jingle:apps:file-transfer:0 to urn:xmpp:jingle:apps:file-transfer:1.</li>
<li>Moved transport fallback scenario to XEP-0260.</li>
</ul>
</remark>
</revision>
@ -131,8 +131,8 @@
<ul>
<li>urn:xmpp:jingle:0 as described in XEP-0166</li>
<li>urn:xmpp:jingle:apps:file-transfer:1 as defined in this document</li>
<li>urn:xmpp:jingle:transports:s5b:0 as defined in xep-jingle-s5b (currently located at <link url='http://xmpp.org/extensions/inbox/jingle-s5b.html'>http://xmpp.org/extensions/inbox/jingle-s5b.html</link>)</li>
<li>urn:xmpp:jingle:transports:ibb:0 as defined in xep-jingle-ibb (currently located at <link url='http://xmpp.org/extensions/inbox/jingle-ibb.html'>http://xmpp.org/extensions/inbox/jingle-ibb.html</link>)</li>
<li>urn:xmpp:jingle:transports:s5b:0 as defined in &xep0260;</li>
<li>urn:xmpp:jingle:transports:ibb:0 as defined in &xep0261;</li>
</ul>
<p>The initiator then sends a Jingle session-initiation request to a potential responder. The content-type of the request specifies two things:</p>
<ol>
@ -245,147 +245,7 @@ Initiator Responder
]]></example>
<p>Now the parties exchange the file using SOCKS5 Bytestreams.</p>
<p>Once the transfer is completed, either party can terminate the Jingle session.</p>
<p>More detailed scenarios follow.</p>
</section1>
<section1 topic='Scenarios' anchor='scenarios'>
<section2 topic='Fallback' anchor='fallback'>
<p>Currently, <cite>XEP-0096</cite> does not enable the parties to fall back to a second method (e.g., In-Band Bytestreams) if the first method tried (e.g., SOCKS5 Bytestreams) does not work. This problem is addressed by Jingle. Such a fallback scenario is especially helpful when re-using the existing SOCKS5 Bytestreams method, since if a SOCKS5 relay is not available then the S5B method does not necessarily result in NAT or firewall traversal and therefore can result in a failed attempt at setting up the initial transport. However, because In-Band Bytestreams almost always succeeds (except if the parties violate rate-limiting policies at their servers), it provides a reliable transfer method of last resort. To provide seamless fallback, the initiator or responder can counter-propose IBB if S5B setup fails.</p>
<p>The session flow is as follows.</p>
<code><![CDATA[
Initiator Responder
| |
| session-initiate (S5B) |
|---------------------------->|
| ack |
|<----------------------------|
| [ SOCKS5 failure! ] |
|x---------------------------x|
| transport-replace (IBB) |
|---------------------------->|
| ack |
|<----------------------------|
| session-accept |
|<----------------------------|
| ack |
|---------------------------->|
| [ file transfer via IBB] |
|============================>|
| terminate |
|<----------------------------|
| ack |
|---------------------------->|
| |
]]></code>
<p>The protocol flow is as follows.</p>
<p>First the initiator sends a Jingle session-initiate, in this case with a transport of SOCKS5 Bytestreams.</p>
<example caption="Initiator sends session-initiate"><![CDATA[
<iq from='romeo@montague.lit/orchard'
id='jingle1'
to='juliet@capulet.lit/balcony'
type='set'>
<jingle xmlns='urn:xmpp:jingle:0'
action='session-initiate'
initiator='romeo@montague.lit/orchard'
sid='851ba2'>
<content creator='initiator' name='a-file-offer'>
<description xmlns='urn:xmpp:jingle:apps:file-transfer:1'>
<offer>
<file xmlns='http://jabber.org/protocol/si/profile/file-transfer'
name='test.txt'
size='1022'
hash='552da749930852c69ae5d2141d3766b1'
date='1969-07-21T02:56:15Z'>
<desc>This is a test. If this were a real file...</desc>
</file>
</offer>
</description>
<transport xmlns='urn:xmpp:jingle:transports:s5b:0'
sid='vj3hs98y'
mode='tcp'>
<streamhost
jid='romeo@montague.lit/orchard'
host='192.168.4.1'
port='5086'/>
<streamhost
jid='streamer.shakespeare.lit'
host='24.24.24.1'
zeroconf='_jabber.bytestreams'/>
</transport>
</content>
</jingle>
</iq>
]]></example>
<p>The responder immediately acknowledges receipt of the session-initiate.</p>
<example caption="Responder acknowledges session-initiate"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='jingle1'
to='romeo@montague.lit/orchard'
type='result'/>
]]></example>
<p>The initiator then attempts to initiate a SOCKS5 Bytestream with the responder as defined in xep-jingle-s5b and XEP-0065. Here we assume that the responder tries but is unable to connect to any of the StreamHosts. However, all is not lost, because the parties can attempt to fall back to In-Band Bytestreams. Therefore the initiator sends a transport-replace action including a transport of IBB.</p>
<example caption="Initiator replaces transport with IBB"><![CDATA[
<iq from='romeo@montague.lit/orchard'
id='hs92n57'
to='juliet@capulet.lit/balcony'
type='set'>
<jingle xmlns='urn:xmpp:jingle:0'
action='transport-replace'
initiator='romeo@montague.lit/orchard'
sid='851ba2'>
<content creator='initiator' name='a-file-offer'>
<transport xmlns='urn:xmpp:jingle:transports:ibb:0'
block-size='4096'
sid='ch3d9s71'/>
</content>
</jingle>
</iq>
]]></example>
<p>The responder then acknowledges the transport-replace action.</p>
<example caption="Responder acknowledges transport-replace"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='hs92n57'
to='romeo@montague.lit/orchard'
type='result'/>
]]></example>
<p>If the transport replacement is acceptable, the responder then sends a session-accept action to the initiator (if not, the responder sends a transport-reject action).</p>
<example caption="Responder sends session-accept"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='is71ns63'
to='romeo@montague.lit/orchard'
type='set'>
<jingle xmlns='urn:xmpp:jingle:0'
action='session-accept'
initiator='romeo@montague.lit/orchard'
sid='851ba2'>
<content creator='initiator' name='a-file-offer'>
<description xmlns='urn:xmpp:jingle:apps:file-transfer:1'>
<offer>
<file xmlns='http://jabber.org/protocol/si/profile/file-transfer'
name='test.txt'
size='1022'
hash='552da749930852c69ae5d2141d3766b1'
date='1969-07-21T02:56:15Z'>
<desc>This is a test. If this were a real file...</desc>
</file>
</offer>
</description>
<transport xmlns='urn:xmpp:jingle:transports:ibb:0'
block-size='4096'
sid='ch3d9s71'/>
</content>
</jingle>
</iq>
]]></example>
<p>The initiator acknowledges the Jingle session-accept action.</p>
<example caption="Initiator acknowledges session-accept"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='is71ns63'
to='romeo@montague.lit/orchard'
type='result'/>
]]></example>
<p>Now the initiator sends the file using In-Band Bytestreams as defined in xep-jingle-ibb and <cite>XEP-0047</cite>.</p>
</section2>
<p>For a description of the transport fallback scenario (from SOCK5 Bytestreams to In-Band Bytestreams), refer to <cite>XEP-0260</cite>.</p>
</section1>
<section1 topic='Implementation Notes' anchor='impl'>