SlideShare a Scribd company logo
1 of 16
Andrea Saltarello
@andysal74
CEO @ Managed Designs
http://www.manageddesigns.it
Making workflow implementation
easy with CQRS
Introduction to ServiceInsight for NServiceBusMaking workflow implementation easy with CQRS
A workflow consists of an orchestrated and
repeatable pattern of business activity enabled by the
systematic organization of resources into processes that
transform materials, provide services, or process
information.[1]
It can be depicted as a sequence of operations,
declared as work of a person or group,[2] an organization
of staff, or one or more simple or complex mechanisms.
[Wikipedia]
Introduction to ServiceInsight for NServiceBusMaking workflow implementation easy with CQRS
A simple workflow: Invoicing
Issue
Payment
Ship
NotifyExpires IsPaid Collect
No
Introduction to ServiceInsight for NServiceBusMaking workflow implementation easy with CQRS
A simple workflow: Invoicing
Either a user or a scheduler fires code such as:
public void NotifyCustomersAboutPertainingExpiredInvoices()
{
var expiredInvoices = from i in db.OutgoingInvoices
where SomeClausesPointingToStillUnpaidExpiredInvoices
select i;
foreach(var invoice in expiredInvoices)
{
NotifyExpiredInvoiceToCustomer(invoice);
}
}
Introduction to ServiceInsight for NServiceBusMaking workflow implementation easy with CQRS
Enter CQRS
Presentation layer
Application layer
Infrastructure layer
Domain Model
Domain layer
Presentation layer
Infrastructure layer
CQRS
Queries
Data
access
Commands
Application
+
Domain
Introduction to ServiceInsight for NServiceBusMaking workflow implementation easy with CQRS
Why CQRS?
We faced a lot of complexity in modeling
We thought it was inherent domain complexity
Long story short: a single model caring about all aspects of the domain is
hard. Enter CQS
Command/Query Separation
(cit. Bertrand Meyer – 1980s)
Query
> Returns data
> Doesn’t alter state
Command
> Alter state
> Doesn’t return data
Introduction to ServiceInsight for NServiceBusMaking workflow implementation easy with CQRS
CQRS in action
As a business unit manager, I want to notify
customers about expired invoices
Database
.OutgoingInvoices.
.PerBusinessUnit(businessUnitId)
.ExpiredOnly()
.Select(i => new {InvoiceNumber = i.Number, CustomerId =
i.Customer.Id})
.AsParallel()
.ForAll(i => NotifyCustomer(i.InvoiceNumber, i.CustomerId));
Introduction to ServiceInsight for NServiceBusMaking workflow implementation easy with CQRS
The result
Pros:
• Easy to read
• Close to Ubiquitous Language
Cons:
• Synchronous (lower scalability)
• Either a scheduling engine or human interaction is
required
Introduction to ServiceInsight for NServiceBusMaking workflow implementation easy with CQRS
Commands: a different strategy
1. Application sends a command to the system
2. Commands are dispatched to workflow managers
(a.k.a. Sagas) which will execute them and then state
success/failure accordingly
3. Responses are notified to interested subscribers (a.k.a.
handlers) such as Denormalizers, which will
(eventually) update the read model’s database
Note: command/responses dispatch will be managed by a
Mediator
Introduction to ServiceInsight for NServiceBusMaking workflow implementation easy with CQRS
CQRS in action, part 2
As a business unit manager, I want to notify
customers about expired invoices
Database
.OutgoingInvoices.
.PerBusinessUnit(businessUnitId)
.ExpiredOnly()
.Select(i => new {InvoiceNumber = i.Number, CustomerId = i.Customer.Id})
.AsParallel()
.ForAll(i => mediator.Send(new NotifyPaymentDueCommand(i.InvoiceNumber,
i.CustomerId)));
Introduction to ServiceInsight for NServiceBusMaking workflow implementation easy with CQRS
The result, part 2
Pros:
• Easy to read
• Close to Ubiquitous Language
• Asynchronous
Cons:
• Either a scheduling engine or human interaction is
required
Introduction to ServiceInsight for NServiceBusMaking workflow implementation easy with CQRS
Queues or buses? That is the question (semi cit. )
Although both categories are viable options and support
common features (e.g.: message durability), a bus is generally
preferable due to advanced capabilities (e.g.: message
scheduling)
Mediator, who art thou?
Introduction to ServiceInsight for NServiceBusMaking workflow implementation easy with CQRS
Sagas 1-2-3
In a messaging system, a saga orchestrate a set of
messages. The main benefit of using a saga is that it
allows us to manage the interaction in a stateful manner
(easy to think and reason about) while actually working in a
distributed and asynchronous environment.
[Ayende]
Though Saga are not proper workflow/process manager,
they are effective at pretending to be 
Sagas in action
Introduction to ServiceInsight for NServiceBusMaking workflow implementation easy with CQRS
More resources:
• “Microsoft .NET: Architecting Applications for the Enterprise”
by Andrea Saltarello and Dino Esposito, Microsoft Press (2014)
• Merp (http://naa4e.codeplex.com)
Links
Thank you

More Related Content

Similar to Making workflow implementation easy with CQRS

Tutorial 22 mastering olap reporting drilling through using mdx
Tutorial 22 mastering olap reporting drilling through using mdxTutorial 22 mastering olap reporting drilling through using mdx
Tutorial 22 mastering olap reporting drilling through using mdx
Subandi Wahyudi
 
WF_in_retail_banking_enterprise_systems
WF_in_retail_banking_enterprise_systemsWF_in_retail_banking_enterprise_systems
WF_in_retail_banking_enterprise_systems
Oleh Zheleznyak
 
Survey on reliable sla based monitoring for billing scheme in cloud computing
Survey on reliable sla based monitoring for billing scheme in cloud computingSurvey on reliable sla based monitoring for billing scheme in cloud computing
Survey on reliable sla based monitoring for billing scheme in cloud computing
eSAT Journals
 
Sap tr um_dm_meter reading order reversal_v1.0
Sap tr um_dm_meter reading order reversal_v1.0Sap tr um_dm_meter reading order reversal_v1.0
Sap tr um_dm_meter reading order reversal_v1.0
UF Technology
 

Similar to Making workflow implementation easy with CQRS (20)

Pre-Con Education: What Is CA Unified Infrastructure Management and what's ne...
Pre-Con Education: What Is CA Unified Infrastructure Management and what's ne...Pre-Con Education: What Is CA Unified Infrastructure Management and what's ne...
Pre-Con Education: What Is CA Unified Infrastructure Management and what's ne...
 
lecture13.ppt
lecture13.pptlecture13.ppt
lecture13.ppt
 
Cloud computing set 3
Cloud computing set 3Cloud computing set 3
Cloud computing set 3
 
Procedures and triggers in SQL
Procedures and triggers in SQLProcedures and triggers in SQL
Procedures and triggers in SQL
 
8 Key Elements to Modern IT Operations Management with a Digital Operations C...
8 Key Elements to Modern IT Operations Management with a Digital Operations C...8 Key Elements to Modern IT Operations Management with a Digital Operations C...
8 Key Elements to Modern IT Operations Management with a Digital Operations C...
 
Getting Started with Nastel AutoPilot Business Views and Policies - a Tutorial
Getting Started with Nastel AutoPilot Business Views and Policies - a TutorialGetting Started with Nastel AutoPilot Business Views and Policies - a Tutorial
Getting Started with Nastel AutoPilot Business Views and Policies - a Tutorial
 
Cbse computer science (c++) class 12 board project bank managment system
Cbse computer science (c++)  class 12 board project  bank managment systemCbse computer science (c++)  class 12 board project  bank managment system
Cbse computer science (c++) class 12 board project bank managment system
 
Tutorial 22 mastering olap reporting drilling through using mdx
Tutorial 22 mastering olap reporting drilling through using mdxTutorial 22 mastering olap reporting drilling through using mdx
Tutorial 22 mastering olap reporting drilling through using mdx
 
Proposed pricing model for cloud computing
Proposed pricing model for cloud computingProposed pricing model for cloud computing
Proposed pricing model for cloud computing
 
1.My Presentation.pptx
1.My Presentation.pptx1.My Presentation.pptx
1.My Presentation.pptx
 
Thesis1 3-23
Thesis1 3-23Thesis1 3-23
Thesis1 3-23
 
Synchronicity of a distributed financial system
Synchronicity of a distributed financial systemSynchronicity of a distributed financial system
Synchronicity of a distributed financial system
 
Smart Services & Smart Clients - How Microservices Change the Way You Build a...
Smart Services & Smart Clients - How Microservices Change the Way You Build a...Smart Services & Smart Clients - How Microservices Change the Way You Build a...
Smart Services & Smart Clients - How Microservices Change the Way You Build a...
 
WF_in_retail_banking_enterprise_systems
WF_in_retail_banking_enterprise_systemsWF_in_retail_banking_enterprise_systems
WF_in_retail_banking_enterprise_systems
 
Survey on reliable sla based monitoring for billing scheme in cloud computing
Survey on reliable sla based monitoring for billing scheme in cloud computingSurvey on reliable sla based monitoring for billing scheme in cloud computing
Survey on reliable sla based monitoring for billing scheme in cloud computing
 
Scheduling
SchedulingScheduling
Scheduling
 
Orwell Hortonworks Data Summit
Orwell Hortonworks Data SummitOrwell Hortonworks Data Summit
Orwell Hortonworks Data Summit
 
Sap tr um_dm_meter reading order reversal_v1.0
Sap tr um_dm_meter reading order reversal_v1.0Sap tr um_dm_meter reading order reversal_v1.0
Sap tr um_dm_meter reading order reversal_v1.0
 
Dependency injection - the right way
Dependency injection - the right wayDependency injection - the right way
Dependency injection - the right way
 
Proteus CMMS Overview
Proteus CMMS OverviewProteus CMMS Overview
Proteus CMMS Overview
 

More from Particular Software

More from Particular Software (20)

Scaling for Success: Lessons from handling peak loads on Azure with NServiceBus
Scaling for Success: Lessons from handling peak loads on Azure with NServiceBusScaling for Success: Lessons from handling peak loads on Azure with NServiceBus
Scaling for Success: Lessons from handling peak loads on Azure with NServiceBus
 
Beyond simple benchmarks—a practical guide to optimizing code
Beyond simple benchmarks—a practical guide to optimizing code Beyond simple benchmarks—a practical guide to optimizing code
Beyond simple benchmarks—a practical guide to optimizing code
 
An exception occurred - Please try again
An exception occurred - Please try againAn exception occurred - Please try again
An exception occurred - Please try again
 
Tales from the trenches creating complex distributed systems
Tales from the trenches  creating complex distributed systemsTales from the trenches  creating complex distributed systems
Tales from the trenches creating complex distributed systems
 
Got the time?
Got the time?Got the time?
Got the time?
 
Implementing outbox model-checking first
Implementing outbox   model-checking firstImplementing outbox   model-checking first
Implementing outbox model-checking first
 
Reports from the field azure functions in practice
Reports from the field   azure functions in practiceReports from the field   azure functions in practice
Reports from the field azure functions in practice
 
Finding your service boundaries - a practical guide
Finding your service boundaries - a practical guideFinding your service boundaries - a practical guide
Finding your service boundaries - a practical guide
 
Decomposing .NET Monoliths with NServiceBus and Docker
Decomposing .NET Monoliths with NServiceBus and DockerDecomposing .NET Monoliths with NServiceBus and Docker
Decomposing .NET Monoliths with NServiceBus and Docker
 
DIY Async Message Pump: Lessons from the trenches
DIY Async Message Pump: Lessons from the trenchesDIY Async Message Pump: Lessons from the trenches
DIY Async Message Pump: Lessons from the trenches
 
Share the insight of ServiceInsight
Share the insight of ServiceInsightShare the insight of ServiceInsight
Share the insight of ServiceInsight
 
What to consider when monitoring microservices
What to consider when monitoring microservicesWhat to consider when monitoring microservices
What to consider when monitoring microservices
 
Making communications across boundaries simple with NServiceBus
Making communications across boundaries simple with NServiceBusMaking communications across boundaries simple with NServiceBus
Making communications across boundaries simple with NServiceBus
 
Making communication across boundaries simple with Azure Service Bus
Making communication across boundaries simple with Azure Service BusMaking communication across boundaries simple with Azure Service Bus
Making communication across boundaries simple with Azure Service Bus
 
How to avoid microservice pitfalls
How to avoid microservice pitfallsHow to avoid microservice pitfalls
How to avoid microservice pitfalls
 
Connect front end to back end using SignalR and Messaging
Connect front end to back end using SignalR and MessagingConnect front end to back end using SignalR and Messaging
Connect front end to back end using SignalR and Messaging
 
Async/Await: NServiceBus v6 API Update
Async/Await: NServiceBus v6 API UpdateAsync/Await: NServiceBus v6 API Update
Async/Await: NServiceBus v6 API Update
 
Async/Await: TPL & Message Pumps
Async/Await: TPL & Message Pumps Async/Await: TPL & Message Pumps
Async/Await: TPL & Message Pumps
 
Async/Await Best Practices
Async/Await Best PracticesAsync/Await Best Practices
Async/Await Best Practices
 
Cqrs but different
Cqrs but differentCqrs but different
Cqrs but different
 

Recently uploaded

%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Recently uploaded (20)

%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 

Making workflow implementation easy with CQRS

  • 1. Andrea Saltarello @andysal74 CEO @ Managed Designs http://www.manageddesigns.it Making workflow implementation easy with CQRS
  • 2. Introduction to ServiceInsight for NServiceBusMaking workflow implementation easy with CQRS A workflow consists of an orchestrated and repeatable pattern of business activity enabled by the systematic organization of resources into processes that transform materials, provide services, or process information.[1] It can be depicted as a sequence of operations, declared as work of a person or group,[2] an organization of staff, or one or more simple or complex mechanisms. [Wikipedia]
  • 3. Introduction to ServiceInsight for NServiceBusMaking workflow implementation easy with CQRS A simple workflow: Invoicing Issue Payment Ship NotifyExpires IsPaid Collect No
  • 4. Introduction to ServiceInsight for NServiceBusMaking workflow implementation easy with CQRS A simple workflow: Invoicing Either a user or a scheduler fires code such as: public void NotifyCustomersAboutPertainingExpiredInvoices() { var expiredInvoices = from i in db.OutgoingInvoices where SomeClausesPointingToStillUnpaidExpiredInvoices select i; foreach(var invoice in expiredInvoices) { NotifyExpiredInvoiceToCustomer(invoice); } }
  • 5. Introduction to ServiceInsight for NServiceBusMaking workflow implementation easy with CQRS Enter CQRS Presentation layer Application layer Infrastructure layer Domain Model Domain layer Presentation layer Infrastructure layer CQRS Queries Data access Commands Application + Domain
  • 6. Introduction to ServiceInsight for NServiceBusMaking workflow implementation easy with CQRS Why CQRS? We faced a lot of complexity in modeling We thought it was inherent domain complexity Long story short: a single model caring about all aspects of the domain is hard. Enter CQS Command/Query Separation (cit. Bertrand Meyer – 1980s) Query > Returns data > Doesn’t alter state Command > Alter state > Doesn’t return data
  • 7. Introduction to ServiceInsight for NServiceBusMaking workflow implementation easy with CQRS CQRS in action As a business unit manager, I want to notify customers about expired invoices Database .OutgoingInvoices. .PerBusinessUnit(businessUnitId) .ExpiredOnly() .Select(i => new {InvoiceNumber = i.Number, CustomerId = i.Customer.Id}) .AsParallel() .ForAll(i => NotifyCustomer(i.InvoiceNumber, i.CustomerId));
  • 8. Introduction to ServiceInsight for NServiceBusMaking workflow implementation easy with CQRS The result Pros: • Easy to read • Close to Ubiquitous Language Cons: • Synchronous (lower scalability) • Either a scheduling engine or human interaction is required
  • 9. Introduction to ServiceInsight for NServiceBusMaking workflow implementation easy with CQRS Commands: a different strategy 1. Application sends a command to the system 2. Commands are dispatched to workflow managers (a.k.a. Sagas) which will execute them and then state success/failure accordingly 3. Responses are notified to interested subscribers (a.k.a. handlers) such as Denormalizers, which will (eventually) update the read model’s database Note: command/responses dispatch will be managed by a Mediator
  • 10. Introduction to ServiceInsight for NServiceBusMaking workflow implementation easy with CQRS CQRS in action, part 2 As a business unit manager, I want to notify customers about expired invoices Database .OutgoingInvoices. .PerBusinessUnit(businessUnitId) .ExpiredOnly() .Select(i => new {InvoiceNumber = i.Number, CustomerId = i.Customer.Id}) .AsParallel() .ForAll(i => mediator.Send(new NotifyPaymentDueCommand(i.InvoiceNumber, i.CustomerId)));
  • 11. Introduction to ServiceInsight for NServiceBusMaking workflow implementation easy with CQRS The result, part 2 Pros: • Easy to read • Close to Ubiquitous Language • Asynchronous Cons: • Either a scheduling engine or human interaction is required
  • 12. Introduction to ServiceInsight for NServiceBusMaking workflow implementation easy with CQRS Queues or buses? That is the question (semi cit. ) Although both categories are viable options and support common features (e.g.: message durability), a bus is generally preferable due to advanced capabilities (e.g.: message scheduling) Mediator, who art thou?
  • 13. Introduction to ServiceInsight for NServiceBusMaking workflow implementation easy with CQRS Sagas 1-2-3 In a messaging system, a saga orchestrate a set of messages. The main benefit of using a saga is that it allows us to manage the interaction in a stateful manner (easy to think and reason about) while actually working in a distributed and asynchronous environment. [Ayende] Though Saga are not proper workflow/process manager, they are effective at pretending to be 
  • 15. Introduction to ServiceInsight for NServiceBusMaking workflow implementation easy with CQRS More resources: • “Microsoft .NET: Architecting Applications for the Enterprise” by Andrea Saltarello and Dino Esposito, Microsoft Press (2014) • Merp (http://naa4e.codeplex.com) Links