Wrangling up XMPP
apache-camel, esb, java, soa, xmpp
Solution
XMPP can be used for a wide range of messaging based applications. Basically, it provides core services which can be used to build XML based messaging applications. Its based on a decentralized client-server architecture and utilizes long-lived TCP connections for communicating...
core services include...
- channel encryption, authentication, presence, contact lists, one-to-one messaging, multi-party messaging, notifications
- service discovery, capabilities advertisement, structured data formats, workflow management, peer-to-peer media sessions
textbook use cases...
- instant messaging (using presence, contact lists, one-to-one messaging)
- group chat, gaming, systems control, geolocation, middleware/cloud computing, data syndication
- bots (weather, database interface, system monitoring)
messaging modes/patterns...
- point-to-point messaging is used to send to a specific receiver
- multi-user messaging is used to message to a group of receivers
- publish/subscribe support is used when there are large volume of events and systems are interested in differing subsets of events. Publishers put events into topics and subscribers indicate which topics they are interested in. This decouples the publisher/subscriber and allows for scalable real-time messaging. For more information, see this article: http://www.isode.com/whitepapers/xmpp-pubsub.html
deployment methods...
- XMPP user - connects as a normal user and responds to requests addressed to the user
- XMPP Server plugins - deployed as part of the server plugin architecture
- XMPP Components - service external to an XMPP server that connects and behaves like a plugin
Java Integration
- Smack API - A pure Java library, it can be embedded into your applications to create anything from a full XMPP client to simple XMPP integrations such as sending notification messages and presence-enabling devices.
- Camel XMPP - A Camel component that allows integration with Smack API in Camel routes
To your specific question "can it be used in SOA/middleware?"....
- yes, it can be used to wire together applications via XML messaging and XMPP APIs
- whether its the best technology choice depends heavily upon requirements
- one good use case, interactive system monitoring/management...here are some other examples
Also, XMPP integration with Camel is trivial. See this camel-xmpp unit test for a basic example of interfacing with a Google Talk server. Also, Camel's framework allows you to build an application and easily swap out different messaging technologies (JMS, STOMP, mina, etc).
Problem
Wikipedia defines `XMPP` as: ...an open-standard communications protocol for message-oriented middleware based on XML. xmpp.org defines `XMPP` as: The Extensible Messaging and Presence Protocol (XMPP) is an open XML technology for real-time communication, which powers a wide range of applications. Although I'm sure both these definitions are very accurate, they don't tell me a thing about what I - a Java developer - can actually do with XMPP! For instance, I've heard XMPP can be used with message-oriented middleare (MOM). How so? Can XMPP somehow integrate with my Apache Camel routes, my ESB or some SOA implementation to deliver a better/faster/more robust business tier? If so, how?!?! A good, King's-English explanation of XMPP, along with some practical examples (preferable MOM-centric) would be greatly appreciated. Thanks in advance!