[JDEV] Interesting "service" vs "xdb" vs "agent" thing

David Waite dwaite at jabber.com
Tue Jan 9 16:49:58 CST 2001


Yeah, the difficulty is that xdb and 'default' routing are two separate 
delivery trees  (so is log). This allows you to define not only a 
service running for example the Yahoo-transport as yahoo.jabber.com, but 
also define an XDB component to handle all of its preference data. You 
could also do something like define jabber:iq:auth to be serviced by a 
different component (say, LDAP).

It would definately be nice to have the same component subscribe to 
multiple delivery trees, but I'm unsure if the current jabber.xml can 
handle the registration.

-David Waite

Dennis Noordsij wrote:

> On Tuesday 09 January 2001 22:51, you wrote:
> 
>> Depends on how attached you are to XDB packets, and
>> if you can build your handler to accept other
>> types of packets. Put simply, the way a
>> base_accept service functions is the exact same
>> way that a base_accept xdb functions. Meaning,
>> set it up as a service (just change your xdb tags to
>> service), and direct your user directory requests to it.
>> 
>> Basically, build a second handler to handle iq's or
>> whatever type of request and have it talk
>> to the db... You're not bound to using XDB packets
>> for messages that simply QUERY a database, so set
>> up a similar handler that will accept <iq> requests.
>> 
>> Matthew D. Diez
> 
> 
> 
> So basically duplicate all the code into a new handler? I don't want to 
> divide the system into one program handling xdb requests and one handling 
> search requests. The handler pools a bunch of threads with connections to the 
> database, I would like the pools and connections to handle both xdb and 
> search. (ie more effective pool)
> 
> Yes, I can add a service section, and run the exact same program twice. Or I 
> can add a new send/receive thread in the program that connects to jabber 
> again on a different port for the search requests and still distribute them 
> among the same threads. 
> 
> Probably best way to do it. 
> 
> 2 incoming sockets (to jabber), all xml goes onto the same stack.
> 
> Threads grab them, process them, they know about both <iq> and <xdb>, then 
> put them on an outgoing queue.
> 
> Outgoing queue handler knows that <iq> replies to go socket A and <xdb> 
> replies to go socket B. 
> 
> But it would be nicer if I could add 
> <agent id="name_of_xdb_component">
>  <search/>
>   <etc../>
> </agent>
>  
> and have <iq> packets go to the name_of_xdb_component :-)
> 
> 
> Regards,
> Dennis
> 
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev







More information about the JDev mailing list