SlideShare ist ein Scribd-Unternehmen logo
1 von 21
Downloaden Sie, um offline zu lesen
The Two Generals
Problem
A taste of distributed systems…
Why?
•  Distributed systems touch everyone’s lives
at some point or another.
•  People ask, why can’t stuff just work?
•  Answer: Distributed Systems are hard.
•  Two Generals Problem is a fun problem I
can maybe describe in 5 minutes.
Set the Scene
•  To make things confusing, we’re
going to explain this problem with
ninjas instead of generals.
The most important thing to
know is that ninjas need to
attack all at once!
Overview
THE NINJAS MUST ATTACK AT THE SAME
TIME OR JEAN-CLAUDE WILL KILL THEM IN
AWESOME WAYS.
Overview
THE NINJAS MUST ATTACK AT THE SAME
TIME OR JEAN-CLAUDE WILL KILL THEM IN
AWESOME WAYS.
Overview
THE ONLY WAY TO COORDINATE AND
DECIDE AN ATTACK TIME IS BY SENDING
MESSENGERS TO SNEAK BY JEAN-CLAUDE.
When you send a messenger into the forest:
+ =
Sometimes:
+ =+
Other Times:
Ninja Plan #1
10:05pm
Attack!
Got it!
Ninja Plan #1
10:05pm
Attack!
Ninja Plan #2
10:05pm
Attack!
Got it!
Confirmed
Ninja Plan #2
10:05pm
Attack!
Got it!
Confirmed
Ninja Plan #3?
Double Confirm?
Any other plans?
•  There are not a lot of other options
given the limited rules of this game.
•  Sending messengers at the same
time doesn’t really change anything.
(for example)
Just Gonna Say It
•  It’s mathemagically impossible for the ninja
armies to agree to a time with 100%
certainty.
•  This is called:
“The Two Generals Problem”
E. A. Akkoyunlu, K. Ekanadham, and R. V. Huber in 1975
Just Gonna Say It
•  It’s mathemagically impossible for the ninja
armies to agree to a time with 100%
certainty.
•  This is called:
“The Two Generals Problem”
E. A. Akkoyunlu, K. Ekanadham, and R. V. Huber in 1975
IT’S A METAPHOR
•  The ninjas are really computer
programs.
•  The forest is an unreliable computer
network.
What about a reliable network?
Networks will let you down
•  Sooner or later,
Jean-Claude Van
Damme will come for
your network traffic.
•  Once you accept that
networks are terrible,
you can start building
software that is robust.
Further Thoughts
•  If you have 3 armies of ninjas (or 3
computer programs) you can do more
things. 3 is way better.
•  You can, in fact, agree to attack at
10:05pm.
•  But… there’s no guarantee you can
agree before 10:05pm has come and
gone.
Real World Example
•  Message delivery – what do you do
when processes and/or networks fail
and delivery state is unknown?
– At least once delivery?
– At most once delivery?
Real World Example
•  Message delivery – what do you do
when processes and/or networks fail
and delivery state is unknown?
– At least once delivery?
– At most once delivery?
•  Turns out exactly once is hard for
reasons related to ninja armies.
Time’s Up!
•  About your speaker:
–  Name: John Hugg
–  Company: VoltDB (Your gracious hosts!)
–  Tel: 1-800-DIST-SYS
–  Email: jhugg@voltdb.com
–  Social Media: @johnhugg
–  Quick bio: blah blah fearless blah blah
handsome blah blah charming blah blah
suave blah blah poetic blah blah resourceful
blah blah hilarious blah blah powerful blah
blah debonair blah blah calming blah blah

Weitere ähnliche Inhalte

Ähnlich wie The Two Generals Problem

Jason Yee - Chaos! - Codemotion Rome 2019
Jason Yee - Chaos! - Codemotion Rome 2019Jason Yee - Chaos! - Codemotion Rome 2019
Jason Yee - Chaos! - Codemotion Rome 2019Codemotion
 
How To Run a 5 Whys (With Humans, Not Robots)
How To Run a 5 Whys (With Humans, Not Robots)How To Run a 5 Whys (With Humans, Not Robots)
How To Run a 5 Whys (With Humans, Not Robots)Dan Milstein
 
Yet Another Dan Kaminsky Talk (Black Ops 2014)
Yet Another Dan Kaminsky Talk (Black Ops 2014)Yet Another Dan Kaminsky Talk (Black Ops 2014)
Yet Another Dan Kaminsky Talk (Black Ops 2014)Dan Kaminsky
 
How to Run a Post-Mortem (With Humans, Not Robots), Velocity 2013
How to Run a Post-Mortem (With Humans, Not Robots), Velocity 2013How to Run a Post-Mortem (With Humans, Not Robots), Velocity 2013
How to Run a Post-Mortem (With Humans, Not Robots), Velocity 2013Dan Milstein
 
Grace's technology power point
Grace's technology power pointGrace's technology power point
Grace's technology power pointMarq2014
 
Embracing Failure
Embracing FailureEmbracing Failure
Embracing FailureOwen Wang
 
Blackhat USA 2014 - The New Scourge of Ransomware
Blackhat USA 2014 - The New Scourge of RansomwareBlackhat USA 2014 - The New Scourge of Ransomware
Blackhat USA 2014 - The New Scourge of RansomwareJohn Bambenek
 
Iasi code camp 12 october 2013 surviving in complex systems using agility -...
Iasi code camp 12 october 2013   surviving in complex systems using agility -...Iasi code camp 12 october 2013   surviving in complex systems using agility -...
Iasi code camp 12 october 2013 surviving in complex systems using agility -...Codecamp Romania
 
What's the Worse That Can Happen - The Birth of a Worm
What's the Worse That Can Happen - The Birth of a WormWhat's the Worse That Can Happen - The Birth of a Worm
What's the Worse That Can Happen - The Birth of a Wormspackl
 

Ähnlich wie The Two Generals Problem (10)

Jason Yee - Chaos! - Codemotion Rome 2019
Jason Yee - Chaos! - Codemotion Rome 2019Jason Yee - Chaos! - Codemotion Rome 2019
Jason Yee - Chaos! - Codemotion Rome 2019
 
How To Run a 5 Whys (With Humans, Not Robots)
How To Run a 5 Whys (With Humans, Not Robots)How To Run a 5 Whys (With Humans, Not Robots)
How To Run a 5 Whys (With Humans, Not Robots)
 
Yet Another Dan Kaminsky Talk (Black Ops 2014)
Yet Another Dan Kaminsky Talk (Black Ops 2014)Yet Another Dan Kaminsky Talk (Black Ops 2014)
Yet Another Dan Kaminsky Talk (Black Ops 2014)
 
How to Run a Post-Mortem (With Humans, Not Robots), Velocity 2013
How to Run a Post-Mortem (With Humans, Not Robots), Velocity 2013How to Run a Post-Mortem (With Humans, Not Robots), Velocity 2013
How to Run a Post-Mortem (With Humans, Not Robots), Velocity 2013
 
Grace's technology power point
Grace's technology power pointGrace's technology power point
Grace's technology power point
 
Embracing Failure
Embracing FailureEmbracing Failure
Embracing Failure
 
Blackhat USA 2014 - The New Scourge of Ransomware
Blackhat USA 2014 - The New Scourge of RansomwareBlackhat USA 2014 - The New Scourge of Ransomware
Blackhat USA 2014 - The New Scourge of Ransomware
 
Artificial intelligence
Artificial intelligenceArtificial intelligence
Artificial intelligence
 
Iasi code camp 12 october 2013 surviving in complex systems using agility -...
Iasi code camp 12 october 2013   surviving in complex systems using agility -...Iasi code camp 12 october 2013   surviving in complex systems using agility -...
Iasi code camp 12 october 2013 surviving in complex systems using agility -...
 
What's the Worse That Can Happen - The Birth of a Worm
What's the Worse That Can Happen - The Birth of a WormWhat's the Worse That Can Happen - The Birth of a Worm
What's the Worse That Can Happen - The Birth of a Worm
 

Mehr von VoltDB

TripleLift: Preparing for a New Programmatic Ad-Tech World
TripleLift: Preparing for a New Programmatic Ad-Tech WorldTripleLift: Preparing for a New Programmatic Ad-Tech World
TripleLift: Preparing for a New Programmatic Ad-Tech WorldVoltDB
 
Understanding the Top Four Use Cases for IoT
Understanding the Top Four Use Cases for IoTUnderstanding the Top Four Use Cases for IoT
Understanding the Top Four Use Cases for IoTVoltDB
 
Transforming Your Business with Fast Data – Five Use Case Examples
Transforming Your Business with Fast Data – Five Use Case ExamplesTransforming Your Business with Fast Data – Five Use Case Examples
Transforming Your Business with Fast Data – Five Use Case ExamplesVoltDB
 
VoltDB and HPE Vertica Present: Building an IoT Architecture for Fast + Big Data
VoltDB and HPE Vertica Present: Building an IoT Architecture for Fast + Big DataVoltDB and HPE Vertica Present: Building an IoT Architecture for Fast + Big Data
VoltDB and HPE Vertica Present: Building an IoT Architecture for Fast + Big DataVoltDB
 
Acting on Real-time Behavior: How Peak Games Won Transactions
Acting on Real-time Behavior: How Peak Games Won TransactionsActing on Real-time Behavior: How Peak Games Won Transactions
Acting on Real-time Behavior: How Peak Games Won TransactionsVoltDB
 
Kyle Kingsbury Talks about the Jepsen Test: What VoltDB Learned About Data Ac...
Kyle Kingsbury Talks about the Jepsen Test: What VoltDB Learned About Data Ac...Kyle Kingsbury Talks about the Jepsen Test: What VoltDB Learned About Data Ac...
Kyle Kingsbury Talks about the Jepsen Test: What VoltDB Learned About Data Ac...VoltDB
 
Moving Beyond Batch: Transactional Databases for Real-time Data
Moving Beyond Batch: Transactional Databases for Real-time DataMoving Beyond Batch: Transactional Databases for Real-time Data
Moving Beyond Batch: Transactional Databases for Real-time DataVoltDB
 
Eat Your Data and Have It Too: Get the Blazing Performance of In-Memory Opera...
Eat Your Data and Have It Too: Get the Blazing Performance of In-Memory Opera...Eat Your Data and Have It Too: Get the Blazing Performance of In-Memory Opera...
Eat Your Data and Have It Too: Get the Blazing Performance of In-Memory Opera...VoltDB
 
Arguments for a Unified IoT Architecture
Arguments for a Unified IoT ArchitectureArguments for a Unified IoT Architecture
Arguments for a Unified IoT ArchitectureVoltDB
 
Why you really want SQL in a Real-Time Enterprise Environment
Why you really want SQL in a Real-Time Enterprise EnvironmentWhy you really want SQL in a Real-Time Enterprise Environment
Why you really want SQL in a Real-Time Enterprise EnvironmentVoltDB
 
Lambda-B-Gone: In-memory Case Study for Faster, Smarter and Simpler Answers
Lambda-B-Gone: In-memory Case Study for Faster, Smarter and Simpler AnswersLambda-B-Gone: In-memory Case Study for Faster, Smarter and Simpler Answers
Lambda-B-Gone: In-memory Case Study for Faster, Smarter and Simpler Answers VoltDB
 
Stored Procedure Superpowers: A Developer’s Guide
Stored Procedure Superpowers: A Developer’s GuideStored Procedure Superpowers: A Developer’s Guide
Stored Procedure Superpowers: A Developer’s GuideVoltDB
 
Fast Data Choices: 5 Strategies for Evaluating Alternative Business and Techn...
Fast Data Choices: 5 Strategies for Evaluating Alternative Business and Techn...Fast Data Choices: 5 Strategies for Evaluating Alternative Business and Techn...
Fast Data Choices: 5 Strategies for Evaluating Alternative Business and Techn...VoltDB
 
Mike Stonebraker on Designing An Architecture For Real-time Event Processing
Mike Stonebraker on Designing An Architecture For Real-time Event ProcessingMike Stonebraker on Designing An Architecture For Real-time Event Processing
Mike Stonebraker on Designing An Architecture For Real-time Event ProcessingVoltDB
 
How First to Value Beats First to Market: Case Studies of Fast Data Success
How First to Value Beats First to Market: Case Studies of Fast Data SuccessHow First to Value Beats First to Market: Case Studies of Fast Data Success
How First to Value Beats First to Market: Case Studies of Fast Data SuccessVoltDB
 
Lessons Learned: The Impact of Fast Data for Personalization
Lessons Learned: The Impact of Fast Data for PersonalizationLessons Learned: The Impact of Fast Data for Personalization
Lessons Learned: The Impact of Fast Data for PersonalizationVoltDB
 
Fast Data for Competitive Advantage: 4 Steps to Expand your Window of Opportu...
Fast Data for Competitive Advantage: 4 Steps to Expand your Window of Opportu...Fast Data for Competitive Advantage: 4 Steps to Expand your Window of Opportu...
Fast Data for Competitive Advantage: 4 Steps to Expand your Window of Opportu...VoltDB
 
Understanding the Operational Database Infrastructure for IoT and Fast Data
Understanding the Operational Database Infrastructure for IoT and Fast DataUnderstanding the Operational Database Infrastructure for IoT and Fast Data
Understanding the Operational Database Infrastructure for IoT and Fast DataVoltDB
 
Using a Fast Operational Database to Build Real-time Streaming Aggregations
Using a Fast Operational Database to Build Real-time Streaming AggregationsUsing a Fast Operational Database to Build Real-time Streaming Aggregations
Using a Fast Operational Database to Build Real-time Streaming AggregationsVoltDB
 
How to Build Fast Data Applications: Evaluating the Top Contenders
How to Build Fast Data Applications: Evaluating the Top ContendersHow to Build Fast Data Applications: Evaluating the Top Contenders
How to Build Fast Data Applications: Evaluating the Top ContendersVoltDB
 

Mehr von VoltDB (20)

TripleLift: Preparing for a New Programmatic Ad-Tech World
TripleLift: Preparing for a New Programmatic Ad-Tech WorldTripleLift: Preparing for a New Programmatic Ad-Tech World
TripleLift: Preparing for a New Programmatic Ad-Tech World
 
Understanding the Top Four Use Cases for IoT
Understanding the Top Four Use Cases for IoTUnderstanding the Top Four Use Cases for IoT
Understanding the Top Four Use Cases for IoT
 
Transforming Your Business with Fast Data – Five Use Case Examples
Transforming Your Business with Fast Data – Five Use Case ExamplesTransforming Your Business with Fast Data – Five Use Case Examples
Transforming Your Business with Fast Data – Five Use Case Examples
 
VoltDB and HPE Vertica Present: Building an IoT Architecture for Fast + Big Data
VoltDB and HPE Vertica Present: Building an IoT Architecture for Fast + Big DataVoltDB and HPE Vertica Present: Building an IoT Architecture for Fast + Big Data
VoltDB and HPE Vertica Present: Building an IoT Architecture for Fast + Big Data
 
Acting on Real-time Behavior: How Peak Games Won Transactions
Acting on Real-time Behavior: How Peak Games Won TransactionsActing on Real-time Behavior: How Peak Games Won Transactions
Acting on Real-time Behavior: How Peak Games Won Transactions
 
Kyle Kingsbury Talks about the Jepsen Test: What VoltDB Learned About Data Ac...
Kyle Kingsbury Talks about the Jepsen Test: What VoltDB Learned About Data Ac...Kyle Kingsbury Talks about the Jepsen Test: What VoltDB Learned About Data Ac...
Kyle Kingsbury Talks about the Jepsen Test: What VoltDB Learned About Data Ac...
 
Moving Beyond Batch: Transactional Databases for Real-time Data
Moving Beyond Batch: Transactional Databases for Real-time DataMoving Beyond Batch: Transactional Databases for Real-time Data
Moving Beyond Batch: Transactional Databases for Real-time Data
 
Eat Your Data and Have It Too: Get the Blazing Performance of In-Memory Opera...
Eat Your Data and Have It Too: Get the Blazing Performance of In-Memory Opera...Eat Your Data and Have It Too: Get the Blazing Performance of In-Memory Opera...
Eat Your Data and Have It Too: Get the Blazing Performance of In-Memory Opera...
 
Arguments for a Unified IoT Architecture
Arguments for a Unified IoT ArchitectureArguments for a Unified IoT Architecture
Arguments for a Unified IoT Architecture
 
Why you really want SQL in a Real-Time Enterprise Environment
Why you really want SQL in a Real-Time Enterprise EnvironmentWhy you really want SQL in a Real-Time Enterprise Environment
Why you really want SQL in a Real-Time Enterprise Environment
 
Lambda-B-Gone: In-memory Case Study for Faster, Smarter and Simpler Answers
Lambda-B-Gone: In-memory Case Study for Faster, Smarter and Simpler AnswersLambda-B-Gone: In-memory Case Study for Faster, Smarter and Simpler Answers
Lambda-B-Gone: In-memory Case Study for Faster, Smarter and Simpler Answers
 
Stored Procedure Superpowers: A Developer’s Guide
Stored Procedure Superpowers: A Developer’s GuideStored Procedure Superpowers: A Developer’s Guide
Stored Procedure Superpowers: A Developer’s Guide
 
Fast Data Choices: 5 Strategies for Evaluating Alternative Business and Techn...
Fast Data Choices: 5 Strategies for Evaluating Alternative Business and Techn...Fast Data Choices: 5 Strategies for Evaluating Alternative Business and Techn...
Fast Data Choices: 5 Strategies for Evaluating Alternative Business and Techn...
 
Mike Stonebraker on Designing An Architecture For Real-time Event Processing
Mike Stonebraker on Designing An Architecture For Real-time Event ProcessingMike Stonebraker on Designing An Architecture For Real-time Event Processing
Mike Stonebraker on Designing An Architecture For Real-time Event Processing
 
How First to Value Beats First to Market: Case Studies of Fast Data Success
How First to Value Beats First to Market: Case Studies of Fast Data SuccessHow First to Value Beats First to Market: Case Studies of Fast Data Success
How First to Value Beats First to Market: Case Studies of Fast Data Success
 
Lessons Learned: The Impact of Fast Data for Personalization
Lessons Learned: The Impact of Fast Data for PersonalizationLessons Learned: The Impact of Fast Data for Personalization
Lessons Learned: The Impact of Fast Data for Personalization
 
Fast Data for Competitive Advantage: 4 Steps to Expand your Window of Opportu...
Fast Data for Competitive Advantage: 4 Steps to Expand your Window of Opportu...Fast Data for Competitive Advantage: 4 Steps to Expand your Window of Opportu...
Fast Data for Competitive Advantage: 4 Steps to Expand your Window of Opportu...
 
Understanding the Operational Database Infrastructure for IoT and Fast Data
Understanding the Operational Database Infrastructure for IoT and Fast DataUnderstanding the Operational Database Infrastructure for IoT and Fast Data
Understanding the Operational Database Infrastructure for IoT and Fast Data
 
Using a Fast Operational Database to Build Real-time Streaming Aggregations
Using a Fast Operational Database to Build Real-time Streaming AggregationsUsing a Fast Operational Database to Build Real-time Streaming Aggregations
Using a Fast Operational Database to Build Real-time Streaming Aggregations
 
How to Build Fast Data Applications: Evaluating the Top Contenders
How to Build Fast Data Applications: Evaluating the Top ContendersHow to Build Fast Data Applications: Evaluating the Top Contenders
How to Build Fast Data Applications: Evaluating the Top Contenders
 

Kürzlich hochgeladen

Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfRTS corp
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxRTS corp
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencessuser9e7c64
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfmaor17
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdfAndrey Devyatkin
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolsosttopstonverter
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...OnePlan Solutions
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingShane Coughlan
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonApplitools
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITmanoharjgpsolutions
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...OnePlan Solutions
 

Kürzlich hochgeladen (20)

Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conference
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdf
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration tools
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh IT
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
 

The Two Generals Problem

  • 1. The Two Generals Problem A taste of distributed systems…
  • 2. Why? •  Distributed systems touch everyone’s lives at some point or another. •  People ask, why can’t stuff just work? •  Answer: Distributed Systems are hard. •  Two Generals Problem is a fun problem I can maybe describe in 5 minutes.
  • 3. Set the Scene •  To make things confusing, we’re going to explain this problem with ninjas instead of generals. The most important thing to know is that ninjas need to attack all at once!
  • 4. Overview THE NINJAS MUST ATTACK AT THE SAME TIME OR JEAN-CLAUDE WILL KILL THEM IN AWESOME WAYS.
  • 5. Overview THE NINJAS MUST ATTACK AT THE SAME TIME OR JEAN-CLAUDE WILL KILL THEM IN AWESOME WAYS.
  • 6. Overview THE ONLY WAY TO COORDINATE AND DECIDE AN ATTACK TIME IS BY SENDING MESSENGERS TO SNEAK BY JEAN-CLAUDE.
  • 7. When you send a messenger into the forest: + = Sometimes: + =+ Other Times:
  • 11. Ninja Plan #2 10:05pm Attack! Got it! Confirmed Ninja Plan #3? Double Confirm?
  • 12. Any other plans? •  There are not a lot of other options given the limited rules of this game. •  Sending messengers at the same time doesn’t really change anything. (for example)
  • 13. Just Gonna Say It •  It’s mathemagically impossible for the ninja armies to agree to a time with 100% certainty. •  This is called: “The Two Generals Problem” E. A. Akkoyunlu, K. Ekanadham, and R. V. Huber in 1975
  • 14. Just Gonna Say It •  It’s mathemagically impossible for the ninja armies to agree to a time with 100% certainty. •  This is called: “The Two Generals Problem” E. A. Akkoyunlu, K. Ekanadham, and R. V. Huber in 1975
  • 15. IT’S A METAPHOR •  The ninjas are really computer programs. •  The forest is an unreliable computer network.
  • 16. What about a reliable network?
  • 17. Networks will let you down •  Sooner or later, Jean-Claude Van Damme will come for your network traffic. •  Once you accept that networks are terrible, you can start building software that is robust.
  • 18. Further Thoughts •  If you have 3 armies of ninjas (or 3 computer programs) you can do more things. 3 is way better. •  You can, in fact, agree to attack at 10:05pm. •  But… there’s no guarantee you can agree before 10:05pm has come and gone.
  • 19. Real World Example •  Message delivery – what do you do when processes and/or networks fail and delivery state is unknown? – At least once delivery? – At most once delivery?
  • 20. Real World Example •  Message delivery – what do you do when processes and/or networks fail and delivery state is unknown? – At least once delivery? – At most once delivery? •  Turns out exactly once is hard for reasons related to ninja armies.
  • 21. Time’s Up! •  About your speaker: –  Name: John Hugg –  Company: VoltDB (Your gracious hosts!) –  Tel: 1-800-DIST-SYS –  Email: jhugg@voltdb.com –  Social Media: @johnhugg –  Quick bio: blah blah fearless blah blah handsome blah blah charming blah blah suave blah blah poetic blah blah resourceful blah blah hilarious blah blah powerful blah blah debonair blah blah calming blah blah