Alex Rivera | Logout

Why would you use a message based system?

Asked 2008-12-17T12:59:34.450
17

What are the motivations for using a message based system?

I'm seeing a lot about service buses such as NServiceBus and Mass Transit and I'm wondering what the benefits of the underlying methodology are.

Edit
Report

1 Answer

1

I helped develop one for a system that used C# and Remoting, the client (a service or GUI) could send a message complete with some custom data and the recipient(s) would receive it, either when they next connected or instantly). They could then process the message (by taking ownerships of it in the case of the load-balancing services). It was also used to update GUIs when long running processes had finished.

The messaging system itself had configurable pipelines that processed each message, here are some examples of a few of the pipelines we developed:

  • Storage (created/ saved the message to the database)
  • Routing (worked out where the message needs to be sent)
  • Security (worked out if the client was allowed to receive it)
  • Delete (works out if the message needs to be deleted from the system, which means clients need to be notified and the message removed from it's cache and flagged in the DB).
  • TakeOwnership (deals with making sure only one client can modify the state of a message at a time as only messages that are owned can be changed)

So in answer to your question, messaging systems are a brilliant means of sending information about when you don't know or care the who client is.

answered 2008-12-17T13:13:58.540

Your Answer