Friday, June 18, 2010

Why Use A Messaging Service for P2P Connectivity

I think it is preferable for a client to directly call an X service (REST, SOAP, internal, external, whatever) so as to leave out the added complexity of writing to a queue. However I think there are some valid reasons to use a Messaging Service.

1. Lazy error handling. Most messaging systems are rock solid these days and the only reason they go down is for system reboot. X services may not be rock solid and may have a considerable amount of down time. Instead of having to add extra handling for the downtime cases, write to the message service. When the X service comes back up, the message queue will deliver. However, "Lazy" is the key here. If time allows, code error handling in the client.

2. Throttling. This is related to lazy error handling in that if a service becomes too congested, it can stop accepting requests. Write to a message service and the X service will control its own destiny. One obvious consequence of this is that the X service may never catch up. If the X service can handle the load, or it can be clustered to handle the load then call the X service directly.

3. Event triggers. If multiple X services need to react to a single client event. It is easier for the X services to listen for events than for the one client to contact each X service individually. In my opinion, this is truly the only valid reason to use a messaging service.

1 comment:

Anonymous said...

top [url=http://www.c-online-casino.co.uk/]online casino[/url] check the latest [url=http://www.casinolasvegass.com/]casino las vegas[/url] autonomous no set aside reward at the best [url=http://www.baywatchcasino.com/]casino online
[/url].