Daily using/supporting

Get Firefox browser!
Get Thunderbird!
Get Opera browser!
Get The Gimp!
Get Inkscape!
Get LibreOffice!
Get Videolan!
Get Linux!
Get Mandriva!
Get Joomla!
Hacker Emblem

Archives

Which topics would you like us to cover more?

Latest comments

Latest tweets

about 1 day ago Using REDIPS.drag to add drag and drop to your .Net webapplication #li #dib0 http://t.co/n8zY3s7d
about 7 days ago http://t.co/cknQcDbo #Kindle
about 15 days ago Freedom isn't the ability to choose what to do or say, but the ability to choose what not to do or say #freedom
about 29 days ago http://t.co/61KTQknI #Kindle
12 Apr 2012 Force the use of a networking adapter using C# #li #dib0 http://t.co/ZTJOPzOz
9 Apr 2012 Mandriva 2010.2 and USB devices in Virtualbox http://t.co/fwq9gbHB
9 Apr 2012 Execute a http request to you own site with PHP http://t.co/DIvWPrpd
Home Architecture, security and coding Why use the fire and forget pattern?
Why use the fire and forget pattern?
Written by Division by Zero   
Tuesday, 31 August 2010 09:17

A colleague of mine is working on a project which uses a Fire & Forget communication pattern. He came to me with the question if he could change the services to utilize a Request-Reply pattern. When I asked him why he wished to do so, he answered that the Fire & Forget pattern gave him too little control over what happened in the communication. Especially in situations where an error occurred. Cable

There are several communication pattern to use. Most developer, designers and architects seem to automatically choose the Request-Reply pattern. It's fair to mention that webservices automatically implement this pattern. For every request you'll get an answer. This seems logical. Even if the answer is: "I received you request in good order." But every pattern has downsides. For example: Request-Reply always needs two messages. With a high volume service this could be problematic.

So... why use Fire & Forget? If you have a high volume service (ours must be able to cope with million messages per day) sending back a reply for every message doubles the load. Sending messages cost us money (maybe not directly visible, but it always does). Besides that: the number of technical errors should be low, given you perform integration tests. Given you perform functional tests, the number of functional errors should be low. So most of the messages will contain just an "OK" message.

Fire & Forget should be used with a guaranteed delivery protocol, such as MQ. So, if we send a message, we will know it is received. The only problem is the errors. Most of them will be functional errors, if the integration is tested correctly. These functional errors can only be corrected with human interference, so sending back error messages won't give us the opportunity to automatically correct the error. This pattern demands a certain level of trust in all the hardware and software used in the communication, but with the right hardware and software this shouldn't be a problem.

 

Add comment


Security code
Refresh

He's the only genius with an IQ of 80. - Unknown


© 2009 - 2012, Division by Zero

Template based on the empire template by joomlashack 

Valid XHTML 1.0 Strict  Valid CSS!  Creative Commons License
This work by Division by Zero is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Netherlands License.