• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

When to use messaging???

 
John Ranaudo
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After having a discussion with a co-worker, I am somewhat confused as to when is messaging the more appropriate solution as apposed to point to point(RPC) calls. Aside from the common reasons like assured message delivery/data centric etc.

Can someone point me to a decent source of information to help me better clarify this topic or perhaps just point me in the right direction?

Thank You,

John
 
David Follow
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi John,

use messaging if you want to use loose coupling between two components (applications etc.) and if an instant response is not neccessary.

D.
 
Jeremy Hsu
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, John

Messaging is most suitable if the problem you are solving is asynchronize in nature. In other words, immediately after sending the message, the client that sent the message can continue to do other things while the server will be processing the message. On the other hand, if you do it via RPC or RMI, the client has to wait for the server to finish processing the message before the client can continue to do other things.

As a result, to let the client know the result of the processing of the message, the server will have to, for example, send the result of the processing via email or post that in the database and have the client to come back and check the result later.

I hope this explains it.
 
John Ranaudo
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's pretty much what I have been telling this guy. He thinks because they standardized on websphere mq that everything has to go through messaging. :roll:
 
Sudhaker Raj
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MQ does have lots of overheads so use it carefully. Not all ASYNC process should be implemented using MQ.

Look for one or more of followings

Reliability
Load-balancing
High-availability
Transaction

 
kaiser eblovich
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
WebSphere MQ is quite decent product in respect to performance, but there are always overhead of (de)/serialization and also interprocess communication (WS MQ is native code implementation).

However it's always better to define an abstraction in your code like AsyncDeliveryService, which could be implemented for WS MQ or just in-memory queue. The bottom line is that your business code must NEVER be aware of underlying API's, be it JMS or EJB. Draw a sandbox with your own APIs like AsyncDeliveryService and let your code depend on these APIs only.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic