http://www.sxc.hu/photo/1084274
Resilience
Easier to test Option to go offline
http://www.sxc.hu/photo/319039
http://www.flickr.com/photos/library_of_congress/2179123671 /
Easier to extend
http://www.sxc.hu/photo/1035790
Getting Started
What is included...
IBuilder
Various parts of the framework (e.g. passing messages to handlers) use a service locator pattern. This is done using the IBuilder interface
An implementation using Spring is provided: ObjectBuilder.SpringFramework An example of a implementation for Castle Windsor is in the Demo source
ITransport
Responsibility for sending and receiving messages is delegated to a transport component Unicast Implementations for MSMQ and Http are provided
There is an IMulticastTransport interface, but there are no implementations provided
IMessageSerializer
IBus
Publish/Subscribe
ISubscriptionStorage
Publish/Subscribe config
Always needed
On Publisher:
On Subscriber
Full Duplex
Sending message from the client Handling the message on the server
_bus.Reply(response);
private void callback(IAsyncResult ar) { .... CompletionResult result = asyncResult.AsyncState as CompletionResult; Message request = result.State as Message; ...
foreach (var message in result.Messages) { ...}
....
Saga
ISagaPersister
The responsibility of persisting and rehydrating Saga entities is delegated to a class implementing ISagaPersister DbBlobSagaPersister implementation provided
ISaga<T>
Saga Enitity, which will handle the various steps in the saga workflow, will implement ISaga<T> for each workflow step Also a class extending SagaMessageHandler may be used. This will typically override the Handle and NeedToHandle methods. The SagaMessageHandler uses ISagaPersister to rehydrate the ISaga<T> implementation, and call it's Handle method
Saga interaction
Saga Demo
Distributor
An executable is provided
Conclusions
Positives
Source code is well structured and easy to understand Main objects can be extended, flexible architecture Has performed well in load tests
Few dependencies
There is little documentation
Negatives
Some alternatives?
Links
http://www.nservicebus.com
http://www.udidahan.com http://ayende.com/Blog/archive/2008/03/24/NSe rviceBus-Review.aspx http://gojko.net
Next events
Questions?