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.

Friday, March 30, 2012

This Really Should be Easier

Previously...
  • I got a simple pass-through to work.
  • I made progress with a simple BOSH pass-through.
  • I got Pidgin to work with the pass-through.

I decided to try and extend the pass-through to be more complex, rather than trying to make the multi-client version work more like the single client version.  This was partially because the multi-client version currently uses raw TCP instead of making use of the node HTTP server, but also because I like the idea of having something that works that I can come back to at each step.

At this point, I'm trying to modify the ejabberd module and the nodejs program to use connection IDs and content lengths.  One additional change that I made was to do away with fixed fixed headers in favor of a variable length header.  

The new header looks like this:

    <connection ID>|<content length>|<content>

The basic differences from the old style headers is that 1) the connection ID and length fields are not zero-padded, and 2) the length field is now the content length field: it contains the character count of the content field instead of the length of the entire message.

Next time: connection IDs and content length fields.

No comments:

Post a Comment