[standards-jig] Stream Contexts

Justin Karneges justin-jdev at affinix.com
Wed Jun 25 11:42:24 UTC 2003


Hi all,

I had a brainstorm last night (morning?) and I have concluded that one 
annoying problem with this stream negotiation stuff is that we don't have a 
clear way of passing context.

Context is required to use a stream (S5B,IBB,anything else that arises).  
There is never a time when you would not have context.  Maybe you don't want 
SI or REL, but you will surely want context.  It's the one thing we should 
all be able to agree on.

I can see two possible ways to pass context to a stream:

1) Pass it inside of the datastream itself.
 or
2) Pass it via the XML handshake of the stream.

#1 is like TCP.  Think of HTTP GET.  However, since Jabber streams have much 
fancier handshakes, we can easily accommodate context inside of the XML 
exchange, so I'd prefer #2.  Unfortunately, without a standard provision for 
this, the only acceptable way to pass context with S5B/IBB currently is via 
the datastream.

I propose to author a JEP to describe stream context.  It will be the world's 
simplest JEP, with the following requirements:

* Contexts are simply opaque strings
* Contexts must be unique for all streams
* Streams must have a provision for passing along the context

Example of S5B using a possible standard context:

  <iq 
      type='set' 
      from='initiator at host1/foo' 
      to='target at host2/bar' 
      id='initiate'>
    <query
      xmlns='http://www.jabber.org/protocol/bytestream'
      sid='mySID'
      xmlns:context='http://jabber.org/protocol/streamcontext'
      context:id='myCID'>
      <streamhost 
          jid='initiator at host1/foo' 
          host='192.168.4.1' 
          port='5086'/>
    </query>
  </iq>

Thoughts?

-Justin



More information about the Standards mailing list