There are a few old debates with little interest given to them. This article examines the effectiveness of the XMPP and AMQP protocols and provides recommendations for areas of usage.
My own startup is using both for different reasons, XMPP serves as our bi-directional communications and multimedia backbone while AMQP through RabbittMQ serves as our content provider, uni-directional communications tool, and task queue engine (through Celery and our custom backend tool.
Xmpp is now going on two decades old. It is solid and broad. However, it is XML based so it may be slow. Still, Simplr Insites, LLC chose XMP over MTQQ since it can handle both audio/video and chat communications.
XMPP communicates using stanzas which wrap different XML tags containing a wide array of information. The link above provides an excellent starting resource for learning XMPP.
- bi-directional communications
- p2p and multi-user communications
- information regarding presence and status
- supports video and audio through Jingle or another client
- large scale servers such as eJabberd and Openfire
- has the strophe.js library for implementation
XMPP is not:
- a great solution for the producer consumer pattern
- requires decent hardware and is easy to abuse (overuse of the presence component)
While we found XMPP to be a great tool for communications and multi-media. We also moved to task queuing upon finding the actor method to be too cumbersome in Python.
XMPP requires passing a large amount of XML and has no subscribe-able queues. AMQP libraries, these are protocols, offer robust structures and implement many enterprise patterns which are useful in data processing.
AMQP solutions tend to offer:
- robust enterprise patterns
- robust flow processing
- task queuing libraries with speeds slightly slower than Akka (the best-in-class for everything library)
AMQP solutions tend to not offer:
- state and presence support without extensive implementation by the developer
- robust bi-directional queues for large scale communications (there are bi-directional queues)
- audio/video support
If considering moving away from Scala/Java and thus the actor model and towards different platforms while requiring proven and robust real-time frameworks, XMPP libraries and AMQP libraries should be considered for their advantages. XMPP solutions work well in communications and real-time, non-flow based processing. AMQP solutions work well, not as well as Akka, in flow processing.