The final piece opens as the others did β with a peach, and a professor about to regret trusting one.
Professor:And thus we reach our final little piece in the world of operating systems: distributed systems. Since we canβt cover much here, weβll sneak in a little intro here in the section on persistence, and focus mostly on distributed file systems. Hope that is OK!
Student:Sounds OK. But what is a distributed system exactly, oh glorious and all-knowing professor?
Professor:Well, I bet you know how this is going to goβ¦
Student:Thereβs a peach?
Professor:Exactly! But this time, itβs far away from you, and may take some time to get the peach. And there are a lot of them! Even worse, sometimes a peach becomes rotten. But you want to make sure that when anybody bites into a peach, they will get a mouthful of deliciousness.
Student:This peach analogy is working less and less for me.
Professor:Come on! Itβs the last one, just go with it.
Student:Fine.
Professor:So anyhow, forget about the peaches. Building distributed systems is hard, because things fail all the time. Messages get lost, machines go down, disks corrupt data. Itβs like the whole world is working against you!
Three ways the world works against you β and only the third one weβve already met (silent corruption, back in data integrity):
Student:But I use distributed systems all the time, right?
Professor:Yes! You do. And⦠?
Student:Well, it seems like they mostly work. After all, when I send a search request to Google, it usually comes back in a snap, with some great results! Same thing when I use Facebook, Amazon, and so forth.
Professor:Yes, it is amazing. And thatβs despite all of those failures taking place! Those companies build a huge amount of machinery into their systems so as to ensure that even though some machines have failed, the entire system stays up and running. They use a lot of techniques to do this: replication, retry, and various other tricks people have developed over time to detect and recover from failures.
Student:Sounds interesting. Time to learn something for real?
Professor:It does seem so. Letβs get to work! But first things firstβ¦ (bites into peach he has been holding, which unfortunately is rotten)
Next: Distributed Systems
Now the concrete machinery. First, communication over an unreliable network β why packets vanish, and how to build a reliable layer on top of an unreliable one β then remote procedure call (RPC) to make a call to another machine look almost like a local one. From there, two real distributed file systems: Sunβs NFS and Andrewβs AFS.Check yourself: the distributed-systems setup
1.According to the professor, what is the fundamental reason distributed systems are hard to build?
2.Given that failures happen constantly, how do real systems (Google, Facebook, Amazon) manage to 'mostly work'?
3.Within distributed systems, what does the book say it will focus on?
4.How does this final 'peach' differ from the earlier ones, capturing what's new about distribution?
4 questions