| > | | | | JMS |
| | | | At its simplest level, JMS is java based messaging |
| Web services are revolutionizing the Internet by | | | | that 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 the | | | | can include ordinary text messages (including raw |
| execution of remote functions, it does not provide a | | | | text, 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 the | | | | communication (like acknowledgments). |
| concepts of web services with messaging. | | | | What's different about JMS compared with, say, |
| Web services are revolutionizing the Internet by | | | | low-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 the | | | | normally require real-time connectivity and messages |
| execution of remote functions, it does not provide a | | | | that are sent synchronously, JMS systems are more |
| robust infrastructure for handling information. As the | | | | flexible. In asynchronous mode, which is the default |
| solution of this problem this article describes the | | | | mode for JMS, clients don't have to be connected all |
| concepts of web services with messaging. | | | | the time. |
| Web Services | | | | MSMQ |
| Web services are a new breed of Web application. | | | | MSMQ is Microsoft’s implementation of |
| They are self-contained, self-describing, modular | | | | Messaging. It supports both Point-to-Point and |
| applications that can be published, located, and | | | | Publisher-Subscriber models for messaging. Messages |
| invoked across the Web. Web services perform | | | | are typically kept in queues that are managed by |
| functions, which can be anything from simple | | | | Queue managers and applications access MSMQ via a |
| requests to complicated business processes. | | | | simple client API. |
| How it is differ from web application | | | | Messages can be prioritized and delivered depending |
| Where the current web enables users to connect to | | | | on their position in the queue, the first on queue |
| applications, the web services architecture enables | | | | having the highest priority. Queues can be |
| applications to connect to other applications. A web | | | | implemented both in memory as well as on |
| service is therefore a key technology in enabling | | | | secondary storage such as disk. While express |
| business models to move from B2C (Business to | | | | messages are stored in memory, recoverable |
| Consumer) to B2B (Business to Business). | | | | messages are stored on disk. |
| Web Services provide companies with a | | | | There are two types of queues in MSMQ. |
| standards-based technology to simply integrate | | | | Public queues: These are queues published in the |
| applications, share information with partners, and | | | | MQIS (Message Queue Information Store) and |
| provide access to enterprise systems through a | | | | replicated 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 communicates | | | | published in the MQIS and can only beaccessed by |
| with Web services must ensure that the data can be | | | | systems that have access to the full path name or |
| handled appropriately. | | | | format name of the queue. |
| When employing Web services, one must ask | | | | Combining Messaging with Web Services |
| questions like: Can our application scale to increased | | | | A first-generation Web-services-enabled application |
| messaging demands? If our application crashes, is the | | | | contains or directly interfaces with a client that |
| Web service’s data lost? How do we connect | | | | communicates with Web services as following image |
| our Web-services-facing applications to back-end | | | | shows |
| systems? These problems are created but | | | | |
| unfortunately not solved through the Web services | | | | This architecture enables the application to find and |
| architecture. Web services must be combined with | | | | communicate with remote systems, but does not |
| additional technology called Messaging for robust | | | | implement data reliability, scalability. The addition of |
| enterprise messaging. | | | | Messaging creates a second generation for |
| Messaging Concept | | | | architecting 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 is | | | | application from the tasks of handling messages and |
| to consider voice mail (as well as answering | | | | web service clients. Applications communicate through |
| machines) for phone calls. Before voice mail, when | | | | an adapter to the messaging server. |
| someone called, if thereceiver could not answer, the | | | | In this new architecture, hybrid Messaging and Web |
| caller hung up and had to call back later to see if the | | | | services 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 can | | | | server, which natively handles issues like fail over, |
| leave him a message; later the receiver (at his | | | | load balancing, and guaranteed message delivery. By |
| convenience) can listen to the messages queued in | | | | decoupling the Web services client from the |
| his mailbox. Voice mail enables the caller to leave a | | | | application, several applications can effortlessly reuse |
| message now so that the receiver can listen to it | | | | a single Web services client. Decoupling makes it a |
| later, which is often a lot easier than trying to get | | | | simpler process to upgrade the Web service as |
| the caller and the receiver on the phone at the same | | | | inevitable software changes occur. Additionally, an |
| time. Voice mail bundles (at least part of) a phone call | | | | application that becomes busy will have its Web |
| into a message and queues it for later; this is | | | | services data automatically queued in the Messaging |
| essentially how messaging works. | | | | server until it is able to process the messages. |
| In enterprise computing, messaging makes | | | | Conclusion |
| communication between processes reliable, even | | | | This decoupled architecture of Messaging and Web |
| when the processes and the connection between | | | | service 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 standards | | | | However, 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 Service | | | | the 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) includes | | | | Since Web services are simply another way to |
| the System.Messagingnamespace for accessing | | | | integrate information and functionality, it makes sense |
| MicroSoft Message Queue (MSMQ). | | | | that Messaging should also be a part of it. |