[JDEV] <dynamic/> config tag (in search of portable C lib)
Jeremie
jeremie at jabber.org
Tue Jul 9 14:34:33 CDT 2002
I had to actually look at the source for this, it's been a while :)
The <dynamic/> feature is pretty simple, it allows you to configure a
service that points to a given folder, and then matches any user@ or
/resource to a file within that folder based on name. First it looks for
the name.so and then tries to load it like any other .so, and failing that
it checks to see if the file is executable, and if so runs it like an
<exec/> via stdin/stdout.
The config format looks specifically like:
<dynamic>
<folder>/path/to/folder</folder>
<match>user</match> (can be "resource" instead)
</dynamic>
What this gives you is a very simple way of testing bots or scripts,
almost like CGI, that can be enabled and changed without restarting the
server. A fun toy, maybe even useful somehow.
Jer
On Tue, 9 Jul 2002, DJ Adams wrote:
> On Tue, Jul 09, 2002 at 01:12:25PM +0200, Andreas Ames wrote:
> > Hi,
> >
> > while wading through the 1.4.2 sources to figure out how to use
> > libjabber (which is the only C lib for jabber I found that seems to be
> > complete and somewhat portable; any other recommendations are
> > welcome), I came across the <dynamic/> config tag in base_dynamic.c.
> > So far I have no clue how to use it and what it's for (I assume I can
> > influence the delivery process/message routing with dynamic handlers;
> > but I may be completely wrong). Unfortunately I'm very curious.
> > Neither google nor DJ Adams' book were my friends here. Can someone
> > help me out, please?
>
> Hi Andreas
>
> If I remember correctly, it's something that Jer put together during 1.4.1
> but remained experimental. (Programming Jabber was based more or less on
> 1.4.1 but as I had to prune the contents, experimental stuff was always
> first on the cuttingroom floor :-). It's basically a way of being able to
> plug handlers into a running jabberd. I think it's defined per-component,
> so you'd have something like:
>
> <service id='dynamicstuff'>
> <host>blah</host>
> <dynamic>
> definition of dynamic files here
> </dynamic>
> </service>
>
> The files (all in the same directory) are .so loadable, I think, and
> have to confirm to the jabberd API.
>
> HTH a bit
> dj
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev
>
More information about the JDev
mailing list