The Spread Toolkit is one of my favorite Open Source projects. Spread lets you send multicast group messages between applications. It provides reliable, ordered, asynchronous message delivery, and it’s efficient, works on large wide-area networks, and can survive and recover from network failures.

What kind of things could you do if a MySQL server could send and receive messages using Spread? I started a new project, the MySQL Message API, to find out. For a few ideas to get started with: if you want to notify a bunch of application servers whenever a particular table changes, you can write a simple trigger to send them all a message. Or if you have lots of different specialized database servers powering your 30-million-user social networking site, you might want to send messages from one server process them (with stored procedure code) on another.

The Message API is a set of MySQL UDFs that enable you to join message groups and to send and receive messages. The first beta release is available now on MySQL Forge. I have been working with the code and testing it pretty extensively for the last three months — but only on Mac OS X and FreeBSD. I wouldn’t be surprised to hear about problems compiling and linking the code on Linux, Solaris, and other platforms, so I’m especially hoping to get some feedback about those.