[ejabberd] Clustering, relational db and erlang-external-language interfacing

David Chan chan_hok_ching at yahoo.com
Wed Nov 9 12:18:31 MSK 2011


The kind of hook is like I would like to do something
on each message being sent/received. So, it's the module
"mod_service_log" that supports it?

I understand that it is not possible to write a hook
in e.g. pure Java, but I think it is possible that
I can write a thin "layer" as an erlang component,
and on an event being fired, it will call e.g. Java code
via some sort of external language interface.

1) If it is possible, I would like to know that,
if the external language is not as fast as erlang,
how the former degrade the optimum performance
of the out-of-the-box ejabberd?

2) Is there a module which can save the chat history
of the clients?


>
> 1. Ejabberd allows MySQL to be used for what I'd call "persistent" data
> elements: usernames and passwords, vcard, roster and offline messages.
> There are a few other things, but all in that same category. Ejabberd
> clustering still depends on Mnesia.
>
> 2. It depends what you want to do. Ejabberd supports external components
> using the "ejabberd_service" option, and external components can be written
> in whatever language you want, but you are limited to the XMPP protocol and
> ejabberd's existing modules that provide hooks for such components, for
> example mod_service_log. You can't simply write ejabberd hooks in Java.
>
> There are general-purpose tools for integrating Erlang and Java. I
> personally haven't used them, but I believe others on this list have.
> Again, though, the issue you'll find is that ejabberd has no built-in hooks
> for using such interfaces, so you'd still have to write one in Erlang.
>
> dan
>
>



More information about the ejabberd mailing list