Re: multiple JID
From: "Matthew Wild" <mwild1@xxxxxxxxx>
Date: Tue, 18 Sep 2007 12:36:23 +0200 (CEST)
On 9/18/07, Alban Taraire <alban.taraire@xxxxxxxxx> wrote:
>
>
> Hi all,
>
> I'm willing to try implementing a simple weather bot for Jabber. After
> browsing a while I saw another implementation that has one JID per area,
> in
> the form areaname@xxxxxxxxxxxxxxxxx
> This sounds OK for me but it seems that then, I need to have one instance
> of
> Client for each area. I want it to be city based, and I plan 200 to 300
> cities.


No, that areaname@ system was likely written as a component. A component has
access to all traffic going to/from its domain (usually a subdomain). So
there will be one instance of the component running, noting who has
subscribed to each JID. Then it simply sends notifications about an area to
people who subscribed to that area's JID.


> What efficient way would you think of doing that ? Instantiate 200+
> Client*
> sounds a bit harsh for me, but is there another solution ?


gloox can be used to write components:
http://camaya.net/api/gloox/index.html#comp_sec

Hope this helps,
Matthew.