[Standards-JIG] Failover to Alternate Stream Method for File Transfer

Alex Wenckus alex at jivesoftware.com
Fri Feb 3 23:17:34 UTC 2006


Hey Guys:

 

JEP-0096 discusses using IBB as a "fall-back mechanism", yet there is no
provision in the JEP to account for this. We have thought of two
possible ways to implement it, one is through discussions here at Jive
Software and the other is through an offline discussion I had with
Justin Karneges several months ago when I posted a similar question to
this list.

 

The first solution was this, in the file transfer part of the JEP
instead of responding with only a single option, like so:

 

<iq type='result' to='sender at jabber.org/resource' id='offer1'>

  <si xmlns='http://jabber.org/protocol/si'>

    <feature xmlns='http://jabber.org/protocol/feature-neg'>

      <x xmlns='jabber:x:data' type='submit'>

        <field var='stream-method'>

          <value>http://jabber.org/protocol/bytestreams</value>

        </field>

      </x>

    </feature>

  </si>

</iq>

 

The transfer target responds with several methods:

 

<iq type='result' to='sender at jabber.org/resource' id='offer1'>

  <si xmlns='http://jabber.org/protocol/si'>

    <feature xmlns='http://jabber.org/protocol/feature-neg'>

      <x xmlns='jabber:x:data' type='submit'>

        <field var='stream-method'>

          <value>http://jabber.org/protocol/bytestreams</value>

         <value>http://jabber.org/protocol/ibb</value>

        </field>

      </x>

    </feature>

  </si>

</iq>

 

The initiator will then know if bytestreams fails, they can then fail
over to ibb. This would be accomplished merely by after bytestreams
fails, initiating ibb with the same sid.

 

The other possible solution that we had determined was to include in the
initial packet an element, for these purposed we will call it <retry/>

 

<iq type='set' id='offer1' to='receiver at jabber.org/resource'>

  <si xmlns='http://jabber.org/protocol/si' 

      id='a0'

      mime-type='text/plain'

      profile='http://jabber.org/protocol/si/profile/file-transfer'>

    <file xmlns='http://jabber.org/protocol/si/profile/file-transfer'

          name='test.txt'

          size='1022'/>

    <feature xmlns='http://jabber.org/protocol/feature-neg'>

      <x xmlns='jabber:x:data' type='form'>

        <field var='stream-method' type='list-single'>

 
<option><value>http://jabber.org/protocol/bytestreams</value></option>

          <option><value>http://jabber.org/protocol/ibb</value></option>

        </field>

      </x>

    </feature>

    <retry/>

  </si>

</iq>

 

In this case, if the initiation with bytestream fails... the target will
forward an iq-set-retry packet to the initiator with the stream-method
they would like to proceed with and the stream-negotiation process is
restarted for that particular file.

 

I was hoping to get any feedback from the list into these two particular
methods, to hopefully, in the end updating the JEP appropriately so that
file transfer can be a little more fault tolerant.

 

Thanks,

Alex

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.jabber.org/pipermail/standards/attachments/20060203/fc19aa5f/attachment.html>


More information about the Standards mailing list