[JDEV] Transports new approach

Dennis Noordsij dennis.noordsij at wiral.com
Tue Dec 12 12:32:37 CST 2000


Schuyler you rock :-)

Yes, this works really well, now I don't have to restart the main jabber 
server either when I am developing the module! This is very good.

The tricky bit in this config is to set the <host> to "myinstance" in 
jabber.xml, tricky tricky.

Once again thanks so much for your time,
Dennis
 

> Hello,
>
> Yes this is possible but a little tricky to configure.
> In your main config file put something like this:
>
>  <service id="mylinker">
>     <host>myinstance</host>
>     <accept>
>       <ip>127.0.0.1</ip>
>       <port>7001</port>
>       <secret>test</secret>
>     </accept>
>   </service>
>
> Then in another file:
>
> <jabber>
>
>   <service id="mylinker">
>     <host/>
>     <connect>
>       <ip>127.0.0.1</ip>
>       <port>7001</port>
>       <secret>test</secret>
>     </connect>
>   </service>
>
>   <service id="myinstance">
>     <load><runcomponent>./src/component.so</runcomponent></load>
>   </service>
>
> </jabber>
>
> Schuyler
>
> On Tue, Dec 12, 2000 at 06:35:24PM +0200, Dennis Noordsij wrote:
> > Hi,
> >
> > This is partly in reply to Keith's description of the new (MIO) way of
> > doing instances and transports.
> >
> > What I want to do:
> > I have a normal plain old jabber 1.2 server, working just fine. I have
> > added a <service> section to handle certain types of messages sent to it
> > and used a Perl script as that service, worked fine. (the messages got
> > sent via tcp/to perl, perl replied with xml, all was good).
> >
> > Now I want to convert the Perl version to a C version. I would like to
> > make use of course of the jabber code for xml building and session
> > handling etc.
> >
> > >From the information in the example-transport code it appears to be
> > > quite
> >
> > easy to write the service I have in mind.
> >
> > However, I do not want this service to be run on the same machine as my
> > "main" jabber, because that one is busy enough as it is. Instead I would
> > like it to connect to it via TCP/IP from another machine.
> >
> > My uneducated guess was that the 2 jabberd programs, the main one and the
> > one using my loadable module would connect and all would be good. It's a
> > little trickier though :-)
> >
> > I have the exact same <service> announcement in the main jabber.xml file.
> >
> > Now I need to create the anotherjabber.xml file, which has a <connect>
> > part to connect to the main jabber and to register itself there (say for
> > example its name should be "myinstance" and any messages sent to
> > "[anyone@]myinstance" should be routed to it.
> >
> > If I use a very simple anotherjabber.xml file, a la:
> >
> > <service id="myinstance">
> >  <host/>
> >  <connect>
> >     ....
> >  </connect>
> >  <load><runcomponent>./src/component.so</runcomponent></load>
> > </service>
> >
> > then it appears to connect to the main jabber nicely, but as soon as I
> > send a message to "myinstance" the 2 jabbers start sending the message to
> > each other as fast as they can. Note it doesn't bounce, but the second
> > jabber simply sends it back to the first one, and the first one routes it
> > back to the second one.
> >
> > I have played with different configuration options, adding some modules
> > to the second jabber, etc, but what I am trying to do should be quite
> > simple.
> >
> > An example .xml file for the "myinstance" jabber to accomplish what I am
> > trying to do would be very very much appreciated!
> >
> > Kind regards,
> > Dennis
> >
> > _______________________________________________
> > jdev mailing list
> > jdev at jabber.org
> > http://mailman.jabber.org/listinfo/jdev
>
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev




More information about the JDev mailing list