Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
Delay All Your Decisions

I sat down yesterday for a really interesting interview with a potential client. We discussed a variety of things, but one thing that stood out for me was a question around which message bus I would use and why.

Apparently there had been some discussions already, and the application being developed might need one in future. So the team had been discussing their options, after all at some point in the future the whole organisation could benefit from this and other applications could start to use this message bus to benefit everyone.

My response, and a rather unexpected one it seems, was “do you really need it?”, and “if so, what’s wrong with just using MSMQ?”

I’m all for simplicity, and YAGNI, which this decision would fall firmly under – but I’m also a great advocate of:

Delay All Your Decisions Until The Last Possible Moment

Although the team could have gone for a well established message bus, JBoss and RabbitMQ were mentioned as options – my view was that this was a decision they didn’t need to make now, and making that decision could possibly work to the detriment of this project, and possibly of the whole organisation.

While this project may well need a messaging system of some kind, the implications of picking one of these choices, or another like NServiceBus or MassTransit now were quite large.

Without any requirement from the organisation as a whole, picking a message bus and hoping the rest of the organisation would run with it too were small – something intended to work on this scale requires a lot more time, thought and consideration than was available, and putting it out for discussion at this point could delay the current project, potentially fatally.

Picking one of the options now for this project in isolation was a much better route, but the requirements for this application are as of yet unknown, and so any choice would be made on an arbitrary criteria, potentially going down a technology route for the sake of it, rather than a real need. And the more complex the solution picked for this application, the less likely it was going to fit with the organisation’s wider decision later on.

So my answer was simple … for now I would go with a very simple event broker in the application, and have that use the simplest possible method of messaging available right now (probably MSMQ). When the needs of the application developed, it would then be simple to bring in a more advanced bus system by just changing the event broker, or similarly if the organisation’s needs became clearer it would be easy to use their bus of choice.

This was a decision that didn’t need to be made at this point. Consider it a premature optimisation.

By taking a simple option now, and delaying the real decision to a later date, the team will gain flexibility on their immediate application, gain clarification of their requirements and of the organisation’s requirements as a whole, will avoid locking in to any technology that could be harder to back out of later – and most importantly of all – keep focused on delivering the project at hand, rather than get distracted by this decision.

When a decision stops being trivial, delay it until the last possible moment you can – you will always have more information by then, and will therefore make a better decision.


Posted 03-21-2009 5:02 PM by Jak Charlton

[Advertisement]

Comments

Ollie Riches wrote re: Delay All Your Decisions
on 03-21-2009 3:19 PM

messages buses are this years must have item for any self respecting software development team - 'you aren't down with the kids if you don't have one...'

I too currently working with an organisation that's currently trying to roll out an ESB, so far it's take over 4 months to try and get it into production...

I guess they will be using RESTful resource orientated services as opposed to SOAP :)

Arjan`s World » LINKBLOG for March 21, 2009 wrote Arjan`s World » LINKBLOG for March 21, 2009
on 03-21-2009 4:12 PM

Pingback from  Arjan`s World    » LINKBLOG for March 21, 2009

Derik Whittaker wrote re: Delay All Your Decisions
on 03-22-2009 7:36 AM

Sadly the concept of delayed decisions is foreign to many people.  I have come to believe it is the their history of big up front design and i concept of if i don't make this one decision now all hell will break loose.

nice article

DotNetKicks.com wrote Delay All Your Decisions
on 03-22-2009 10:55 AM

You've been kicked (a good thing) - Trackback from DotNetKicks.com

platform wrote re: Delay All Your Decisions
on 03-22-2009 12:30 PM

thank

James Brechtel wrote re: Delay All Your Decisions
on 03-23-2009 9:20 AM

"My response, and a rather unexpected one it seems, was 'do you really need it?', and 'if so, what’s wrong with just using MSMQ?'"

Are you suggesting that using MSMQ now is delaying a decision, or was that question orthogonal to the point of the article?

If it's the former then I don't understand how going with MSMQ now is any more or less of a decision than picking MassTransit, NServiceBus, JBoss etc now.

Jak Charlton wrote re: Delay All Your Decisions
on 03-23-2009 2:11 PM

@James

MSMQ takes no more than 15 lines of code to start sending and receiving messages ... and it is a bog-standard windows component, so it requires no extra installs, and most importantly of all, no extra support  ... it is the simplest possible solution to the messaging problem

Putting in a service bus requires a massive amount of consideration - it is not a trivial decision. Writing an event broker using MSMQ is a few hours work at most. It is then easy to move onto a more featured solution when it is required.

James Brechtel wrote re: Delay All Your Decisions
on 03-26-2009 11:41 AM

Maybe it's just been a while since I've used MSMQ directly (or maybe the API has gotten better since then, I haven't looked).  I didn't remember MSMQ taking so few lines to get working.  

I'll have to give it another peek, thanks.

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
Umbraco
NServiceBus
RavenDb
Web Sequence Diagrams
Ducksboard<-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)