December 2011 - Posts

Life is a book. Each one of us is an author. Every year is a chapter. Every New Year eve we wish to start fresh, to begin a new chapter in our life. Let me wish you to live your next year in a such way, that you would be proud to add another chapter to your life book, proudly looking at the passing year and building on top of that many other chapters, full with love, happiness, great achievements, and people so dear to your heart.


Happy 2012.

Thank to Oren Eini, now I have another tool under my toolbelt – ESENT database. Fully transactional database, deployed with all windows, just add managed wrapper and good to go. Moral of this post – there’s so much under my nose that I am not even aware of…

I have always wanted to be able to find free icons for the documents and visual explanations I was putting together, w/o violating any creator rights and yet being able to find quality items. Finally a co-worker of mine, Eliot Negelev, has showed me the site that does it: IconFinder.com Love it!

I previously blogged on afterthoughts on NServiceBus course. Equipped with new powerful knowledge I have approached on of the TODO tasks on my plate – decouple email notification service from the main web application.

First, the problem with the code that needed to be resolved. A customer is submitting content that has to be approved. Once content was submitted, an email is generated to notify approver. Approver either rejects or accepts the content, and notification is sent to the customer. Simple. Yet the original implementation has email notification logic residing within the application. What happens when application explodes or SMTP is down? Out of luck, sorry.

image

What should it be?

Personally, I think email notification service should be completely separated from the application. A bus should connect application and services and be the reliable mechanism for transportation of system messages (white envelope on the picture). In case email notification service is not available, messages are not lost, and email are not failing to reach their destination. Application can work with notification service being down or temporarily not available. Once service is available, messages are delivered to the service and it is service responsibility to fire emails to approver and customer. In case SMTP is not working, there’s a single point of failure, which is easy to troubleshoot. When using NServiceBus, queues are transactional, which means system messages are not removed until there’s a successful processing or message was retried defined number of times and moved to the failed queue. The biggest advantage of this approach, is the fact that no system message is lost, application is still running, and once service failure is addressed, system messages can be re-submitted (commands replayed). In worse case scenario, pull out messages manually and send a piece of paper with doves :) Or maybe not, but you got the drift.

image

 

 

 

 

 

 

 

 

 

 

 

Weak Points

I have used NServiceBus 2.6 since 3.0 is still in Beta and it wouldn’t be wise to apply a beta in production… There are several points of weakness I run into:

  1. Configurations – yacks. It is not complex, but tedious, and time wasting. I wish there’d be a tool not just to spit out a default configuration one time only, but a tool that actually allows to update and existing solution configuration (NServiceBus folks, here’s a feature request).
  2. Multiple assembly references – to build the project I had to use different NuGet packages for NSB. I’d rather see a single NuGet package instead of multiple ones that are way too confusing. Once packages are in place, referencing multiple assemblies is awkward. Maybe next version this will be resoled.
  3. Scattered documentation – documentation is there, but it’s not in a single spot. User group, release notes, NServiceBus site, StackOverflow. I guess this is a typical problem of any software project and not unique to NSB only.
  4. User group – I just don’t like the interface and functionality of Yahoo user group. Not being able to receive notification for specific thread – drives me insane.

SOA Done Right?

I am not sure if using NServiceBus will answer all the questions, but so far a lot of them got covered for me:

  • Reliability
  • Sub-systems decoupling
  • Single Responsibility
  • Single point of failure
  • Versioning

Next step for myself would be to attend Udi’s Advanced Distributed Systems Design course. Till then, more experiments with NSB.

I have attended Enterprise Development with NServiceBus course last week. Interestingly, a lot of questions I had back a while ago where answered. Either I was missing the knowledge, or not asking the right questions. Either way, what I was trying to accomplish a year and something ago with BizTalk could be done ten times simpler with NSB. BizTalk was a great tool for mapping, but definitely neither a services platform nor a bus. Long-term running processes with BizTalk (aka Orchestrations) felt plain wrong. The fact that one was not able to test the bread and butter of a business process w/o having a full end to end integration testing was mind blowing. Creating messages outside of BizTalk has felt like a shameful sin.

Training at Austin with Jimmy Bogard (Headspring) is a good start to get you going if you wondering around SOA / Bus maze and want clarity.

More Posts