We'd like you to write a small inter-application messaging system. Any language you prefer, and any operating system is OK, although open-source languages/OSs are preferred. It can be P2P or use a centralized server. Send us the code plus a short description of why you made the choices you did in designing this.

Here are the specifications:

To give you a good idea of the size of this, we expect it will be 1-4 classes (if you use OOP), and about 75-300 lines of code, although under some circumstances it could be somewhat shorter or longer.

Why we chose this: We've written 3 or 4 of these for various purposes (one was for the new Dream Marriage chat system, and another was for P2P communication between multiple PHP applications). So we feel that we have a good idea of the pros and cons of a solution you come up with. It's something that enterprise programmers don't usually have to write, but which is kind of a fun problem that can have some unique solutions. We hope to see your solution soon.