Thursday, August 14, 2008

Lightweight Service Bus frameworks

The application environment I work on needs an architectural fundament capable of a loose-coupled integration. There's a reference handbook on integration patterns, the "Enterprise Integration Patterns" by Hohpe/Woolf (also take a look at the "Integration Patterns" book from Microsoft Patterns & Practices group).

 

Anyway, there are four major integration patterns:

  • File Sharing - where application share data by exchaning files
  • Shared Database - where applications are build around a single database
  • Remote Procedure Calls - where applications expose their data through remote interfaces
  • Messaging - where applications exchange messages with the help of a centralized component (called a "Service Broker" when the messages are processed synchronously or the "Enterprise Service Bus" when a messaging component is used to store and handle messages) which acts as a backbone of the application environment


[http://msdn.microsoft.com/en-us/library/aa475433.aspx]

One of the most interesting aspects of an ESB implementation is handling various MEPs (Message Exchange Patterns: synchronous, asynchronous, send-and-forget, publish-subscribe). The latter, publish/subscribe seems the most attractive option to integrate an environment consisting of different components.

There are plenty of fully fledged ESB implementations but the core of a service bus can be built using much a simple environment based solely on a messaging component like MSMQ or IBM Webshpere MQ. And since the "low level" integration with a messaging component could be painful, we need lightweight service bus frameworks just to wrap unnecessary calls into friendly APIs.

After some research, I've found three such lightweight service bus frameworks for the .NET platform:

  • nServiceBus - uses MSMQ as messaging component and Spring.NET as the IoC container. Supports so called "sagas" which are just long-running workflows as well as the scalability over a large enterprise system.
  • Simple Service Bus - built on top of the nServiceBus. At first look seems like the porting of few nServiceBus features is not completed at the moment. Uses the Castle.Microkernel as the IoC container.
  • MassTransit  - seems to take a more universal approach, supports MSMQ / ActiveMQ as messaging components and  different IoC containers. There's not much to evaluate since the useful versions cannot be downloaded at the moment.

I hope to write more on the topic soon since this is not only the top-priority task I work on at the moment but also, in the same time, it's just just quite fun to play with.

1 comment:

Anonymous said...

As you talk of "Lightweight" Service Bus frameworks - do you have one which runs on .NET Compact Framework to support mobile devices?