[ejabberd] ejabberd modules and otp

Badlop badlop at gmail.com
Tue May 27 20:51:38 MSD 2008


On Tue, May 27, 2008 at 2:17 PM, mark peleus <mark.peleus at gmail.com> wrote:
> I'm developing a module that will use modules from the erlang otp.
>
> Do I have to build and install ejabberd from source or
> is all the otp included with ejabberd binary installation?

Let's see:

This is 52.8 MB: otp_win32_R12B-2.exe
This is 8.7 MB: ejabberd-2.0.1_3-windows-installer.exe

Do you think the ejabberd binary installer is compiled with some
ultra-super compression method that compresses 52.8 into less than 9
MB? :)

Obviously, the ejabberd binary installer includes all the libraries
from OTP required by the program itself; but nothing more.

You may find contributed modules that are not included in ejabberd,
and require additional libraries from OTP or elsewhere. Those
libraries are not included in the ejabberd binary installer.

For example, mod_xmlrpc is a contributed module (written by me, BTW)
that allows external XML-RPC clients to query the ejabberd server and
perform several tasks. This module requires the OTP library Xmerl and
the 'independent' library XMLRPC-Erlang. The ejabberd binary installer
does not include any of those libraries, and I assume nobody expects
it to include them.


> How do I let my module know where to look for the modules in the otp?

You can tell the Erlang emulator where to find additional modules with
the option: -pa PATH


> Can I use ejabberd binary installer and install the otp separately and let
> them know about each other?

You could copy the beam files you need to the directory where ejabberd
(and OTP) is installed.

Another possibility is to simply install Erlang/OTP and compile
ejabberd from source code package.


More information about the ejabberd mailing list