Update: Hao He is no longer unknown to me. Turns out he’s the CTO of SoftTouch Information Technology, has a doctorate in quantum optics (!), and has written some articles on REST and Web Services for XML.com. See comments.
Dr. Hao He left the following comment in an earlier post.
I think what is missing here is an architectural comparision between REST and the MOM, which is very popular among enterprises.
The main selling point of WS-* for enterprises is that they will be able to get a standard based ESB, which should be good enough for enterprise SOA.
The fundamental question is:”Is it MOM really good enough for enterprises so they can ignore REST?”
Any thoughts on this?
This is the kind of thing I hear routinely as part of my day job. Not the REST bit, but the SOA bit. The interesting thing about this comment is not the question per se, but the underlying subtext. Which is that WS-*, ESBs, and such provide the simplest substrate for distributed computing in the enterprise, and that using and deploying such technologies gives you instant SOA, the font from which all good things pour forth. It’s really rather fascinating.
To directly answer Hao’s question, however, I have to get a little terminology and positioning straight.
MOM: Message-Oriented Middleware. This is potentially a very large category of software, but I use the term fairly narrowly. To me MOM is infrastructure software that is responsible for delivering messages among components in a networked system. MOM’s implement a (typically proprietary) layer 7 transport protocol (though they ride a fine line with being application protocols) offering features in excess of straight TCP. A message is an arbitrary collection of bits. A MOM may deliver a message in a point-to-point fashion or it may be brokered. Delivery may be request/reply, fire-and-forget, synchronous or asynchronous. A MOM may offer publish-and-subscribe functionality using topics (many subscribers) or queues (one subscriber). A MOM may offer reliable message delivery, message ordering, and/or other delivery guarantees (e.g. exactly once). Today’s MOM products are robust, performant, and highly available. Representative products include IBM’s WebSphere MQ (ne MQ Series), TIBCO’s Rendezvous and EMS, Sonic’s SonicMQ, Microsoft’s MSMQ, and the open source JBoss Messaging, and various implementations of the open standard AMQP.
ESB: Enterprise Service Bus. Today an ESB is largely a marketing term meaning whatever a particular vendor wants it to mean. However, we can narrow it down somewhat. An ESB is a lightweight integration broker - nothing more and nothing less. It takes messages in over a variety of transports and protocols, typically normalizes these messages to some internal representation, and then either calls a locally hosted service or denormalizes the message and calls a remote service. Thus the principal features that an ESB offers are message transformation and routing and protocol brokering. An ESB may or may not be a JBI container or JBI compliant. An ESB can be distributed, they should not use a hub-and-spoke architecture. The typical messaging protocols supported are SOAP and one or MOMs (via JMS or natively). This MOM support allows for ESBs to subsume all or most of what a MOM does. In addition ESBs may offer connectivity adapters to a variety of legacy systems.
It’s instructive to understand what an ESB is not. An ESB is not a mandatory component of a SOA architecture. Yes, it is recommended that some intermediary be positioned between endpoints, but ESBs are not necessarily the best choice. An ESB is a tool you may use to integrate a variety of systems. And in this sense, it can be a very useful tool. But remember, the goal of SOA is not to integrate everything with everything, it is to get most things speaking the same language (whether that be RESTful HTTP or SOAP or whatnot), so that the need for integration brokers is greatly diminished. Other intermediaries you will likely need in your environment include XML appliances and SOA management systems. Representative ESB products are Sonic’s Sonic ESB, Fiorano ESBs, BEA’s AquaLogic Service Bus, IBM’s WebSphere ESB, and Oracle’s ESB. There’s also a wealth of open source ESBs including: Mule, Apache’s ServiceMix, and Celtix.
To sum up: MOM’s good. ESBs useful (on the edge). To Hao’s point then, an ESB is not good enough for enterprise SOA. You can’t buy SOA, you do SOA.
In the past I’ve provided my view on positioning REST, WS-*, and MOM (here, here, and here). In summary, due to the reach, effectiveness, and relative simplicity of REST, that should be your default position for distributed computing. If the features of a MOM are necessary, then use a MOM (though the resulting system will not be RESTful). Use WS-* only when you need to talk to something that exposes only a WS-* interface.
Remember, REST is an architectural style whose sole manifestation today is the HTTP application protocol. MOM is a transport, offering a variety of useful messaging models and other features. And WS-*, well, no one’s really sure how to nail down what WS-* is. It’s a little bit of everything, and that’s a large part of the problem.
So, Hao, ignore REST at your own peril. Yes, MOM’s can be effective, but that’s just a means of getting bits from point A to point B. The fundamental question is really, “Is REST really good enough for enterprises so they can ignore WS-*?” And the answer is yes, for a significant subset of use cases. For the rest, architect a solution around a MOM.