SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

Microservices with Java, Spring Boot and Spring Cloud
Microservices with Java, Spring Boot and Spring CloudMicroservices with Java, Spring Boot and Spring Cloud
Microservices with Java, Spring Boot and Spring CloudEberhard Wolff
 
Gitops: a new paradigm for software defined operations
Gitops: a new paradigm for software defined operationsGitops: a new paradigm for software defined operations
Gitops: a new paradigm for software defined operationsMariano Cunietti
 
The Complete Guide to Service Mesh
The Complete Guide to Service MeshThe Complete Guide to Service Mesh
The Complete Guide to Service MeshAspen Mesh
 
Microservices with Spring Boot Tutorial | Edureka
Microservices with Spring Boot Tutorial | EdurekaMicroservices with Spring Boot Tutorial | Edureka
Microservices with Spring Boot Tutorial | EdurekaEdureka!
 
Microservices, Containers, Kubernetes, Kafka, Kanban
Microservices, Containers, Kubernetes, Kafka, KanbanMicroservices, Containers, Kubernetes, Kafka, Kanban
Microservices, Containers, Kubernetes, Kafka, KanbanAraf Karsh Hamid
 
GitOps is IaC done right
GitOps is IaC done rightGitOps is IaC done right
GitOps is IaC done rightChen Cheng-Wei
 
Microservices Part 3 Service Mesh and Kafka
Microservices Part 3 Service Mesh and KafkaMicroservices Part 3 Service Mesh and Kafka
Microservices Part 3 Service Mesh and KafkaAraf Karsh Hamid
 
Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopBob Killen
 
2019 DevSecOps Reference Architectures
2019 DevSecOps Reference Architectures2019 DevSecOps Reference Architectures
2019 DevSecOps Reference ArchitecturesSonatype
 
Deploy 22 microservices from scratch in 30 mins with GitOps
Deploy 22 microservices from scratch in 30 mins with GitOpsDeploy 22 microservices from scratch in 30 mins with GitOps
Deploy 22 microservices from scratch in 30 mins with GitOpsOpsta
 
Introduction To Microservices
Introduction To MicroservicesIntroduction To Microservices
Introduction To MicroservicesLalit Kale
 
Istio : Service Mesh
Istio : Service MeshIstio : Service Mesh
Istio : Service MeshKnoldus Inc.
 
Kubernetes - introduction
Kubernetes - introductionKubernetes - introduction
Kubernetes - introductionSparkbit
 
Devops - Microservice and Kubernetes
Devops - Microservice and KubernetesDevops - Microservice and Kubernetes
Devops - Microservice and KubernetesNodeXperts
 
Serverless Architecture GCP In Production
Serverless Architecture GCP In ProductionServerless Architecture GCP In Production
Serverless Architecture GCP In ProductionOliver Fierro
 

Was ist angesagt? (20)

Microservices with Java, Spring Boot and Spring Cloud
Microservices with Java, Spring Boot and Spring CloudMicroservices with Java, Spring Boot and Spring Cloud
Microservices with Java, Spring Boot and Spring Cloud
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
 
Gitops: a new paradigm for software defined operations
Gitops: a new paradigm for software defined operationsGitops: a new paradigm for software defined operations
Gitops: a new paradigm for software defined operations
 
The Complete Guide to Service Mesh
The Complete Guide to Service MeshThe Complete Guide to Service Mesh
The Complete Guide to Service Mesh
 
Microservices with Spring Boot Tutorial | Edureka
Microservices with Spring Boot Tutorial | EdurekaMicroservices with Spring Boot Tutorial | Edureka
Microservices with Spring Boot Tutorial | Edureka
 
Microservices, Containers, Kubernetes, Kafka, Kanban
Microservices, Containers, Kubernetes, Kafka, KanbanMicroservices, Containers, Kubernetes, Kafka, Kanban
Microservices, Containers, Kubernetes, Kafka, Kanban
 
GitOps is IaC done right
GitOps is IaC done rightGitOps is IaC done right
GitOps is IaC done right
 
Microservices Part 3 Service Mesh and Kafka
Microservices Part 3 Service Mesh and KafkaMicroservices Part 3 Service Mesh and Kafka
Microservices Part 3 Service Mesh and Kafka
 
Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes Workshop
 
DevOps introduction
DevOps introductionDevOps introduction
DevOps introduction
 
2019 DevSecOps Reference Architectures
2019 DevSecOps Reference Architectures2019 DevSecOps Reference Architectures
2019 DevSecOps Reference Architectures
 
Deploy 22 microservices from scratch in 30 mins with GitOps
Deploy 22 microservices from scratch in 30 mins with GitOpsDeploy 22 microservices from scratch in 30 mins with GitOps
Deploy 22 microservices from scratch in 30 mins with GitOps
 
Domain Driven Design
Domain Driven Design Domain Driven Design
Domain Driven Design
 
Introduction To Microservices
Introduction To MicroservicesIntroduction To Microservices
Introduction To Microservices
 
Istio : Service Mesh
Istio : Service MeshIstio : Service Mesh
Istio : Service Mesh
 
"DevOps > CI+CD "
"DevOps > CI+CD ""DevOps > CI+CD "
"DevOps > CI+CD "
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Kubernetes - introduction
Kubernetes - introductionKubernetes - introduction
Kubernetes - introduction
 
Devops - Microservice and Kubernetes
Devops - Microservice and KubernetesDevops - Microservice and Kubernetes
Devops - Microservice and Kubernetes
 
Serverless Architecture GCP In Production
Serverless Architecture GCP In ProductionServerless Architecture GCP In Production
Serverless Architecture GCP In Production
 

Andere mochten auch

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
 
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
 

Andere mochten auch (20)

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
 
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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

%+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
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...masabamasaba
 
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...WSO2
 
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
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in sowetomasabamasaba
 
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...WSO2
 
%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
 
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
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Hararemasabamasaba
 
%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 Stilfonteinmasabamasaba
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 

Kürzlich hochgeladen (20)

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
%+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...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
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...
 
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
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
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...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
%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
 
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...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
%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
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 

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

Hinweis der Redaktion

  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