What is Megaphone?

What is Megaphone?
The Megaphone project is about enhancing open source chat software. Specifically, the goal is to allow ejabberd to support 1,000,000 simultaneous users. See The Plan page for more details on how I plan to solve this problem. See the About this Blog page for more details on why I created this blog.

Wednesday, January 11, 2012

Much Better

Previously...
  • I discovered that gen_tcp could partially parse HTTP.
  • I ran into the weird mod_adhoc problem again.
  • I discovered that there were version problems with ejabberd and erlang
Today I tried downloading ejabberd 2.1.10 and rebuilding and reinstalling.  That went fine and I tried connecting with Pidgin.  That worked (over BOSH no less), so I tried copying over the megaphone stuff.  

For reference, I had to make the following changes in order to get the build to include megaphone:
  • Run configure
  • Change the resulting Makefile
    • Add megaphone to the list of sub-directories to build
  • Run make
  • Run sudo make install
  • Change the ejabberd.cfg file
    • Add megaphone to the listeners
    • Add megaphone to the modules
Change the Makefile/Add megaphone to the list of sub-directories to build
This consisted of finding the following line in the Makefile:

SUBDIRS = mod_irc mod_pubsub mod_muc mod_proxy65 eldap  web stringprep stun tls  ejabberd_zlib

And adding "megaphone" to the list.  Note that I had a makefile in the megaphone directory that I copied from the ejabberd web directory.

Change the ejabberd.cfg file/Add megaphone to the listeners
In the section that looks like this:

%%%.   ===============
%%%'   LISTENING PORTS

%%
%% listen: The ports ejabberd will listen on, which service each is handled
%% by and what options to start it with.
%%
{listen,
 [

I added the line 

  {6280, megaphone, []}

To the end of the list.

Change the ejabberd.cfg file/Add megaphone to the modules
In the section that starts with this:

%%%.   =======
%%%'   MODULES

%%
%% Modules enabled in all ejabberd virtual hosts.
%%
{modules,
 [

I added the line

  {mod_megaphone, []}

To the end of the list.

Then I just used ejabberdctl start to start up ejabberd.

And everything worked.

Well, actually it didn't.

But at least ejabberd started up and didn't complain about mod_adhoc or that megaphone was a "bad file" because it was using opcodes for a different version.

Next step is to continue debugging the megaphone module, now that ejabberd is up and running again.


No comments:

Post a Comment