SlideShare a Scribd company logo
1 of 31
Distributing
Transactions
Chris Patterson
Fellow
McKesson
Chris Patterson
• Principal Architect, Fellow
RelayHealth Intelligence, a part of McKesson
• Microsoft MVP (C#, .NET)
• Open Source Enthusiast
Begin Conversation
• Deconstructing transactions into activities
• Orchestrating activities into a distributed transaction
• Tracking distributed transactions
Using Transactions For Good
• Atomic completion of operations
• Consistency maintained when systems fail
• Isolation from concurrent operations
• Durability when crashes occur
Taking Transactions Too Far
• Combining two separate transactions using a
distributed transaction coordinator
• Calling high latency services during a
transaction
• Using triggers inside a transaction
Creating Inconsistency
Reserve Seat
Process
Payment
Reservation
Web Site
Deconstructing a Transaction
• A transaction is a sequence of activities that
complete entirely, or not at all
Defining an Activity
• An activity should have a single responsibility
• An activity may have explicit input arguments
• An activity may produce output variables
• An activity may update an activity log
Creating an Activity
• An activity should be an autonomous service
Topshelf
is an open source framework for creating and deploying .NET services.
Creating an Activity
• An activity should be an autonomous service
• An activity should use asynchronous endpoints
for availability
• An activity should use durable messaging for
reliability
• An activity should be load balanced for
scalability
MassTransit
is a free, open-source distributed application framework for .NET.
MassTransit makes it easy to create applications and services which
leverage message-based, loosely-coupled asynchronous communication
for higher availability, reliability, and scalability.
Creating an Itinerary
• An itinerary is a list of activities to be executed
Executing an Itinerary
• An itinerary is executed using a routing slip
• A routing slip is a workspace for a distributed
transaction
The analogy to a paper routing slip
is both obvious and intentional
Creating a Routing Slip
• Activities can be added to the
itinerary
• Variables may be added to the
routing slip
Executing a Routing Slip
• A routing slip is sent to the execute
address of the first activity
• A routing slip with an empty
itinerary completes immediately
Executing an Activity
• An activity is executed using the arguments from
the itinerary
• An activity’s arguments may be read from the
routing slip variables
Completing an Activity
• A completed activity sends the routing slip to the
next activity in the itinerary
• A completed activity may add or update variables
in the routing slip
• A completed activity may add an activity log to
the routing slip
Completing a Routing Slip
• The routing slip completes when every activity
has completed
Publishing Events
Activity
RoutingSlip
Activity
Faulted
RoutingSlip
Activity
Completed
RoutingSlip Execute Activity
throw Exception
Next Activity
Endpoint
If More Activities
Completed
RoutingSlip
Completed
If Last Activity
Faulting an Activity
• A faulted activity sends the routing
slip to the compensate address of the
last activity log
• A routing slip with no activity log
entries faults immediately
Compensating an Activity
• A previously completed activity is
compensated using the activity log
from the routing slip
• A previously completed activity that
faults during compensation fails the
routing slip
Revising an Itinerary
• A completed activity may revise the itinerary
• A completed activity may terminate the routing
slip
Tracking a Routing Slip
• A routing slip has a unique identifier
• An event is published when a routing slip is
completed, faulted, or when a routing slip
compensation fails
• An event is published when a routing slip
itinerary is revised
• An event is published when a routing slip is
terminated
Tracking an Activity
• An activity execution has a unique identifier
• An event is published when an activity is
completed, faulted, compensated, or when an
activity compensation fails
Monitoring a Routing Slip
• A state machine observes routing slip events to
track the status of a routing slip
Monitoring a Distributed Transaction
• A state machine maintains separate instances for
each transaction
• A state machine monitors transaction creation
events
• A state machine monitors routing slip events to
determine when a transaction is completed or
faulted
Identifying a Distributed Transaction
• A transaction has a unique identifier
• A routing slip event includes the transaction
identifier
• A transaction event includes the transaction
identifier
Retrying Faulted Transactions
• A retry state machine observes transaction fault
events
• A retry state machine can coordinate additional
transaction attempts
• A retry state machine may use a retry policy to
determine a retry schedule for any additional
transaction attempts
Learning Resources
MassTransit
• Main Project Site
 http://masstransit-project.com
• Documentation Site
 http://docs.masstransit-project.com
• Source Browser
 http://source.masstransit-project.com
• GitHub Repository
 https://github.com/MassTransit
• Build Server
 https://ci.appveyor.com/project/phatboyg/masstransit

More Related Content

What's hot

CQRS: Command/Query Responsibility Segregation
CQRS: Command/Query Responsibility SegregationCQRS: Command/Query Responsibility Segregation
CQRS: Command/Query Responsibility SegregationBrian Ritchie
 
Introduction to Microservices Patterns
Introduction to Microservices PatternsIntroduction to Microservices Patterns
Introduction to Microservices PatternsDimosthenis Botsaris
 
Event-driven architecture
Event-driven architectureEvent-driven architecture
Event-driven architectureAndrew Easter
 
Event Driven Software Architecture Pattern
Event Driven Software Architecture PatternEvent Driven Software Architecture Pattern
Event Driven Software Architecture Patternjeetendra mandal
 
Orchestration Patterns for Microservices with Messaging by RabbitMQ
Orchestration Patterns for Microservices with Messaging by RabbitMQOrchestration Patterns for Microservices with Messaging by RabbitMQ
Orchestration Patterns for Microservices with Messaging by RabbitMQVMware Tanzu
 
Microservices Architecture Part 2 Event Sourcing and Saga
Microservices Architecture Part 2 Event Sourcing and SagaMicroservices Architecture Part 2 Event Sourcing and Saga
Microservices Architecture Part 2 Event Sourcing and SagaAraf Karsh Hamid
 
Async Messaging in CQRS: Part 1 - Masstransit + DDD Intro
Async Messaging in CQRS: Part 1 - Masstransit + DDD IntroAsync Messaging in CQRS: Part 1 - Masstransit + DDD Intro
Async Messaging in CQRS: Part 1 - Masstransit + DDD IntroGeorge Tourkas
 
ROSIK Stammtisch „Clean Architecture“
ROSIK Stammtisch „Clean Architecture“ROSIK Stammtisch „Clean Architecture“
ROSIK Stammtisch „Clean Architecture“QAware GmbH
 
CQRS + Event Sourcing
CQRS + Event SourcingCQRS + Event Sourcing
CQRS + Event SourcingMike Bild
 
Microservices Design Patterns
Microservices Design PatternsMicroservices Design Patterns
Microservices Design PatternsHaim Michael
 
Cloud native integration
Cloud native integrationCloud native integration
Cloud native integrationKim Clark
 
Introduction to Event Driven Architecture
Introduction to Event Driven ArchitectureIntroduction to Event Driven Architecture
Introduction to Event Driven ArchitectureCitiusTech
 
Data Center Migration to the AWS Cloud
Data Center Migration to the AWS CloudData Center Migration to the AWS Cloud
Data Center Migration to the AWS CloudTom Laszewski
 
Microservices architecture overview v2
Microservices architecture overview v2Microservices architecture overview v2
Microservices architecture overview v2Dmitry Skaredov
 

What's hot (20)

CQRS: Command/Query Responsibility Segregation
CQRS: Command/Query Responsibility SegregationCQRS: Command/Query Responsibility Segregation
CQRS: Command/Query Responsibility Segregation
 
Introduction to Microservices Patterns
Introduction to Microservices PatternsIntroduction to Microservices Patterns
Introduction to Microservices Patterns
 
Event-driven architecture
Event-driven architectureEvent-driven architecture
Event-driven architecture
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
 
Event Driven Software Architecture Pattern
Event Driven Software Architecture PatternEvent Driven Software Architecture Pattern
Event Driven Software Architecture Pattern
 
Orchestration Patterns for Microservices with Messaging by RabbitMQ
Orchestration Patterns for Microservices with Messaging by RabbitMQOrchestration Patterns for Microservices with Messaging by RabbitMQ
Orchestration Patterns for Microservices with Messaging by RabbitMQ
 
Event Storming and Saga
Event Storming and SagaEvent Storming and Saga
Event Storming and Saga
 
Microservices Architecture Part 2 Event Sourcing and Saga
Microservices Architecture Part 2 Event Sourcing and SagaMicroservices Architecture Part 2 Event Sourcing and Saga
Microservices Architecture Part 2 Event Sourcing and Saga
 
12-Factor Apps
12-Factor Apps12-Factor Apps
12-Factor Apps
 
Async Messaging in CQRS: Part 1 - Masstransit + DDD Intro
Async Messaging in CQRS: Part 1 - Masstransit + DDD IntroAsync Messaging in CQRS: Part 1 - Masstransit + DDD Intro
Async Messaging in CQRS: Part 1 - Masstransit + DDD Intro
 
Microservices
MicroservicesMicroservices
Microservices
 
ROSIK Stammtisch „Clean Architecture“
ROSIK Stammtisch „Clean Architecture“ROSIK Stammtisch „Clean Architecture“
ROSIK Stammtisch „Clean Architecture“
 
CQRS + Event Sourcing
CQRS + Event SourcingCQRS + Event Sourcing
CQRS + Event Sourcing
 
Microservices Design Patterns
Microservices Design PatternsMicroservices Design Patterns
Microservices Design Patterns
 
Cloud native integration
Cloud native integrationCloud native integration
Cloud native integration
 
Introduction to Event Driven Architecture
Introduction to Event Driven ArchitectureIntroduction to Event Driven Architecture
Introduction to Event Driven Architecture
 
Data Center Migration to the AWS Cloud
Data Center Migration to the AWS CloudData Center Migration to the AWS Cloud
Data Center Migration to the AWS Cloud
 
Microservices architecture overview v2
Microservices architecture overview v2Microservices architecture overview v2
Microservices architecture overview v2
 
Cloud managed services offerings
Cloud managed services offerings Cloud managed services offerings
Cloud managed services offerings
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 

Viewers also liked

Event Driven Architecture at NDDNUG
Event Driven Architecture at NDDNUGEvent Driven Architecture at NDDNUG
Event Driven Architecture at NDDNUGChris Patterson
 
Event Driven Architecture
Event Driven ArchitectureEvent Driven Architecture
Event Driven ArchitectureChris Patterson
 
Dropping ACID - Building Scalable Systems That Work
Dropping ACID - Building Scalable Systems That WorkDropping ACID - Building Scalable Systems That Work
Dropping ACID - Building Scalable Systems That WorkChris Patterson
 
Towards the Cloud: Event-driven Architectures in PHP
Towards the Cloud: Event-driven Architectures in PHPTowards the Cloud: Event-driven Architectures in PHP
Towards the Cloud: Event-driven Architectures in PHPBenjamin Eberlei
 
Яков Повар "Системы обмена сообщениями на примере MassTransit"
Яков Повар "Системы обмена сообщениями на примере MassTransit"Яков Повар "Системы обмена сообщениями на примере MassTransit"
Яков Повар "Системы обмена сообщениями на примере MassTransit"Yulia Tsisyk
 
Cloud computing for agent based urban transportation system vinayss
Cloud computing for agent based urban transportation system vinayssCloud computing for agent based urban transportation system vinayss
Cloud computing for agent based urban transportation system vinayssVinay Sirivara
 
NServiceBus Mule ESB Comparison
NServiceBus Mule ESB ComparisonNServiceBus Mule ESB Comparison
NServiceBus Mule ESB ComparisonMike Byrne
 
Mass transit system
Mass transit systemMass transit system
Mass transit systemAsjad Khuram
 
CQRS and Event Sourcing with Akka, Cassandra and RabbitMQ
CQRS and Event Sourcing with Akka, Cassandra and RabbitMQCQRS and Event Sourcing with Akka, Cassandra and RabbitMQ
CQRS and Event Sourcing with Akka, Cassandra and RabbitMQMiel Donkers
 
codecentric AG: CQRS and Event Sourcing Applications with Cassandra
codecentric AG: CQRS and Event Sourcing Applications with Cassandracodecentric AG: CQRS and Event Sourcing Applications with Cassandra
codecentric AG: CQRS and Event Sourcing Applications with CassandraDataStax Academy
 
DDD Framework for Java: JdonFramework
DDD Framework for Java: JdonFrameworkDDD Framework for Java: JdonFramework
DDD Framework for Java: JdonFrameworkbanq jdon
 
CQRS and Event Sourcing for Java Developers
CQRS and Event Sourcing for Java DevelopersCQRS and Event Sourcing for Java Developers
CQRS and Event Sourcing for Java DevelopersMarkus Eisele
 
Sky bus
Sky busSky bus
Sky busJNTU
 
Event Driven Architecture
Event Driven ArchitectureEvent Driven Architecture
Event Driven ArchitectureStefan Norberg
 

Viewers also liked (19)

Event Driven Architecture at NDDNUG
Event Driven Architecture at NDDNUGEvent Driven Architecture at NDDNUG
Event Driven Architecture at NDDNUG
 
Event Driven Architecture
Event Driven ArchitectureEvent Driven Architecture
Event Driven Architecture
 
Mass Transit
Mass TransitMass Transit
Mass Transit
 
Dropping ACID - Building Scalable Systems That Work
Dropping ACID - Building Scalable Systems That WorkDropping ACID - Building Scalable Systems That Work
Dropping ACID - Building Scalable Systems That Work
 
Towards the Cloud: Event-driven Architectures in PHP
Towards the Cloud: Event-driven Architectures in PHPTowards the Cloud: Event-driven Architectures in PHP
Towards the Cloud: Event-driven Architectures in PHP
 
Яков Повар "Системы обмена сообщениями на примере MassTransit"
Яков Повар "Системы обмена сообщениями на примере MassTransit"Яков Повар "Системы обмена сообщениями на примере MassTransit"
Яков Повар "Системы обмена сообщениями на примере MassTransit"
 
Urban transportation
Urban transportationUrban transportation
Urban transportation
 
Cloud computing for agent based urban transportation system vinayss
Cloud computing for agent based urban transportation system vinayssCloud computing for agent based urban transportation system vinayss
Cloud computing for agent based urban transportation system vinayss
 
NServiceBus Mule ESB Comparison
NServiceBus Mule ESB ComparisonNServiceBus Mule ESB Comparison
NServiceBus Mule ESB Comparison
 
Utp
UtpUtp
Utp
 
Mass transit system
Mass transit systemMass transit system
Mass transit system
 
Mass transit system
Mass transit systemMass transit system
Mass transit system
 
CQRS and Event Sourcing with Akka, Cassandra and RabbitMQ
CQRS and Event Sourcing with Akka, Cassandra and RabbitMQCQRS and Event Sourcing with Akka, Cassandra and RabbitMQ
CQRS and Event Sourcing with Akka, Cassandra and RabbitMQ
 
sky bus
sky bussky bus
sky bus
 
codecentric AG: CQRS and Event Sourcing Applications with Cassandra
codecentric AG: CQRS and Event Sourcing Applications with Cassandracodecentric AG: CQRS and Event Sourcing Applications with Cassandra
codecentric AG: CQRS and Event Sourcing Applications with Cassandra
 
DDD Framework for Java: JdonFramework
DDD Framework for Java: JdonFrameworkDDD Framework for Java: JdonFramework
DDD Framework for Java: JdonFramework
 
CQRS and Event Sourcing for Java Developers
CQRS and Event Sourcing for Java DevelopersCQRS and Event Sourcing for Java Developers
CQRS and Event Sourcing for Java Developers
 
Sky bus
Sky busSky bus
Sky bus
 
Event Driven Architecture
Event Driven ArchitectureEvent Driven Architecture
Event Driven Architecture
 

Similar to Distributing Transactions using MassTransit

Patterns of Distributed Application Design
Patterns of Distributed Application DesignPatterns of Distributed Application Design
Patterns of Distributed Application DesignOrkhan Gasimov
 
Patterns of Distributed Application Design
Patterns of Distributed Application DesignPatterns of Distributed Application Design
Patterns of Distributed Application DesignGlobalLogic Ukraine
 
Distributed Tracing at UBER Scale: Creating a treasure map for your monitori...
Distributed Tracing at UBER Scale: Creating a treasure map for your monitori...Distributed Tracing at UBER Scale: Creating a treasure map for your monitori...
Distributed Tracing at UBER Scale: Creating a treasure map for your monitori...Yuri Shkuro
 
Introduction To Windows Workflow Foundation 4.0
Introduction To Windows Workflow Foundation 4.0Introduction To Windows Workflow Foundation 4.0
Introduction To Windows Workflow Foundation 4.0Melick Baranasooriya
 
Data Microservices with Spring Cloud
Data Microservices with Spring CloudData Microservices with Spring Cloud
Data Microservices with Spring CloudOrkhan Gasimov
 
Process Orchestration with Flowable and Spring Boot
Process Orchestration with Flowable and Spring BootProcess Orchestration with Flowable and Spring Boot
Process Orchestration with Flowable and Spring BootChavdar Baikov
 
Netty Notes Part 3 - Channel Pipeline and EventLoops
Netty Notes Part 3 - Channel Pipeline and EventLoopsNetty Notes Part 3 - Channel Pipeline and EventLoops
Netty Notes Part 3 - Channel Pipeline and EventLoopsRick Hightower
 
Flux - An open sourced Workflow orchestrator from Flipkart
Flux - An open sourced Workflow orchestrator from FlipkartFlux - An open sourced Workflow orchestrator from Flipkart
Flux - An open sourced Workflow orchestrator from FlipkartShyam Kumar Akirala
 
Logic Apps Exception Management - Azure Lunchtime
Logic Apps Exception Management - Azure LunchtimeLogic Apps Exception Management - Azure Lunchtime
Logic Apps Exception Management - Azure LunchtimeWagner Silveira
 
Building a document e-signing workflow with Azure Durable Functions
Building a document e-signing workflow with Azure Durable FunctionsBuilding a document e-signing workflow with Azure Durable Functions
Building a document e-signing workflow with Azure Durable FunctionsJoonas Westlin
 
Mule enterprise service bus
Mule enterprise service busMule enterprise service bus
Mule enterprise service busThang Loi
 
Custom Software development for Small Parcel Logistic Company, CRM Solutions
Custom Software development for Small Parcel Logistic Company, CRM SolutionsCustom Software development for Small Parcel Logistic Company, CRM Solutions
Custom Software development for Small Parcel Logistic Company, CRM SolutionsImrajesht
 
Serena Release Management approach and solutions
Serena Release Management approach and solutionsSerena Release Management approach and solutions
Serena Release Management approach and solutionsSoftmart
 
How to Structure Your Xamarin Solution by Adhering to Common .NET Practices -...
How to Structure Your Xamarin Solution by Adhering to Common .NET Practices -...How to Structure Your Xamarin Solution by Adhering to Common .NET Practices -...
How to Structure Your Xamarin Solution by Adhering to Common .NET Practices -...chaturanga ranatunga
 
SharePoint Migration-What you need to know
SharePoint Migration-What you need to knowSharePoint Migration-What you need to know
SharePoint Migration-What you need to knowOliver Wirkus
 
Nintex Promapp Product Roadmap
Nintex Promapp Product RoadmapNintex Promapp Product Roadmap
Nintex Promapp Product RoadmapEileenTan67
 

Similar to Distributing Transactions using MassTransit (20)

Patterns of Distributed Application Design
Patterns of Distributed Application DesignPatterns of Distributed Application Design
Patterns of Distributed Application Design
 
Patterns of Distributed Application Design
Patterns of Distributed Application DesignPatterns of Distributed Application Design
Patterns of Distributed Application Design
 
BPMN
BPMNBPMN
BPMN
 
Distributed Tracing at UBER Scale: Creating a treasure map for your monitori...
Distributed Tracing at UBER Scale: Creating a treasure map for your monitori...Distributed Tracing at UBER Scale: Creating a treasure map for your monitori...
Distributed Tracing at UBER Scale: Creating a treasure map for your monitori...
 
Introduction To Windows Workflow Foundation 4.0
Introduction To Windows Workflow Foundation 4.0Introduction To Windows Workflow Foundation 4.0
Introduction To Windows Workflow Foundation 4.0
 
Data Microservices with Spring Cloud
Data Microservices with Spring CloudData Microservices with Spring Cloud
Data Microservices with Spring Cloud
 
Process Orchestration with Flowable and Spring Boot
Process Orchestration with Flowable and Spring BootProcess Orchestration with Flowable and Spring Boot
Process Orchestration with Flowable and Spring Boot
 
Netty Notes Part 3 - Channel Pipeline and EventLoops
Netty Notes Part 3 - Channel Pipeline and EventLoopsNetty Notes Part 3 - Channel Pipeline and EventLoops
Netty Notes Part 3 - Channel Pipeline and EventLoops
 
Flux - An open sourced Workflow orchestrator from Flipkart
Flux - An open sourced Workflow orchestrator from FlipkartFlux - An open sourced Workflow orchestrator from Flipkart
Flux - An open sourced Workflow orchestrator from Flipkart
 
Logic Apps Exception Management - Azure Lunchtime
Logic Apps Exception Management - Azure LunchtimeLogic Apps Exception Management - Azure Lunchtime
Logic Apps Exception Management - Azure Lunchtime
 
Building a document e-signing workflow with Azure Durable Functions
Building a document e-signing workflow with Azure Durable FunctionsBuilding a document e-signing workflow with Azure Durable Functions
Building a document e-signing workflow with Azure Durable Functions
 
Mule enterprise service bus
Mule enterprise service busMule enterprise service bus
Mule enterprise service bus
 
Custom Software development for Small Parcel Logistic Company, CRM Solutions
Custom Software development for Small Parcel Logistic Company, CRM SolutionsCustom Software development for Small Parcel Logistic Company, CRM Solutions
Custom Software development for Small Parcel Logistic Company, CRM Solutions
 
Serena Release Management approach and solutions
Serena Release Management approach and solutionsSerena Release Management approach and solutions
Serena Release Management approach and solutions
 
How to Structure Your Xamarin Solution by Adhering to Common .NET Practices -...
How to Structure Your Xamarin Solution by Adhering to Common .NET Practices -...How to Structure Your Xamarin Solution by Adhering to Common .NET Practices -...
How to Structure Your Xamarin Solution by Adhering to Common .NET Practices -...
 
Mule overview
Mule overviewMule overview
Mule overview
 
Mule Overview
Mule OverviewMule Overview
Mule Overview
 
Mule overview
Mule overviewMule overview
Mule overview
 
SharePoint Migration-What you need to know
SharePoint Migration-What you need to knowSharePoint Migration-What you need to know
SharePoint Migration-What you need to know
 
Nintex Promapp Product Roadmap
Nintex Promapp Product RoadmapNintex Promapp Product Roadmap
Nintex Promapp Product Roadmap
 

Recently uploaded

Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
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...Shane Coughlan
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedDelhi Call girls
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ
 
%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 masabamasaba
 
%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 Bahrainmasabamasaba
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...kalichargn70th171
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 

Recently uploaded (20)

Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
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...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide Deck
 
%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
 
%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
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 

Distributing Transactions using MassTransit

  • 2. Chris Patterson • Principal Architect, Fellow RelayHealth Intelligence, a part of McKesson • Microsoft MVP (C#, .NET) • Open Source Enthusiast
  • 3. Begin Conversation • Deconstructing transactions into activities • Orchestrating activities into a distributed transaction • Tracking distributed transactions
  • 4. Using Transactions For Good • Atomic completion of operations • Consistency maintained when systems fail • Isolation from concurrent operations • Durability when crashes occur
  • 5. Taking Transactions Too Far • Combining two separate transactions using a distributed transaction coordinator • Calling high latency services during a transaction • Using triggers inside a transaction
  • 7. Deconstructing a Transaction • A transaction is a sequence of activities that complete entirely, or not at all
  • 8. Defining an Activity • An activity should have a single responsibility • An activity may have explicit input arguments • An activity may produce output variables • An activity may update an activity log
  • 9. Creating an Activity • An activity should be an autonomous service
  • 10. Topshelf is an open source framework for creating and deploying .NET services.
  • 11. Creating an Activity • An activity should be an autonomous service • An activity should use asynchronous endpoints for availability • An activity should use durable messaging for reliability • An activity should be load balanced for scalability
  • 12. MassTransit is a free, open-source distributed application framework for .NET. MassTransit makes it easy to create applications and services which leverage message-based, loosely-coupled asynchronous communication for higher availability, reliability, and scalability.
  • 13. Creating an Itinerary • An itinerary is a list of activities to be executed
  • 14. Executing an Itinerary • An itinerary is executed using a routing slip • A routing slip is a workspace for a distributed transaction The analogy to a paper routing slip is both obvious and intentional
  • 15. Creating a Routing Slip • Activities can be added to the itinerary • Variables may be added to the routing slip
  • 16. Executing a Routing Slip • A routing slip is sent to the execute address of the first activity • A routing slip with an empty itinerary completes immediately
  • 17. Executing an Activity • An activity is executed using the arguments from the itinerary • An activity’s arguments may be read from the routing slip variables
  • 18. Completing an Activity • A completed activity sends the routing slip to the next activity in the itinerary • A completed activity may add or update variables in the routing slip • A completed activity may add an activity log to the routing slip
  • 19. Completing a Routing Slip • The routing slip completes when every activity has completed
  • 20. Publishing Events Activity RoutingSlip Activity Faulted RoutingSlip Activity Completed RoutingSlip Execute Activity throw Exception Next Activity Endpoint If More Activities Completed RoutingSlip Completed If Last Activity
  • 21. Faulting an Activity • A faulted activity sends the routing slip to the compensate address of the last activity log • A routing slip with no activity log entries faults immediately
  • 22. Compensating an Activity • A previously completed activity is compensated using the activity log from the routing slip • A previously completed activity that faults during compensation fails the routing slip
  • 23. Revising an Itinerary • A completed activity may revise the itinerary • A completed activity may terminate the routing slip
  • 24. Tracking a Routing Slip • A routing slip has a unique identifier • An event is published when a routing slip is completed, faulted, or when a routing slip compensation fails • An event is published when a routing slip itinerary is revised • An event is published when a routing slip is terminated
  • 25. Tracking an Activity • An activity execution has a unique identifier • An event is published when an activity is completed, faulted, compensated, or when an activity compensation fails
  • 26. Monitoring a Routing Slip • A state machine observes routing slip events to track the status of a routing slip
  • 27. Monitoring a Distributed Transaction • A state machine maintains separate instances for each transaction • A state machine monitors transaction creation events • A state machine monitors routing slip events to determine when a transaction is completed or faulted
  • 28. Identifying a Distributed Transaction • A transaction has a unique identifier • A routing slip event includes the transaction identifier • A transaction event includes the transaction identifier
  • 29. Retrying Faulted Transactions • A retry state machine observes transaction fault events • A retry state machine can coordinate additional transaction attempts • A retry state machine may use a retry policy to determine a retry schedule for any additional transaction attempts
  • 31. MassTransit • Main Project Site  http://masstransit-project.com • Documentation Site  http://docs.masstransit-project.com • Source Browser  http://source.masstransit-project.com • GitHub Repository  https://github.com/MassTransit • Build Server  https://ci.appveyor.com/project/phatboyg/masstransit

Editor's Notes

  1. In the event of a system failure, a transaction can maintain data consistency by rolling back incomplete operations. Supported by most databases, at least SQL ones. Distributed database make concessions in many areas.
  2. Or, how I came to hate the MS-DTC.
  3. Two separate services without a transaction coordinator results in reservations that are not paid.
  4. While transactions are a feature of any ACID SQL database, scalability issues are frequently solved by relaxing consistency levels, which may increase concurrency and/or reduce contention.
  5. We could create an activity as an RPC service that is called by an application or service.
  6. We could create an activity as an RPC service that is called by an application or service.
  7. This eliminates the need for a hub-and-spoke style where each activity executes and then returns to a central coordinator
  8. Variables are the state of the routing slip.
  9. There is nothing to compensate, so it’s over.
  10. Convert a token stream and send to a search engine (elastic search) Events include that tracking number
  11. Executing, Completed, Faulted
  12. ConversationId for transaction identifier CorrelationId for routing slip identifier
  13. Remember, all of the inputs required to complete the transaction are available at the start