Category Archives: NServiceBus

Saga Implementation Patterns: Singleton

NServiceBus sagas are great tools for managing asynchronous business processes. We use them all the time for dealing with long-running transactions, integration, and even places we just want to have a little more control over a process. Occasionally we have … Continue reading 

| 5 Comments

Comparing processing times of NServiceBus saga patterns

A few weeks ago I gave a talk at NSBCon NYC on scaling NServiceBus, and one of the pieces I highlighted were various saga/processing patterns and how they can affect performance. It was difficult to give real numbers as part … Continue reading 

| Leave a comment

NServiceBus 5.0 behaviors in action: routing slips

I’ve wrote in the past how routing slips can provide a nice alternative to NServiceBus sagas, using a stateless, upfront approach. In NServiceBus 4.x, it was quite clunky to actually implement them. I had to plug in to two interfaces … Continue reading 

| 6 Comments

Reducing NServiceBus Saga load

When presented with concurrency issues with NServiceBus sagas, you’re generally presented with two options: Relax the transaction isolation level Reduce worker thread count, forcing serialized processing of messages Both of these are generally not a great solution, as neither actually … Continue reading 

| 12 Comments

Saga patterns: wrap up

Posts in this series: Observer pattern Controller pattern Pattern variations Scaling sagas Routing slips NServiceBus sagas are a simple yet flexible tool to achieve a variety of end goals. Whether it’s orchestration, choreography, business activity monitoring, or just other long-running … Continue reading 

Also posted in Messaging | 4 Comments

Saga alternatives – routing slips

In the last few posts on sagas, we looked at a variety of patterns of modeling long-running business transactions. However, the general problem of message routing doesn’t always require a central point of control, such as is provided with the … Continue reading 

Also posted in Messaging | 8 Comments

Scaling NServiceBus Sagas

When looking at NServiceBus sagas (process managers), especially at high volume of messages, we often run into two main problems: Deadlocks Starvation This is because of the fundamental (default) design of sagas is that: A single saga shares a single … Continue reading 

Also posted in Messaging, SOA | 7 Comments

Saga implementation patterns – variations

In the previous couple of posts, I looked at the two main patterns I run into when looking at sagas: Command-oriented (request/response) in the Controller pattern Event-oriented (pub/sub) in the Observer pattern Of course, these aren’t the only ways our … Continue reading 

Also posted in Messaging, SOA | 8 Comments

Saga implementation patterns – Controller

In the previous post on saga implementation patterns, we looked at the Observer pattern. In that pattern, the saga was a passive participant in the business transaction, similar to how many fast food restaurants fulfill orders. But not all food … Continue reading 

Also posted in Messaging, SOA | 18 Comments

Saga implementation patterns – Observer

NServiceBus sagas, itself an implementation of the Process Manager pattern, often takes one of two main forms when implemented. It’s not a cut and dry distinction, but in general, I’ve found that saga implementations typically fall into one or the … Continue reading 

Also posted in Messaging, SOA | 13 Comments