SlideShare ist ein Scribd-Unternehmen logo
1 von 31
Downloaden Sie, um offline zu lesen
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?

Introduction to Event-Driven Architecture
Introduction to Event-Driven Architecture Introduction to Event-Driven Architecture
Introduction to Event-Driven Architecture Solace
 
Micro services Architecture
Micro services ArchitectureMicro services Architecture
Micro services ArchitectureAraf Karsh Hamid
 
Azure API Management
Azure API ManagementAzure API Management
Azure API ManagementDaniel Toomey
 
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
 
Event Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQEvent Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQAraf Karsh Hamid
 
Introduction To RabbitMQ
Introduction To RabbitMQIntroduction To RabbitMQ
Introduction To RabbitMQKnoldus Inc.
 
ITLC HN 14 - Bizweb Microservices Architecture
ITLC HN 14  - Bizweb Microservices ArchitectureITLC HN 14  - Bizweb Microservices Architecture
ITLC HN 14 - Bizweb Microservices ArchitectureIT Expert Club
 
How Uber scaled its Real Time Infrastructure to Trillion events per day
How Uber scaled its Real Time Infrastructure to Trillion events per dayHow Uber scaled its Real Time Infrastructure to Trillion events per day
How Uber scaled its Real Time Infrastructure to Trillion events per dayDataWorks Summit
 
Introducing Saga Pattern in Microservices with Spring Statemachine
Introducing Saga Pattern in Microservices with Spring StatemachineIntroducing Saga Pattern in Microservices with Spring Statemachine
Introducing Saga Pattern in Microservices with Spring StatemachineVMware Tanzu
 
[WSO2 Summit EMEA 2020] Building an Interactive API Marketplace
[WSO2 Summit EMEA 2020] Building an Interactive API Marketplace[WSO2 Summit EMEA 2020] Building an Interactive API Marketplace
[WSO2 Summit EMEA 2020] Building an Interactive API MarketplaceWSO2
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservicesAnil Allewar
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecturetyrantbrian
 
Agile, User Stories, Domain Driven Design
Agile, User Stories, Domain Driven DesignAgile, User Stories, Domain Driven Design
Agile, User Stories, Domain Driven DesignAraf Karsh Hamid
 

Was ist angesagt? (20)

Introduction to Event-Driven Architecture
Introduction to Event-Driven Architecture Introduction to Event-Driven Architecture
Introduction to Event-Driven Architecture
 
LMAX Architecture
LMAX ArchitectureLMAX Architecture
LMAX Architecture
 
Micro services Architecture
Micro services ArchitectureMicro services Architecture
Micro services Architecture
 
Why Microservices
Why MicroservicesWhy Microservices
Why Microservices
 
Azure API Management
Azure API ManagementAzure API Management
Azure API Management
 
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
 
Kafka internals
Kafka internalsKafka internals
Kafka internals
 
Event Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQEvent Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQ
 
Introduction To RabbitMQ
Introduction To RabbitMQIntroduction To RabbitMQ
Introduction To RabbitMQ
 
Pub/Sub Messaging
Pub/Sub MessagingPub/Sub Messaging
Pub/Sub Messaging
 
Spring integration
Spring integrationSpring integration
Spring integration
 
ITLC HN 14 - Bizweb Microservices Architecture
ITLC HN 14  - Bizweb Microservices ArchitectureITLC HN 14  - Bizweb Microservices Architecture
ITLC HN 14 - Bizweb Microservices Architecture
 
How Uber scaled its Real Time Infrastructure to Trillion events per day
How Uber scaled its Real Time Infrastructure to Trillion events per dayHow Uber scaled its Real Time Infrastructure to Trillion events per day
How Uber scaled its Real Time Infrastructure to Trillion events per day
 
Introduction to MuleSoft
Introduction to MuleSoftIntroduction to MuleSoft
Introduction to MuleSoft
 
Introducing Saga Pattern in Microservices with Spring Statemachine
Introducing Saga Pattern in Microservices with Spring StatemachineIntroducing Saga Pattern in Microservices with Spring Statemachine
Introducing Saga Pattern in Microservices with Spring Statemachine
 
[WSO2 Summit EMEA 2020] Building an Interactive API Marketplace
[WSO2 Summit EMEA 2020] Building an Interactive API Marketplace[WSO2 Summit EMEA 2020] Building an Interactive API Marketplace
[WSO2 Summit EMEA 2020] Building an Interactive API Marketplace
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
 
Cloud Pub_Sub
Cloud Pub_SubCloud Pub_Sub
Cloud Pub_Sub
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
 
Agile, User Stories, Domain Driven Design
Agile, User Stories, Domain Driven DesignAgile, User Stories, Domain Driven Design
Agile, User Stories, Domain Driven Design
 

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
 
Sky bus
Sky busSky bus
Sky busJNTU
 
Event Driven Architecture
Event Driven ArchitectureEvent Driven Architecture
Event Driven ArchitectureStefan Norberg
 

Andere mochten auch (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
 
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
 
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

Fields in Java and Kotlin and what to expect.pptx
Fields in Java and Kotlin and what to expect.pptxFields in Java and Kotlin and what to expect.pptx
Fields in Java and Kotlin and what to expect.pptxJoão Esperancinha
 
Your Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software TeamsYour Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software TeamsJaydeep Chhasatia
 
eAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspectionseAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspectionsNirav Modi
 
Introduction-to-Software-Development-Outsourcing.pptx
Introduction-to-Software-Development-Outsourcing.pptxIntroduction-to-Software-Development-Outsourcing.pptx
Introduction-to-Software-Development-Outsourcing.pptxIntelliSource Technologies
 
Top Software Development Trends in 2024
Top Software Development Trends in  2024Top Software Development Trends in  2024
Top Software Development Trends in 2024Mind IT Systems
 
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmony
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine HarmonyLeveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmony
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmonyelliciumsolutionspun
 
Sales Territory Management: A Definitive Guide to Expand Sales Coverage
Sales Territory Management: A Definitive Guide to Expand Sales CoverageSales Territory Management: A Definitive Guide to Expand Sales Coverage
Sales Territory Management: A Definitive Guide to Expand Sales CoverageDista
 
online pdf editor software solutions.pdf
online pdf editor software solutions.pdfonline pdf editor software solutions.pdf
online pdf editor software solutions.pdfMeon Technology
 
Kawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in TrivandrumKawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in TrivandrumKawika Technologies
 
ERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptxERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptxAutus Cyber Tech
 
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdfARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdfTobias Schneck
 
Webinar_050417_LeClair12345666777889.ppt
Webinar_050417_LeClair12345666777889.pptWebinar_050417_LeClair12345666777889.ppt
Webinar_050417_LeClair12345666777889.pptkinjal48
 
Enterprise Document Management System - Qualityze Inc
Enterprise Document Management System - Qualityze IncEnterprise Document Management System - Qualityze Inc
Enterprise Document Management System - Qualityze Incrobinwilliams8624
 
20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.
20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.
20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.Sharon Liu
 
JS-Experts - Cybersecurity for Generative AI
JS-Experts - Cybersecurity for Generative AIJS-Experts - Cybersecurity for Generative AI
JS-Experts - Cybersecurity for Generative AIIvo Andreev
 
Deep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - DatacampDeep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - DatacampVICTOR MAESTRE RAMIREZ
 
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/MLBig Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/MLAlluxio, Inc.
 
Growing Oxen: channel operators and retries
Growing Oxen: channel operators and retriesGrowing Oxen: channel operators and retries
Growing Oxen: channel operators and retriesSoftwareMill
 
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...OnePlan Solutions
 
How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?AmeliaSmith90
 

Kürzlich hochgeladen (20)

Fields in Java and Kotlin and what to expect.pptx
Fields in Java and Kotlin and what to expect.pptxFields in Java and Kotlin and what to expect.pptx
Fields in Java and Kotlin and what to expect.pptx
 
Your Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software TeamsYour Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
 
eAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspectionseAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspections
 
Introduction-to-Software-Development-Outsourcing.pptx
Introduction-to-Software-Development-Outsourcing.pptxIntroduction-to-Software-Development-Outsourcing.pptx
Introduction-to-Software-Development-Outsourcing.pptx
 
Top Software Development Trends in 2024
Top Software Development Trends in  2024Top Software Development Trends in  2024
Top Software Development Trends in 2024
 
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmony
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine HarmonyLeveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmony
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmony
 
Sales Territory Management: A Definitive Guide to Expand Sales Coverage
Sales Territory Management: A Definitive Guide to Expand Sales CoverageSales Territory Management: A Definitive Guide to Expand Sales Coverage
Sales Territory Management: A Definitive Guide to Expand Sales Coverage
 
online pdf editor software solutions.pdf
online pdf editor software solutions.pdfonline pdf editor software solutions.pdf
online pdf editor software solutions.pdf
 
Kawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in TrivandrumKawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in Trivandrum
 
ERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptxERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptx
 
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdfARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
 
Webinar_050417_LeClair12345666777889.ppt
Webinar_050417_LeClair12345666777889.pptWebinar_050417_LeClair12345666777889.ppt
Webinar_050417_LeClair12345666777889.ppt
 
Enterprise Document Management System - Qualityze Inc
Enterprise Document Management System - Qualityze IncEnterprise Document Management System - Qualityze Inc
Enterprise Document Management System - Qualityze Inc
 
20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.
20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.
20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.
 
JS-Experts - Cybersecurity for Generative AI
JS-Experts - Cybersecurity for Generative AIJS-Experts - Cybersecurity for Generative AI
JS-Experts - Cybersecurity for Generative AI
 
Deep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - DatacampDeep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - Datacamp
 
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/MLBig Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
 
Growing Oxen: channel operators and retries
Growing Oxen: channel operators and retriesGrowing Oxen: channel operators and retries
Growing Oxen: channel operators and retries
 
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
 
How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?
 

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