Messaging


I’d like to share a word on communication. We’ve decided to start with Jabber (www.jabber.org) as the communication layer between the various components. Jabber is great because it can be as simple as you want while allowing for practically limitless expansion. Given the open nature of Jabber, for example, we could write our own server components that ‘plug in’ to the jabber server and perform additional tasks on messages besides simply routing them through the messaging network.

As of yet, we have not leveraged the full power of the Jabber (XMPP) protocol nor the extensibility of the Jabberd server (the open source Jabber server implementation developed by the folks at jabber.org) and chances are we won’t have to. Currently we are using it for the most basic message passing: component X wishes to send a message to component Y. Jabber is strikingly similar to email. A user logs in with an ‘address’ and, once logged in, the user can send messages to any other user they wish. Also, the servers are fault tolerant, taking into account possible network delays, etc. The main difference between the two is speed. A jabber server can process many message per second whereas a mail server is typically not prioritized in this manner. Jabber is designed from the start to be a fast, real-time messaging protocol.

Having said all of this, we have left the system as ‘generic’ as possible to allow for different communication layers to be plugged in should we or anyone decide to do so. If we later find that another mode of communication is faster or more powerful than jabber, for example, then it should take very little work to detach jabber and plug in the new system. (disclaimer: so far jabbber is fast, easy to use, and provides encryption, so we’ve had no reason to doubt it. It’s just better to be as generic as possible because anyone else who may wish to use this software in the future may have other goals in mind…)

We’ve also constructed a messaging layer of our own which dictates how the different software components determine the content and meaning of the various messages that are passed around. Our protocol is composed of, you guessed it, more XML. To continue with are desire for simplicity, the message design consists of only a handful of message types and takes some of its inspiration from TCP and HTTP. These are the messages that will be passed around within the jabber messages.

So in the end, what you will have is a Jabber message which contains one or more ‘component’ messages. When received, these component messages are taken out of the jabber message and passed off to the various software components for processing.

-bill