If you have or plan an application with synchronous communications over an external API, it will sooner or later break. Why do we need asynchronous communications? Matt Tucker is clear about that:
Take, for example, Twitter. High Scalability recently covered the load stats on Twitter reporting that they average 200-300 connections per second with spikes that climb to 800 connections per second. Their MySQL server handles 2,400 requests per second! Recently, the  Macworld keynote became the most recent culprit for causing Twitter to cut off its API, which has 10x the load of their website.
ActiveMQ is a messaging bus, often used as an Enterprise Service bus as mentioned in my recent concurrency rant. Components can send messages to the bus and subscribe to topics.
photo credit: mudpig
- Standard solution, JMS based
- Routing solutions like Camel available
- Easy access for different languages via Stomp
- Attach Jabber as a service
- Notification easily over topics
- Free OpenFire server
- Messaging with only one user with UUID for resource which did change
- Messaging with many users, who join one chat room
- Chat rooms as topics
- Server side filtering? How to make it secure, that people only get their own messages?
In the end I decided to go with Jabber/XMPP. The main points for me have been:
- Server does scale to connections
- Chat client can be used for debugging
- Very easy to use with different programming languages
- Presence protocol to detect services
- Easy to implement additional chat solution
This worked quite well as a spike. I followed a similar mode as Adrian Sutton, who had good experiences with Jabber/XMPP too when spiking a cache solution:
We grabbed the Smack API and started playing with it and quickly discovered that sending and receiving messages was ridiculously easy. It turns out that the absolute simplest way you can minimize stale data in your caches is to simply have all the servers join a preconfigured chat room. Whenever they save a change to a resource they send a message to the room with the unique ID of that resource and whenever they receive a message from the room they assume it’s a unique ID and remove any cached versions of that resource.
Think innovative, use technologies in a way to help you. Jabber/XMPP is more than a chat protocol.