DJabberd---Web-Browser Based Chat Room

Daniel Ruoso daniel at ruoso.com
Tue May 6 12:28:54 UTC 2008


Ter, 2008-05-06 às 11:20 +0530, catch me if you can escreveu:
> I have Installed DJabberd Server on a Linux box. It's working
> properly. Now I have to create a "Web-Browser Based Chat Room". So can
> anyone tell me how should I proceed?

You have, at first, to configure DJabberd to have a chat room (I'm not
experienced in this).

But I'm working on a similar application at this moment, the thing I'm
doing is creating two Catalyst Applications, one using
Catalyst::Engine::XMPP2 fired by an nph cgi script, and other as a
standard mod_perl application.

The nph cgi will create a new connection and authenticate the user on
the jabber server, setting a session variable with the user jid. This
application will be the one rendering the chat window.

The other application will have a Net::XMPP2::Connection for each httpd
instance (using the apache2-mpm-prefork is required because of that),
and will send the message "to" the user, which will then send the
message to the chat room using its "from" address.

So you have:

              ChatRoom <----
        ----> DJabberd --- |
        |                | |
        |                V |
   CallbackApp        ChatApp (NPH)
       ^                 |
       |                 |
       |----- User <-----|

It has been working for me, not only for chat, but also for a Web
application that is connected to a set of SOAP services available in
this same jabber server.

daniel 



More information about the Djabberd mailing list