Java Messaging Service
a standard java client application programming interface to messaging systems.
third party vendors provide its implementation to support their products.

【*】Messaging System
it provides the means to continue processing while a communcation is pending.
also does an asynchronous way of writing distributed programming.
what this means is that the process sending the message does not block waiing for a response.

contrast this with traditional RPCs in which the caller blocks until counterpart responds.
this is a analogous to leaving a message in an answering machine and going about your business.
conversely, the same analogy for RPC requires counterpart to be abailable to take your call or nothing gets done.

【*】Advantages of Messagaging System
application counterpart does not have to be running.
the sender will proceed uninterrupted and when the receiver begins it will process the message as needed.
the sender and any other components it works with can continue to work despite the non-active state of the receiver.
therefore the system as whole is more resilient to failure.
further, because senders donot connect directly to receivers either one can be easily replaced w/o dsrupting processing.

【*】Further advantages
messaging systems mean existing systems can easily be integrated even if they are written in a language other than java.
because messaging systems do not block they can be added to existing programs w/o affecting existing functionality.
contrast this to adding a RPC call to an existing program.
the modified program will block until the response comes which may never happen if counterpart is down.
thus messaging is the ideal vehicle for application integration if the calling program does not require an immediate response.

【*】Messaging domains
JMS recognizes two basic types: point-to-point and publish-subscribe.
in PTP each message set will be consumed by one and only one application.
in Pub/Sub each message sent can be be received by many applicatons.
PTP: sender and receiver
Pub/Sub: sublisher and subscriber
both: producer and consumer

【*】PTP features
+ each message sent counts so messages should nerver be lost
+ each message is consumed by one and only one receiver
+ message consumers usually must "pull (active)" the messages from the system
+ a typical PTP application is the routing of stock trades to an exchange

【*】Pub/Sub features
+ loss of messages are not critical
+ one sender (publisher) can target many recipients (subscribers)
+ publisher "push" messages whereas subscibers are usually "passive" and just wait for messages to come
+ a typical application is the distribution of stock quotes

【*】Administered objects
messaging systems decouple senders from receivers.
this is accomplished by having producers send messages not to consumers directly but to an external object.
the domain type determines what it is called.
PTP uses the term "queue".
Pub/Sub refers to the object as a "topic".
JMS refers to queues and topics by the generic term "destination."

queues and topics are know as administered objects.

JMS provides an application programming interface to messaging systems.
messaging systems solve the problem of bottlenecks b/w communicating programs.
PTP domains handle one to one messaging.
Pub/Sub jandles one to many messaging.


tag : JMS Java Messaging Service RPC PTP Pub/Sub

2009-02-25 00:18 : __j2ee__jms : コメント : 0 : トラックバック : 0 :

« next  ホーム  prev »




tag cloud

category cloud