|
YOUR FEEDBACK
Did you read today's front page stories & breaking news?
SYS-CON.TV |
TOP THREE LINKS YOU MUST CLICK ON Messaging Distributing Tasks in a Clustered Application Using JMS
Much more than asynchronous data transfer
Feb. 11, 2005 12:00 AM
Distributing Tasks in a Clustered Application Using JMS Much more than asynchronous data transfer Decoupling and delaying processing in a request-driven environment is one of the key strategies in creating a robust and scalable distributed application. Many services rely on clustering alone to ensure scalability, but they frequently run into trouble when newfound requirements keep application complexity growing. Although server clustering is an essential technology that facilitates scalability, it can be rather inefficient when all processing is done synchronously. Throughput can be increased, but responsiveness is a tougher nut to crack. In this article, I discuss asynchronous processing and illustrate how clever task management can increase the performance, availability, scalability, and manageability of your application. We will create a generic task distribution framework that can send any task to either one or every server in your cluster, in a highly configurable fashion. Our framework will implement the well-known Command pattern by using polymorphism and the Java Message Service (JMS). What Does Decoupling Mean in Practice? And the Benefits?
Automatic retries are easily configured for situations where subsystems are unavailable. Naturally, the difference between theory and practice will vary from application to application. However, it is clear that almost every implementation will have at least some of the aforementioned benefits. Sounds Great, But Are There Any Pitfalls? Which Processes Can We Decouple? An increasingly popular implementation is to queue requests immediately and then keep polling the server to know when a response can be retrieved. Although this approach is actually synchronous in nature and won't improve request processing times, it has the psychological benefit that a progress bar can be displayed during polling. In addition to decoupling integral business logic (which can be a formidable challenge), less central processes such as logging and sending e-mail are very good candidates to consider. There is no reason to have a client wait for such tasks to complete when performance is of the essence. E-mail in particular is a very good candidate for decoupling. Let's have a closer look. Case Study: Asynchronous E-mail XA Transaction Support Take into account that when accessing the database and transaction-aware JMS, you will need to use XA and two-phase commit (2PC) transactions. It is possible to emulate XA with non-XA resources, but you might end up with inconsistent data. Enabling XA is a configuration issue and usually requires no changes in code. See the WebLogic documentation for details. YOUR FEEDBACK
BEA WEBLOGIC LATEST STORIES
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK BREAKING NEWS FROM THE WIRES
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||