Peter Saint-Andre wrote:
> Alban Crequy wrote:
>> However, if the 2 clients both implement XEP-030 Service Discovery and
>> XEP-0115 Entity Capabilities, they will both initiate a stream in order
>> to send a discovery request as soon as they appear online via DNS-SD,
>> without user intervention.
>
> Really? I thought we were advertising caps in DNS TXT. See the "ver"
> record here:
>
> http://xmpp.org/extensions/xep-0174.html#registrar-linklocal-reg
>
> So I think that opening a stream to everyone who appears online via
> DNS-SD is a bad idea.
>
> Thus I would say that if you know the "ver", you'll know what the other
> entity is. But if you don't know the "ver", don't automatically open a
> stream to the other entity just to do all the caps lookup magic via disco.

Thinking of my bot-to-bot communication scenario it may happen. I client
may want to know if another media server got online to present it in the
user interface. If the ver is not known, it has to open a stream to
discovery what the ver means.

>> Do we want this to happen? 
>
> No.
>
>> Sjoerd suggested on IRC to add random slack
>> time before initiating a stream to avoid it. >
>
> That is one possibility.

We have a solution for that in xtls, maybe we should copy it to XEP-0246
End-to-End XML Streams:

| It is possible that both parties may attempt to start the use of XTLS
| at the same time [13], in which case one party may receive an XTLS
| start stanza from the other party after it has sent such an XTLS start
| stanza but before receiving a response. In this case, one of the
| initiation requests shall be considered to have higher priority than
| the other, and the party that receives the lower priority initiation
| request shall return a <conflict/> stanza error in response to the
| lower priority request. The higher priority request MUST be considered
| the request that is generated by the party whose JID is sorted before
| the other party when the JIDs of both parties are sorted using
| "i;octet" collation as specified in Section 9.3 of RFC 4790 [14].


Dirk

-- 
Buy one for the price of two and get another one free!

Reply via email to