[JDEV] Re:Creating a presence server component?
Sylvain Roberdeau
sylvain.roberdeau at terravirtual.net
Sat Aug 17 04:19:11 CDT 2002
Hi Philippe,
I'm interested in your raw code.
If it's too large send it me directly, but it will be more usefull to post
it it this newsgrourp.
Actually, I'm testing a JSM module to send specific message to a dedicated
Perl service. The objective is to detect correctly user's presence and status
and to avoid to send unusefull messages (ex. presence send to roster, iq for
JUD,...).
But an example in Java can direct to a good start.
Sylvain
Philippe Raxhon a écrit :
> Me again,
>
> I should have been more patient. It indeed works, the change to do in
> the mod_log module is quite simple, but I'm now wondering what could be
> the effect on the overall performances of the server.
>
> BTW, I have finally found a modified version of jabberbeans that makes
> the coding of an accept component possible. It's dirty and raw but at
> least one can have a working accept component based on jabberbeans.
> Should I post the code here?
>
> Philippe
>
> Philippe Raxhon wrote:
>
> > I now remember another solution. In the jsm section of jabber.xml, one
> > can add:
> > <archive>
> > <service>myservice.myhost</service>
> > <archive>
> >
> > given you have defined such a service in the service section of
> > jabber.xml, for instance:
> > <service id ="myservice">
> > <host>myservice.myhost>
> > <accept>
> > <ip>localhost</ip>
> > <port>5999</port>
> > <secret>secret</secret>
> > </accept>
> > </service>
> >
> > The accept component (it can be writen in any language and doesn't
> > have to run on the same host) will receive a copy of every message
> > sent by the users. The interesting part is that I think it's easy to
> > hack the mod_log module to "archive" not only the messages, but also
> > the presence or iq.
> >
> > Please, correct me if I'm wrong.
> >
> > Jean-Louis Seguineau /EXC/TEC wrote:
> >
> >> Hey,
> >>
> >> That's easy ! And it has nothing to do with whatever language you
> >> use. It
> >> does it requires to write a JSM module as long as your component is only
> >> meant to process the received packets and not interfere with the JSM
> >> processing. This can be applied to build a kind of packet "sniffer" and
> >> allow you to count, record, monitor, etc...
> >>
> >> You just need to declare a service in your jabber.xml so to receive a
> >> copy
> >> of all packets going through the server.
> >>
> >> <service id="sniffer.myserver">
> >> <host>myserver</host>
> >> <host>myjpolld.myserver</host>
> >> <host>sniffer.myserver</host>
> >> ....
> >> plus any aother internal JID that you want to monitor
> >>
> >>
> >> <accept>
> >> <ip/>
> >> <port>myport</port>
> >> <secret>secret</secret>
> >> </accept>
> >> </service>
> >>
> >> Then the sniffer component will receive a copy of all traffic for the
> >> <host>s. The component can sit on another server as any component can.
> >>
> >> There is no way that I jnow of to separate the packets types before
> >> they are
> >> sent to the component. But you can either make one component per
> >> packet type
> >> and filter the input, or make a filter component that in turn direct the
> >> right packet type to a specific processor component.
> >>
> >> Hope it helps
> >>
> >> Jean-Louis
> >>
> >>
> >> ----- Original Message -----
> >>
> >>
> >>> Message: 3
> >>> Date: Sun, 11 Aug 2002 12:48:49 +0200
> >>> From: "Sylvain Roberdeau" <sylvain.roberdeau at terravirtual.net>
> >>> Organization: Terra Virtual
> >>> To: jdev at jabber.org
> >>> Subject: Re: [JDEV] Creating a presence server component?
> >>> Reply-To: jdev at jabber.org
> >>>
> >>> Hi,
> >>>
> >>> sorry if I was not clear :)
> >>> I hope to create an "element" for Jabber server which can intercept
> >>> <presence>, <message> and <iq> and apply some specific process. For
> >>>
> >>
> >> example, log
> >>
> >>
> >>> all data with a specific structure, file repartition, SNMP messages,
> >>>
> >>
> >> MRTG...
> >>
> >>
> >>> I haven't a good grip on C to build all with this language and I
> >>> want
> >>>
> >>
> >> to
> >>
> >>
> >>> split process in a separate Jabberd (to avoid overload)
> >>> The only way if find it's to build a JSM Module which send specific
> >>>
> >>
> >> message
> >>
> >>
> >>> to a service (write in Java, Perl, Python,...)
> >>> Jabberd ->JSM module -> Service
> >>> The constraint is to create a specific message structure between JSM
> >>>
> >>
> >> Module
> >>
> >>
> >>> and Service (maybe with <x> namespace).
> >>>
> >>> I was looking for an other way : build a specific service which can
> >>>
> >>
> >> receive
> >>
> >>
> >>> all blocks in a separate server. I don't kown if it's possible and I
> >>> guess
> >>>
> >>
> >> there
> >>
> >>
> >>> are some limitations (presence = avalaible or unavalaible, none
> >>> other by
> >>> example).
> >>>
> >>> If somebody knows an other solution than the first...
> >>>
> >>> Sylvain
> >>>
> >>>
> >>
> >>
> >>
> >>
> >> _______________________________________________
> >> 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
> >
>
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sylvain.roberdeau.vcf
Type: text/x-vcard
Size: 466 bytes
Desc: Carte pour Roberdeau Sylvain
URL: <https://www.jabber.org/jdev/attachments/20020817/59b9507e/attachment-0002.vcf>
More information about the JDev
mailing list