Web Service Messaging

>JMS
At its simplest level, JMS is java based messaging
Web services are revolutionizing the Internet bythat sends messages between servers and clients.
enabling applications to speak a common language:The format of these messages is quite flexible and
XML. While Web services technology enables thecan include ordinary text messages (including raw
execution of remote functions, it does not provide atext, SOAP, and XML), entire Java objects, and
robust infrastructure for handling information. As the"empty" messages that are suitable for basic
solution of this problem this article describes thecommunication (like acknowledgments).
concepts of web services with messaging.What's different about JMS compared with, say,
Web services are revolutionizing the Internet bylow-level TCP/IP packets and Java Remote Method
enabling applications to speak a common language:Invocation (RMI) is that while the other methods
XML. While Web services technology enables thenormally require real-time connectivity and messages
execution of remote functions, it does not provide athat are sent synchronously, JMS systems are more
robust infrastructure for handling information. As theflexible. In asynchronous mode, which is the default
solution of this problem this article describes themode for JMS, clients don't have to be connected all
concepts of web services with messaging.the time.
Web ServicesMSMQ
Web services are a new breed of Web application.MSMQ is Microsoft’s implementation of
They are self-contained, self-describing, modularMessaging. It supports both Point-to-Point and
applications that can be published, located, andPublisher-Subscriber models for messaging. Messages
invoked across the Web. Web services performare typically kept in queues that are managed by
functions, which can be anything from simpleQueue managers and applications access MSMQ via a
requests to complicated business processes.simple client API.
How it is differ from web applicationMessages can be prioritized and delivered depending
Where the current web enables users to connect toon their position in the queue, the first on queue
applications, the web services architecture enableshaving the highest priority. Queues can be
applications to connect to other applications. A webimplemented both in memory as well as on
service is therefore a key technology in enablingsecondary storage such as disk. While express
business models to move from B2C (Business tomessages are stored in memory, recoverable
Consumer) to B2B (Business to Business).messages are stored on disk.
Web Services provide companies with aThere are two types of queues in MSMQ.
standards-based technology to simply integratePublic queues: These are queues published in the
applications, share information with partners, andMQIS (Message Queue Information Store) and
provide access to enterprise systems through areplicated throughout the Enterprise. Any computer
variety of devices.on the Enterprise can hence locate them.
Where is the problem?Private queues: These are queues that are not
An enterprise-class application that communicatespublished in the MQIS and can only beaccessed by
with Web services must ensure that the data can besystems that have access to the full path name or
handled appropriately.format name of the queue.
When employing Web services, one must askCombining Messaging with Web Services
questions like: Can our application scale to increasedA first-generation Web-services-enabled application
messaging demands? If our application crashes, is thecontains or directly interfaces with a client that
Web service’s data lost? How do we connectcommunicates with Web services as following image
our Web-services-facing applications to back-endshows
systems? These problems are created but
unfortunately not solved through the Web servicesThis architecture enables the application to find and
architecture. Web services must be combined withcommunicate with remote systems, but does not
additional technology called Messaging for robustimplement data reliability, scalability. The addition of
enterprise messaging.Messaging creates a second generation for
Messaging Conceptarchitecting Web services systems, as shown in
Messaging provides high-speed, asynchronous,following Figure.
program-to-program communication with guaranteed
delivery.The inclusion of messaging servers decouples the
A simple way to understand what messaging does isapplication from the tasks of handling messages and
to consider voice mail (as well as answeringweb service clients. Applications communicate through
machines) for phone calls. Before voice mail, whenan adapter to the messaging server.
someone called, if thereceiver could not answer, theIn this new architecture, hybrid Messaging and Web
caller hung up and had to call back later to see if theservices clients handle the bulk of the messaging
receiver would answer at that time. With voice mail,duties. Information is passed through the Messaging
when the receiver does not answer, the caller canserver, which natively handles issues like fail over,
leave him a message; later the receiver (at hisload balancing, and guaranteed message delivery. By
convenience) can listen to the messages queued indecoupling the Web services client from the
his mailbox. Voice mail enables the caller to leave aapplication, several applications can effortlessly reuse
message now so that the receiver can listen to ita single Web services client. Decoupling makes it a
later, which is often a lot easier than trying to getsimpler process to upgrade the Web service as
the caller and the receiver on the phone at the sameinevitable software changes occur. Additionally, an
time. Voice mail bundles (at least part of) a phone callapplication that becomes busy will have its Web
into a message and queues it for later; this isservices data automatically queued in the Messaging
essentially how messaging works.server until it is able to process the messages.
In enterprise computing, messaging makesConclusion
communication between processes reliable, evenThis decoupled architecture of Messaging and Web
when the processes and the connection betweenservice clients is obviously more complex than an
them are not so reliable.application that makes the Web service call directly.
There are two main defacto messaging standardsHowever, as the number of applications and Web
for enterprise computing:services grow, the importance of the loosely coupled
1. The Java 2 Platform, Enterprise Edition (J2EE)architecture becomes more evident. Messaging forms
includes the Java Message Servicethe backbone of many integration projects for good
API (JMS).reason: it simplifies and enhances the handling of data.
2. The Microsoft .NET Framework SDK (.NET) includesSince Web services are simply another way to
the System.Messagingnamespace for accessingintegrate information and functionality, it makes sense
MicroSoft Message Queue (MSMQ).that Messaging should also be a part of it.