[Social] R: <iq/> or <message/> on api-like functionality over XMPP

Peter Saint-Andre stpeter at stpeter.im
Fri Mar 28 12:52:08 CDT 2008

Generally, if you want acks, use IQ. If you just want to blast out some
information, use message. In your case, IQ seems more appropriate.

Roberto Ostinelli wrote:
> thank you anders,
> i wouldn't have even asked this question if i hadn't seen in the xep-0004
> protocol http://www.xmpp.org/extensions/xep-0004.html#protocol that:
> "The <x/> element qualified by the 'jabber:x:data' namespace SHOULD be
> included either directly as a first-level child of a <message/> stanza or as
> a second-level child of an <iq/> stanza (where the first-level child is an
> element qualified by a "wrapper" namespace); see also the restrictions
> enumerated below."
> seems logical to me to use an <iq/> stanza, however i thought i might have
> missed a point somewhere.. just wondering :)
> r.
> -----Messaggio originale-----
> Da: social-bounces at xmpp.org [mailto:social-bounces at xmpp.org] Per conto di
> anders conbere
> Inviato: venerdì 28 marzo 2008 18.24
> A: social at xmpp.org
> Oggetto: Re: [Social] <iq/> or <message/> on api-like functionality over
> I'm not an expert, but it seems to be based on the spec that as long as your
> queries to the client (C1) are implementing a get or a set then the probably
> belong in IQ stanzas.
> ~ Anders
> On Fri, Mar 28, 2008 at 10:08 AM, Roberto Ostinelli <roberto at ostinelli.net>
> wrote:
>> hi all,
>>  just curious about a 'best practice' on using xmpp as transport for data.
>>  not sure if this is the kind of discussions we can have here, if not, 
>> please  do ignore this post which will not be followed on.
>>  we are using an xmpp server S1 to handle all a-sync an sync 
>> communication  between two XMPP clients, C1 and C2.
>>  the flow is as follows: C1 sends data to C2 through S1, and C2 has to 
>> reply  to C1 wether the transmitted data is coherent with a series of 
>> computation  that can only be handled by C2.
>>  were this to be a client-server case, i would use a custom namespace 
>> on a  <iq/> stanza [for request-response functionality]. however, 
>> since the flow  of this communication is C1-S1-C2-S1-C1, would you 
>> recommend still using  <iq/> or a <message/> stanza instead?
>>  thank you.
>>  r.

Peter Saint-Andre

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 7338 bytes
Desc: S/MIME Cryptographic Signature
Url : http://mail.jabber.org/pipermail/social/attachments/20080328/16818edd/attachment-0001.bin 

More information about the social mailing list