Distributed Systems 2.1: The two generals problem
Vložit
- čas přidán 27. 07. 2024
- Accompanying lecture notes: www.cl.cam.ac.uk/teaching/212...
Full lecture series: • Distributed Systems le...
This video is part of an 8-lecture series on distributed systems, given as part of the undergraduate computer science course at the University of Cambridge. It is preceded by an 8-lecture course on concurrent systems for which videos are not publicly available, but slides can be found on the course web page: www.cl.cam.ac.uk/teaching/212...
Wow, This series is a gift to the world
Surely
Sir Martin Kleppmann, thank you for your brilliant lectures
Reminds me of the quote from friends "They don't know that we know they know we know" 😂
Perfectly suits.
Thanks for putting the entire series on youtube
Thank you for the lectures!! You explain the complex problems in such clear way
thank you, very informative and explantory
Thank you very much for the lecture!
Thank you for sharing. Much Apprecitated!
Thank you.
Poor customer is attacked by everyone
so, there is no solution for this problem? we can only put checks in place to prevent it in a real life scenario ?
Although I have taken the DS course before, I still enjoy listening your valuable lectures again because your series are really intuitive. I think the difference between two generals and online shop is, there is no ACK for ACK in TCP which implicitly avoids loops like the way in two generals problem. The only thing that payments service care is whether the message eventually reaches the online shop.
i love you
So the way the online shop problem is different from the two generals problem is that , say if we were to to apply the online shop case to the two generals one, then what would happen is that is if general one attacks and general 2 doesn’t, the city doesn’t fight the general that’s attacking, because the other general isn’t by his side!
In other words, either general is safe! Just like how the online shop is safe is they dispatch goods and card doesn’t get charged, because they can just charge later!
However, in the original generals problem, there was no safety! Once a general attacks alone, there’s no coming back from the defeat!
Yeah, I think the two generals problem is unresolvable since it has a hidden requirement - two armies need to attack the city at the same day. Otherwise, army 1 can keep sending messenger to army 2 and only attack the city until getting the response that army 2 has attacked. The same to online shop. They can just dispatch goods until confirming payment has been set
Yes, the 2 generals is a bit exaggerated, because in real life, as Martin mentioned, there is always room for rollback. Hopefully, no lives are dependant on a distributed system (in some cases there are), but in a simpler case like the shopping website things can always be rolled back in case of failures.
Can a messenger be attacked and the message is changed ?
In some systems we assume that a message may be changed (perhaps by a malicious actor) as it travels through the network. See section 2.3 on system models.
@@kleppmann Thank you !
For people who are curious why algorithm like TCP 3 way handshake cannot solve the problem.
```
The thought experiment involves considering how they might go about coming to a consensus. In its simplest form, one general is known to be the leader, decides on the time of the attack, and must communicate this time to the other general. The problem is to come up with algorithms that the generals can use, including sending messages and processing received messages, that can allow them to correctly conclude:
Yes, we will both attack at the agreed-upon time.
Allowing that it is quite simple for the generals to come to an agreement on the time to attack (i.e. one successful message with a successful acknowledgement), the subtlety of the Two Generals' Problem is in the impossibility of designing algorithms for the generals to use to safely agree to the above statement.
```
Quote from wiki: en.wikipedia.org/wiki/Two_Generals%27_Problem