SlideShare a Scribd company logo
Implementing
Outbox*
Tomek Masternak
* model-checking first
2PC is no
longer
to the rescue
Welcome to
the land of
anomalies
What should we expect?
3 2 1
send order
3 2 1
2
1
3 2
3 3 1
2 2
processing order
duplication
re-ordering
duplication
re-ordering
No single
solution
Hero is here
Outbox in action
Transport transaction
Data store transaction
Publish
Edge cases
Model-checking
vs
automanual tests
TLA+: Temporal logic of actions
S0
S1
S2
S3
A1
A2
A3
A4
A5
…
…
…
Invariants*
+
*and more
In practice more like this
https://www3.hhu.de/stups/prob/index.php/File:CANBus_sfdp.png
What makes a
good model?
Demo 0:
Toolbox
Demo 1:
Ghost
messages
Demo 2:
Lost messages
Demo 3:
No duplicated
processing
Demo 4:
Consistent
output
Questions?

More Related Content

More from Particular Software (20)

PDF
Scaling for Success: Lessons from handling peak loads on Azure with NServiceBus
Particular Software
 
PDF
Beyond simple benchmarks—a practical guide to optimizing code
Particular Software
 
PDF
An exception occurred - Please try again
Particular Software
 
PPTX
Tales from the trenches creating complex distributed systems
Particular Software
 
PPTX
Got the time?
Particular Software
 
PPTX
Reports from the field azure functions in practice
Particular Software
 
PPTX
Finding your service boundaries - a practical guide
Particular Software
 
PPTX
Decomposing .NET Monoliths with NServiceBus and Docker
Particular Software
 
PDF
DIY Async Message Pump: Lessons from the trenches
Particular Software
 
PDF
Share the insight of ServiceInsight
Particular Software
 
PPTX
What to consider when monitoring microservices
Particular Software
 
PPTX
Making communications across boundaries simple with NServiceBus
Particular Software
 
PPTX
Making communication across boundaries simple with Azure Service Bus
Particular Software
 
PPTX
How to avoid microservice pitfalls
Particular Software
 
PDF
Connect front end to back end using SignalR and Messaging
Particular Software
 
PDF
Async/Await: NServiceBus v6 API Update
Particular Software
 
PDF
Async/Await: TPL & Message Pumps
Particular Software
 
PDF
Async/Await Best Practices
Particular Software
 
PPTX
Making workflow implementation easy with CQRS
Particular Software
 
PPTX
Cqrs but different
Particular Software
 
Scaling for Success: Lessons from handling peak loads on Azure with NServiceBus
Particular Software
 
Beyond simple benchmarks—a practical guide to optimizing code
Particular Software
 
An exception occurred - Please try again
Particular Software
 
Tales from the trenches creating complex distributed systems
Particular Software
 
Got the time?
Particular Software
 
Reports from the field azure functions in practice
Particular Software
 
Finding your service boundaries - a practical guide
Particular Software
 
Decomposing .NET Monoliths with NServiceBus and Docker
Particular Software
 
DIY Async Message Pump: Lessons from the trenches
Particular Software
 
Share the insight of ServiceInsight
Particular Software
 
What to consider when monitoring microservices
Particular Software
 
Making communications across boundaries simple with NServiceBus
Particular Software
 
Making communication across boundaries simple with Azure Service Bus
Particular Software
 
How to avoid microservice pitfalls
Particular Software
 
Connect front end to back end using SignalR and Messaging
Particular Software
 
Async/Await: NServiceBus v6 API Update
Particular Software
 
Async/Await: TPL & Message Pumps
Particular Software
 
Async/Await Best Practices
Particular Software
 
Making workflow implementation easy with CQRS
Particular Software
 
Cqrs but different
Particular Software
 

Recently uploaded (20)

PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
July Patch Tuesday
Ivanti
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
Ad

Implementing outbox model-checking first

Editor's Notes

  • #2: Hi everyone, my name is Tomek and in this talk I’ll be talking about `Checking safety in Exactly-Once`
  • #5: At-least-once message delivery Concurrent message receives Add an animation showing send-order and possible anomalies one by one
  • #8: graph LR   receiveMessage(1. Receive)   dedupe{2. Deduplication}   handler(3. Execute handler)   storeOutbox(4. Store outgoing<br/>messages in outbox)   commitStore(5. Commit<br/>to store)   areSent{6. Have outgoing<br/>messages been<br/>sent?}   send(7. Send messages)   updateOutbox(8. Set as sent)   ack(9. Ack)   receiveMessage-->dedupe   dedupe-- No record found -->handler   handler-->storeOutbox   storeOutbox-->commitStore   commitStore-->areSent   send-->updateOutbox   updateOutbox-->ack   dedupe-- Record found -->areSent   areSent-- No -->send   areSent-- Yes -->ack
  • #14: What are the files? What are the parts of the specification?