JMS: A Solution in Search of a Problem? (cont'd)

Stating Some Theorems

Assuming there can only be a finite number of threads in an application at a time, then clearly the N-tiered system using asynchronous messages can handle more simultaneous client requests, and can probably service each individual request faster—or at least as fast—compared to the RPC-based application. To state it as theorem, one might say ...

Given:

  • N threads in an application
  • To formulate a response the application requires, on average, R requests to later tiers
  • Each request to a later tier requires, on average, t seconds to complete
  • Let's also assume there is some per-request work the thread must complete within the application that takes, on average, w seconds to complete

Then an RPC-based application can handle N simultaneous client requests, each request taking on average (R·t + w) seconds to complete. An approximate formula for how long the system takes to service X requests is

time =

where div is integer division (i.e., without remainder).

But for a message-based application, we can make a couple more assumptions:

  • Each thread can send off multiple requests simultaneously. This means the amount of time the thread waits for later tiers is as small as:

  • During the time the thread is waiting for other tiers it simultaneously services other requests. All in all, we can assume a single thread services c simultaneous requests, where c => 1.

To service the same X requests, the message-based application requires less time, approximated by this formula:

time =

Again, assuming the maximum number of threads per application is more or less constant, the enterprise built with message-based communications services more client requests, faster, compared to the RPC-based equivalent. The messaging concept is thus essential for enterprise scalability.

  
Next: More on Message-Driven Beans

1 Introduction 2 A Quick Intro to JMS 3 Why JMS is Cool
4 Justifying JMS through Science 5 Stating Some Theorems 6 More on Message-Driven Beans


Java Zone - Get Help - Search Tips
 

Messageq.com.: A great resource for message queuing and message-based enterprise development in general

The JMS home page

John Wetherill's JMS API introduction

Brian Maso on DevelopMentor's site

 TALK BACK
What has been your experience using JMS? What does it offer that other solutions, such as MSMQ, do not have? Go here to start or join the discussion.
Click here to Join


Save on Hot Java Specials
SOFTWARE:
dtSearch Web
Add power searching to your web site.
Buy Now!
BOOKS:
PointBase Mobile Edition
Enable local data access for mobile users.
Buy Now!
Advertising Info  |   Member Services  |   Contact Us  |   Help  |   Feedback  |   Site Map
Jupiterweb networks

internet.comearthweb.comDevx.comClickZ

Search Jupiterweb:

Jupitermedia Corporation has four divisions:
JupiterWeb, JupiterResearch, JupiterEvents, and JupiterImages

Copyright 2004 Jupitermedia Corporation All Rights Reserved.
Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Jupitermedia Corporate Info | Newsletters | Tech Jobs | E-mail Offers