Service Bus for Windows Server

Move over MSMQ, Service Bus for Windows Server was recently released.  Apparently it has been for awhile now (Oct 2012 release).  I’m just late to the party I guess.

Service Bus 1.0 was designed to allow for enterprise messaging capabilities in a Windows Server-based environment.  It enables you to build, test, and run loosely-coupled, message-driven applications in self-managed environments and on developer computers.  The two primary features are Service Bus Queues and Service Bus Topics and Subscriptions.

  • Service Bus Queues offer reliable message storage and retrieval with a choice of protocols and APIs. Use Service Bus queue in your application to provide load leveling by having the message receiver processing messages at its own pace or to provide load balancing by having multiple, competing receivers accepting messages from the same queue.

For more information on Service Bus queues refer to How to Use Service Bus Queues.

  • Service Bus Topics and Subscriptions offer (in addition to all of the queue’s) rich publish-subscribe capabilities allowing multiple, concurrent subscribers to independently retrieve filtered or unfiltered views of the published message stream.

If you are interested in or use messaging technology within your applications, this is some pretty exciting news.  Service Bus for Windows Server provides the same capabilities (Message Queues, Pub/Sub) as the Windows Azure Service Bus.  Best of all, it’s free.

It’s available for download now.  Also, check out the MSDN documentation.

Event Sourcing: Eric Evans Interviews Greg Young

I follow Eric Evans (@ericevans0) and Greg Young (@gregyoung) on twitter.  I really respect their opinion and knowledge.

Eric tweeted about an interview he did with Greg over 5 years ago about Event Sourcing.  It’s great to hear Greg describe how Event Sourcing fits with DDD concepts.  This is video is one of the first Event Sourcing + DDD talks that I’m aware of.   I highly recommend checking  it out.

http://www.infoq.com/interviews/Architecture-Eric-Evans-Interviews-Greg-Young

If you are new to Event Sourcing, here is a snippet from Martin Fowler article.

Capture all changes to an application state as a sequence of events.

We can query an application’s state to find out the current state of the world, and this answers many questions. However there are times when we don’t just want to see where we are, we also want to know how we got there.

Event Sourcing ensures that all changes to application state are stored as a sequence of events. Not just can we query these events, we can also use the event log to reconstruct past states, and as a foundation to automatically adjust the state to cope with retroactive changes.

CQRS: Read Model

Keep it simple.  There isn’t much of a need to go out of your way adding extra layers of abstraction.  Any data access framework or ORM you might be using will already be creating a good enough level of abstraction.  With linq (IQueryable) being implemented in NHibernate, Entity Framework, or Linq to SQL, ORM du jour, you already have your a level of abstraction to your data source.

Need to query your read model from the client? Single page application maybe?  Ok… you need one more layer.  OData to the rescue.  WCF Data Services provides an incredibly easy implementation with Entity Framework.  ASP.NET Web API does have an OData implementation but has limitations.

Keep it simple:

  • Data Source
  • Data Access Layer (ORM)
  • OData Layer – only if needed if client is making the query
  • Client