SlideShare une entreprise Scribd logo
1  sur  34
SUM=90
BATCH JOB
WITH ct AS
(
SELECT
id = cid,
total = SUM(value)
FROM orders
WHERE date > …
GROUP BY cid
)
UPDATE c
SET c.Discount = 10
FROM customers AS c
INNER JOIN ct
ON c.id = ct.id
WHERE ct.total > …;
USE tempdb;
GO
DECLARE @x TABLE (ID int,
Value int);
DECLARE @y TABLE (ID int,
Value int);
INSERT @x VALUES (1, 10), (2,
20);
INSERT @y VALUES (1, 100),(2,
200);
WITH cte AS (SELECT * FROM
@x)
UPDATE cte -- cte is not
referenced by the alias.
SET Value = y.Value
FROM cte AS x -- cte is
assigned an alias.
INNER JOIN @y AS y ON y.ID =
x.ID;
SELECT * FROM @x;
GO
USE tempdb;
GO
-- UPDATE statement with CTE references
that are correctly matched.
DECLARE @x TABLE (ID int, Value int);
DECLARE @y TABLE (ID int, Value int);
INSERT @x VALUES (1, 10), (2, 20);
INSERT @y VALUES (1, 100),(2, 200);
WITH cte AS (SELECT * FROM @x)
UPDATE x -- cte is referenced by the
alias.
SET Value = y.Value
FROM cte AS x -- cte is assigned an
alias.
INNER JOIN @y AS y ON y.ID = x.ID;
SELECT * FROM @x;
GO
USE AdventureWorks2012;
GO
IF OBJECT_ID ('dbo.Table1', 'U') IS NOT NULL
DROP TABLE dbo.Table1;
GO
IF OBJECT_ID ('dbo.Table2', 'U') IS NOT NULL
DROP TABLE dbo.Table2;
GO
CREATE TABLE dbo.Table1
(c1 int PRIMARY KEY NOT NULL, c2 int NOT NULL);
GO
CREATE TABLE dbo.Table2
(d1 int PRIMARY KEY NOT NULL, d2 int NOT NULL);
GO
INSERT INTO dbo.Table1 VALUES (1, 10);
INSERT INTO dbo.Table2 VALUES (1, 20), (2, 30);
GO
DECLARE abc CURSOR LOCAL FOR
SELECT c1, c2
FROM dbo.Table1;
OPEN abc;
1 week
Sum(o => o.Total)
t
+= o1.Total
-= o1.Total
1 week
+= o2.Total
-= o2.Total
1 week
+= o3.Total
-= o3.Total
1 week
WeekTotal WeekTotal
t
SAGA
docs.particular.net/nservicebus/sagas/
+= o1.Total
-= o1.Total
1 week
+= o2.Total
-= o2.Total
1 week
+= o3.Total
-= o3.Total
1 week
WeekTotal WeekTotal
t
SHOW ME THE CODE
DB
BUS
SAGA
class Discounting :
Saga<Discounting.Data>
{
public async Task Handle(
SubmitOrder order)
{
...
}
...
}
Persist
er
dispatch message
queue
request timeout
persist timeout
delay
persist saga
poll
AMAZON SQS
600 s
900
2,800 s
100 s
900
900
(1,900)
(1,000)
(100)
RABBITMQ
600 s
900 s
1,500 s
2,800 s
RABBITMQ
RABBITMQ
42 seconds
1010102 seconds
4210 seconds
RABBITMQ
1
1
0
0
1
0
32 s
16 s
8 s
4 s
2 s
1 s
(4210)
RABBITMQ
28 queues
228 seconds
268,435,456 seconds
8.5 years
WT=90
DB
queue
BUS
SAGA
class OrderProcessPolicy : Saga<OrderProcess>
{
public async Task Handle(SubmitOrder order)
{
// ...
}
public async Task Handle(Cancel
{
// ..
}
public async Task Timeout(BuyersRemorse state)
{
// ...
}
}
Persi
ster
create saga
dispatch message
send messages
persist saga
BUS
SAGA
class OrderProcessPolicy : Saga<OrderProcess>
{
public async Task Handle(SubmitOrder order)
{
// ...
}
public async Task Handle(Cancel
{
// ..
}
public async Task Timeout(BuyersRemorse state)
{
// ...
}
}
Persi
ster
create saga
dispatch message
send messages
persist saga
persist saga
CustomerId = 1337
persist saga
CustomerId = 1337
message(s) sent message(s) not sent
message(s) sent
BATCH JOB
particular.net/blog/death-to-the-batch-job
Automated pattern matching
Daily reports
saga
notification
business events
go.particular.net/netfwdays
go.particular.net/
netfwdays
CODE THE FUTURE,
NOW

Contenu connexe

Similaire à "Making tomorrow's code look like today's", Adam Ralph

Oracle Advanced Dml
Oracle Advanced DmlOracle Advanced Dml
Oracle Advanced Dml
ssunka01
 
Using SQL Developer ONLY!Your assignment is to create an auditing .pdf
Using SQL Developer ONLY!Your assignment is to create an auditing .pdfUsing SQL Developer ONLY!Your assignment is to create an auditing .pdf
Using SQL Developer ONLY!Your assignment is to create an auditing .pdf
mohammedfootwear
 
Laziness, trampolines, monoids and other functional amenities: this is not yo...
Laziness, trampolines, monoids and other functional amenities: this is not yo...Laziness, trampolines, monoids and other functional amenities: this is not yo...
Laziness, trampolines, monoids and other functional amenities: this is not yo...
Mario Fusco
 
Kickstarting SItes With a Custom Package
Kickstarting SItes With a Custom PackageKickstarting SItes With a Custom Package
Kickstarting SItes With a Custom Package
Jeff Segars
 
Most useful queries
Most useful queriesMost useful queries
Most useful queries
Sam Depp
 

Similaire à "Making tomorrow's code look like today's", Adam Ralph (20)

Oracle Advanced Dml
Oracle Advanced DmlOracle Advanced Dml
Oracle Advanced Dml
 
JCalc:Calculations in java with open source API
JCalc:Calculations in java with open source APIJCalc:Calculations in java with open source API
JCalc:Calculations in java with open source API
 
Sql cheat-sheet
Sql cheat-sheetSql cheat-sheet
Sql cheat-sheet
 
Using SQL Developer ONLY!Your assignment is to create an auditing .pdf
Using SQL Developer ONLY!Your assignment is to create an auditing .pdfUsing SQL Developer ONLY!Your assignment is to create an auditing .pdf
Using SQL Developer ONLY!Your assignment is to create an auditing .pdf
 
Laziness, trampolines, monoids and other functional amenities: this is not yo...
Laziness, trampolines, monoids and other functional amenities: this is not yo...Laziness, trampolines, monoids and other functional amenities: this is not yo...
Laziness, trampolines, monoids and other functional amenities: this is not yo...
 
CUDA First Programs: Computer Architecture CSE448 : UAA Alaska : Notes
CUDA First Programs: Computer Architecture CSE448 : UAA Alaska : NotesCUDA First Programs: Computer Architecture CSE448 : UAA Alaska : Notes
CUDA First Programs: Computer Architecture CSE448 : UAA Alaska : Notes
 
Kickstarting SItes With a Custom Package
Kickstarting SItes With a Custom PackageKickstarting SItes With a Custom Package
Kickstarting SItes With a Custom Package
 
C++ TUTORIAL 5
C++ TUTORIAL 5C++ TUTORIAL 5
C++ TUTORIAL 5
 
MySQL 8.0 NF : Common Table Expressions (CTE)
MySQL 8.0 NF : Common Table Expressions (CTE)MySQL 8.0 NF : Common Table Expressions (CTE)
MySQL 8.0 NF : Common Table Expressions (CTE)
 
Most useful queries
Most useful queriesMost useful queries
Most useful queries
 
Arrays
ArraysArrays
Arrays
 
Ppt INFORMATIVE PRACTICES for class 11th chapter 14
Ppt INFORMATIVE PRACTICES for class 11th chapter 14Ppt INFORMATIVE PRACTICES for class 11th chapter 14
Ppt INFORMATIVE PRACTICES for class 11th chapter 14
 
Cpp programs
Cpp programsCpp programs
Cpp programs
 
Mysql
MysqlMysql
Mysql
 
Mysql
MysqlMysql
Mysql
 
Mysql
MysqlMysql
Mysql
 
User Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love StoryUser Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love Story
 
User Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love StoryUser Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love Story
 
8 arrays and pointers
8  arrays and pointers8  arrays and pointers
8 arrays and pointers
 
Les09
Les09Les09
Les09
 

Plus de Fwdays

Plus de Fwdays (20)

"How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y...
"How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y..."How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y...
"How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y...
 
"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii
"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii
"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
"What is a RAG system and how to build it",Dmytro Spodarets
"What is a RAG system and how to build it",Dmytro Spodarets"What is a RAG system and how to build it",Dmytro Spodarets
"What is a RAG system and how to build it",Dmytro Spodarets
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
"Distributed graphs and microservices in Prom.ua", Maksym Kindritskyi
"Distributed graphs and microservices in Prom.ua",  Maksym Kindritskyi"Distributed graphs and microservices in Prom.ua",  Maksym Kindritskyi
"Distributed graphs and microservices in Prom.ua", Maksym Kindritskyi
 
"Rethinking the existing data loading and processing process as an ETL exampl...
"Rethinking the existing data loading and processing process as an ETL exampl..."Rethinking the existing data loading and processing process as an ETL exampl...
"Rethinking the existing data loading and processing process as an ETL exampl...
 
"How Ukrainian IT specialist can go on vacation abroad without crossing the T...
"How Ukrainian IT specialist can go on vacation abroad without crossing the T..."How Ukrainian IT specialist can go on vacation abroad without crossing the T...
"How Ukrainian IT specialist can go on vacation abroad without crossing the T...
 
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ..."The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...
 
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu..."[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...
 
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care..."[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...
 
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"..."4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...
 
"Reconnecting with Purpose: Rediscovering Job Interest after Burnout", Anast...
"Reconnecting with Purpose: Rediscovering Job Interest after Burnout",  Anast..."Reconnecting with Purpose: Rediscovering Job Interest after Burnout",  Anast...
"Reconnecting with Purpose: Rediscovering Job Interest after Burnout", Anast...
 
"Mentoring 101: How to effectively invest experience in the success of others...
"Mentoring 101: How to effectively invest experience in the success of others..."Mentoring 101: How to effectively invest experience in the success of others...
"Mentoring 101: How to effectively invest experience in the success of others...
 
"Mission (im) possible: How to get an offer in 2024?", Oleksandra Myronova
"Mission (im) possible: How to get an offer in 2024?",  Oleksandra Myronova"Mission (im) possible: How to get an offer in 2024?",  Oleksandra Myronova
"Mission (im) possible: How to get an offer in 2024?", Oleksandra Myronova
 
"Why have we learned how to package products, but not how to 'package ourselv...
"Why have we learned how to package products, but not how to 'package ourselv..."Why have we learned how to package products, but not how to 'package ourselv...
"Why have we learned how to package products, but not how to 'package ourselv...
 
"How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin...
"How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin..."How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin...
"How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin...
 

Dernier

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

"Making tomorrow's code look like today's", Adam Ralph

  • 1.
  • 2.
  • 3.
  • 4.
  • 7.
  • 8. WITH ct AS ( SELECT id = cid, total = SUM(value) FROM orders WHERE date > … GROUP BY cid ) UPDATE c SET c.Discount = 10 FROM customers AS c INNER JOIN ct ON c.id = ct.id WHERE ct.total > …; USE tempdb; GO DECLARE @x TABLE (ID int, Value int); DECLARE @y TABLE (ID int, Value int); INSERT @x VALUES (1, 10), (2, 20); INSERT @y VALUES (1, 100),(2, 200); WITH cte AS (SELECT * FROM @x) UPDATE cte -- cte is not referenced by the alias. SET Value = y.Value FROM cte AS x -- cte is assigned an alias. INNER JOIN @y AS y ON y.ID = x.ID; SELECT * FROM @x; GO USE tempdb; GO -- UPDATE statement with CTE references that are correctly matched. DECLARE @x TABLE (ID int, Value int); DECLARE @y TABLE (ID int, Value int); INSERT @x VALUES (1, 10), (2, 20); INSERT @y VALUES (1, 100),(2, 200); WITH cte AS (SELECT * FROM @x) UPDATE x -- cte is referenced by the alias. SET Value = y.Value FROM cte AS x -- cte is assigned an alias. INNER JOIN @y AS y ON y.ID = x.ID; SELECT * FROM @x; GO USE AdventureWorks2012; GO IF OBJECT_ID ('dbo.Table1', 'U') IS NOT NULL DROP TABLE dbo.Table1; GO IF OBJECT_ID ('dbo.Table2', 'U') IS NOT NULL DROP TABLE dbo.Table2; GO CREATE TABLE dbo.Table1 (c1 int PRIMARY KEY NOT NULL, c2 int NOT NULL); GO CREATE TABLE dbo.Table2 (d1 int PRIMARY KEY NOT NULL, d2 int NOT NULL); GO INSERT INTO dbo.Table1 VALUES (1, 10); INSERT INTO dbo.Table2 VALUES (1, 20), (2, 30); GO DECLARE abc CURSOR LOCAL FOR SELECT c1, c2 FROM dbo.Table1; OPEN abc;
  • 9.
  • 10.
  • 11. 1 week Sum(o => o.Total) t
  • 12. += o1.Total -= o1.Total 1 week += o2.Total -= o2.Total 1 week += o3.Total -= o3.Total 1 week WeekTotal WeekTotal t
  • 13.
  • 15. += o1.Total -= o1.Total 1 week += o2.Total -= o2.Total 1 week += o3.Total -= o3.Total 1 week WeekTotal WeekTotal t
  • 16. SHOW ME THE CODE
  • 17. DB BUS SAGA class Discounting : Saga<Discounting.Data> { public async Task Handle( SubmitOrder order) { ... } ... } Persist er dispatch message queue request timeout persist timeout delay persist saga poll
  • 18. AMAZON SQS 600 s 900 2,800 s 100 s 900 900 (1,900) (1,000) (100)
  • 22. RABBITMQ 1 1 0 0 1 0 32 s 16 s 8 s 4 s 2 s 1 s (4210)
  • 24. WT=90
  • 25. DB queue BUS SAGA class OrderProcessPolicy : Saga<OrderProcess> { public async Task Handle(SubmitOrder order) { // ... } public async Task Handle(Cancel { // .. } public async Task Timeout(BuyersRemorse state) { // ... } } Persi ster create saga dispatch message send messages persist saga BUS SAGA class OrderProcessPolicy : Saga<OrderProcess> { public async Task Handle(SubmitOrder order) { // ... } public async Task Handle(Cancel { // .. } public async Task Timeout(BuyersRemorse state) { // ... } } Persi ster create saga dispatch message send messages persist saga persist saga CustomerId = 1337 persist saga CustomerId = 1337 message(s) sent message(s) not sent message(s) sent
  • 27.
  • 28.
  • 29.
  • 30. Automated pattern matching Daily reports saga notification business events
  • 31.
  • 32.