[jdev] Jabber-RPC versus iq/query?

Christopher Zorn zorncj at musc.edu
Thu Mar 4 09:03:50 CST 2004

On Thu, Mar 04, 2004 at 09:19:55AM -0500, Jason McIntosh wrote:
> I have a question of Jabber programming style. The Jabber-based project 
> I'm currently working on (http://volity.org) defines a handful of 
> different Jabber-RPC requests that its clients and servers (all of whom 
> are simply users, from Jabber's POV) can pass around, forming a 
> higher-level protocol that rides atop Jabber/XMPP.
> However, since learning more about the core Jabber protocol (I admit 
> that I started by learning the current MUC and disco JEPs in detail, 
> and then worked my way inwards thereafter), I'm starting to wonder if 
> some or perhaps all of these RPC requests should instead happen through 
> the standard iq/query elements, using namespaces unique to our project. 
> Many of these project-specific functions are literally information 
> queries, while others request that the receiving entity attempt to 
> perform some action on its end. My gut reaction would be to assign the 
> latter sorts of activities to RPC, but I do notice that Jabber has 
> things like in-band registration happen through iq elements as well.
> So I could do continue doing everything specific to our project via 
> RPC, and everything would more or less work fine, but I have to wonder 
> if it's "more correct" and perhaps even practically better to use query 
> elements with proper namespaces when possible (in which case I may end 
> up dropping RPC altogether). Is there a general style guideline for 
> when an application using Jabber/XMPP as its transport should favor 
> Jabber-RPC over <iq><query xmlns="http://my.namespace.com/foo"/></iq> 
> elements, or vice-versa?

I have had similar questions but never really asked anyone. 

Anyway, I have a project that we started off defining our own namespace and
then decided to switch to RPC. That decision was made because it was
something that was supported by jabber with a JEP and it would be easy 
to do some sort of http xmlrpc to jabber xmlrpc if needed. 

I am wondering what others think about this too. Should someone just use 
xmlrpc to do remote procedure calls or make up there own namespace? 

> --
>   Jason McIntosh             jmac at jmac.org
> Somerville, MA, USA       http://www.jmac.org
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> https://jabberstudio.org/mailman/listinfo/jdev

More information about the JDev mailing list