[Standards-JIG] Re: [jdev] XMPP Ping method?
Alexander Gnauck
gnauck at ag-software.de
Wed Nov 1 14:17:57 CST 2006
Peter Saint-Andre wrote:
> 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?
+1, i wouldn't add a new top level element for pings. And XMPP was not
designed as a low bandwidth protocol. With enabled stream compression or
TLS compression the overhead is negligible.
Alex
More information about the Standards-JIG
mailing list