[Standards-JIG] Re: [jdev] XMPP Ping method?
Peter Saint-Andre
stpeter at jabber.org
Wed Nov 1 13:31:06 CST 2006
Chris Mullins wrote:
> That's quite a bit more complicated that I envisioned.
>
> I was just thinking "IQ:Ping", and leave it there. For all of the use
> cases I've come across, this would be sufficient.
Probably it would be good to break the ping stuff out into a separate
namespace and/or spec.
Do we need this to check a single stream only, or also to check the
end-to-end connection?
If the former then Justin's top-level <ping/> and <pong/> elements would
probably be acceptable (but see below).
If the latter then we need to use (addressable) IQs:
<iq from='romeo at montague.net/foo' to='juliet at capulet.com/bar'
type='set' id='ping123'>
<ping xmlns='urn:xmpp:ping'/>
</iq>
<iq from='juliet at capulet.com/bar' to='romeo at montague.net/foo'
type='result' id='ping123'/>
In general I prefer the IQ semantics vs. a top-level element, since XMPP
is set up for such extended namespaces. So we could just as well send
this over a stream:
<iq type='set' id='ping234'>
<ping xmlns='urn:xmpp:ping'/>
</iq>
<iq type='result' id='ping234'/>
That's not much bigger than the top-level elements:
<ping xmlns='urn:xmpp:ping'/>
<pong xmlns='urn:xmpp:ping'/>
And if the other side doesn't support the ping namespace it would return
an error (which accomplishes the same purpose):
<iq type='error' id='ping234'>
<ping xmlns='urn:xmpp:ping'/>
<error type='cancel'>
<service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
</iq>
IMHO we don't need stream feature negotiation to do pings, but we do
need that for per-stanza acks (which are heavier).
Thoughts?
Peter
--
Peter Saint-Andre
Jabber Software Foundation
http://www.jabber.org/people/stpeter.shtml
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 7358 bytes
Desc: S/MIME Cryptographic Signature
Url : http://mail.jabber.org/pipermail/standards/attachments/20061101/ac597018/smime.bin
More information about the Standards-JIG
mailing list