[JDEV] IQ queries sent to client vs. handled by server?

Thomas Charron tcharron at ductape.net
Thu Aug 2 09:02:14 CDT 2001


Quoting Jens Alfke <jens at mac.com>:
> On Wednesday, August 1, 2001, at 07:56 PM, Thomas Charron wrote:
> >   DoH!  I stand corrected.  The server has this currently implemented
> 
> > as a
> > server module ALREADY as mod_xml.  The applicable cose is located at
> > http://download.jabber.org/cvs/jabber2/jsm/modules/mod_xml.c
> I skimmed through the code; I'm totally unfamiliar with the server 
> implementation but I got the gist of it. It definitely seems that the 
> mod_xml_get function, which handles the "get" requests, intercepts ALL
> non-"jabber:" namespaces and ALWAYS returns the stored XML (or an empty
> result if nothing is stored). In other words, live client-to-client 
> "get" requests are effectively impossible, since the server will eat 
> them all. The only way around this is to make up a new namespace in the
> "jabber:" domain, which is of course a Bad Idea.

  Why is this a bad idea?  Use jabbaer:x:*, which is meant for extentions.

  I agree in at least one point, though.  There should be a jabber:iq:storage 
or simular namespace, and NOT a module that snarfs up everything it darned well 
pleases..

> So isn't this kind of a monkey wrench in the whole Jabber extensibility
> story? The functionality of IQ queries has been greatly reduced by 
> this -- now, to define a new query type you have to hack the server to
> get around mod_xml, otherwise the clients won't be able to talk to each
> other.

  Naw, just puts a predifined limitation on the use of xmlns within iq packets, 
and keeps developers within the jabber:* domain for iq messages.  Not sure if 
that was the intent or not..

> mod_xml looks like a really poorly thought-out idea. It would have been
> great had it reserved some particular namespace and only handled queries
> in children of that, but by eating the entire namespace universe apart
> from "jabber:", it leaves no room for anything else.

  I think it was a down and dirty quick and easy way to identify xml set/get 
that could be stored and processed by the server.

> (Or have I managed to completely misunderstand those few pages of C 
> code?)

  Nope, that small peice of code is what does it.  I hadn't remembered it was 
in there.  8-P  Basically, use jabber:x:jens:extention for now.  8-P

  And don't sound so darned negative about everything, it'll give ya 
wrinkles..  8-)

--- 
Thomas Charron
<< Wanted: One decent sig >>
<< Preferably litle used  >>



More information about the JDev mailing list