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.

Sunday, December 11, 2011

The Next Step

The next step is to modify NXB to send the appropriate packets to open, close , send data, and notify the other side of errors.  This means getting into the NXB code and trying to find the place where it opens a new connection and sends data to that connection.  Furthermore, NXB will now need to keep track of connection numbers, something it does not need to do with the way that it currently operates.

The session ID that is used for communications with the client should work nicely as a megaphone session ID so I will probably use that.

Of the messages in the protocol:

  • Opening a session is something NXB already has to do and should be apparent.
  • Closing a session is trickier since the server can initiate a close as well as the client.
  • Sending data should be apparent since that is the heart of NXB.
  • Error packets will initially be simple since either side just reports then and then ignores them. 

Changes will also need to be made to the relay client to:

  • Report on the different packet types
  • Unwrap the content of each packet as appropriate
  • Forward the packet onto the server.
Another thing to work on in parallel is to figure out how to get Pidgin to work with NXB, since it would be nice to have that as a means to test the system.

No comments:

Post a Comment