Wednesday, October 30, 2013

Book review of Learning NServiceBus by David Boike

A review of Learning NServiceBus by David Boike.
or
“How I Learned to Stop Worrying and Love the Bus”
Technical books with ‘learning’ in the title worry me. I approach them with trepidation, and I’ll tell you why: Many of them turn out to be little more than regurgitations of the subject’s technical documentation with shallow code examples – from which I generally infer that the author didn’t have a good handle on the subject matter.
I’m very glad to say that Learning NServiceBus, (David Boike; PACKT Publishing, 2013, 121 pages; ISBN: 978-1-78216-634-4), is not one of these worrisome reference books. It is clear that Mr Boike has a very good handle on NServiceBus from a developer’s point of view and like NServiceBus itself, this book is guaranteed to deliver its message.
At the opening of chapter one, Getting On The IBus, David hits us with a one-liner describing what NServiceBus is. Then, acknowledging that such trite explanations are, well … trite, he addresses the far trickier problem of explaining what NServiceBus does by presenting several common service orientated pitfalls that may resonate with the reader. This is a clever strategy and guaranteed to draw you in because every architect or developer working at the service-interoperability level has encountered at least one of these challenges. (Reading these pitfalls, it was nice to be reminded why NServiceBus is one of my go-to technologies when architecting scalable, durable systems; and how difficult life would be without it.)
David then establishes a contract with the reader that by the end of the book, one will be able to leverage NServiceBus to address these pitfalls and build out enterprise class systems.
And he makes good on this contract. He does it by starting with a slow prescriptive pace, gradually introducing more detail as the reader comes up to speed.
Right off the bat, David shows us how to prepare our machine for NServiceBus v4.0, how to install it and how to build our first NServiceBus solution. And, by Jingo, does he make it look easy! In fact, the step-by-step tutorial in Chapter One is so methodical that with only a basic knowledge of Visual Studio and NuGet, you’d still have your first NServiceBus project built and running within 10 minutes of cracking the cover; complete with a message assembly, a service endpoint, a message handler, and an MVC application. This is how every tutorial book should open.
In chapter two, Messaging Patterns, David kicks it up a gear. Gone is the systematic handholding and we are fast-tracked into a treatise on the usage of Commands versus Events, a discussion on that great anathema to the ACID rule, Eventual Consistency, and an explanation of NServiceBus’s Publish/Subscribe mechanism.
By the end of chapter three we know how NServiceBus deals with message delivery failures, and a chapter after that we’ve learned about hosting the NServiceBus process, using it with IoC containers and its support for various message transports. By the time we close the back cover we have learned about Sagas – NServiceBus’s long-running processes, how to open the hood on NServiceBus and rewire it to provide all those highly-specialised behaviours that crop up in every large project, how NServiceBus handles encryption and how to administer NServiceBus in the wild.
For a tutorial, the cadence of this book is damn-near perfect. David Boike crams an incredible amount of information into 121 pages and does it in a way that is easy to absorb. The code examples are targeted perfectly and are available as downloads from the Packt website.
If you want to learn NServiceBus, buy this book. If your team already uses NServiceBus, buy this book: As new guys come through the door, set them loose on chapter one and the experienced NServiceBus developers can use the later chapters as an aide-memoire or a quick reference. I’m already supposed to know NServiceBus back-to-front and this book taught me some new things and crystallised some advanced topics that I was a bit sketchy on.
I wish I’d written this book. If I had, I’d consider it a job very well done.

Mike Synnott is a 30-year veteran of the software development industry. He is currently a team lead and senior developer with Kobo in Dublin, where he uses a variety of .NET technologies, including
NServiceBus to architect durable and highavailability solutions for Kobo’s online eBook and eMagazine store. He is also a published writer having written technical articles for .EXE Magazine in London in the early 90s and more recently having published the first of a series of sci-fi/fantasy novels set in contemporary Ireland. He lives in Ashford, Co Wicklow with his wife and their cat overlord. He can be reached at mike@synnott.me
David Boike is a Principal Consultant with ILM Professional Services with more than a decade of development experience in ASP.NET and related technologies and has been an avid proponent of NServiceBus since Version 2.0 in 2010. He is also an alumnus of Udi Dahan’s Advanced Distributed Systems Design course. David resides in the Twin Cities with his wife and daughter. He can be found on Twitter at @DavidBoike and on his blog at http://www.make-awesome.com.