Linearizable Databases | Systems Design Interview 0 to 1 with Ex-Google SWE

  Рет қаралды 6,469

Jordan has no life

Jordan has no life

Күн бұрын

Пікірлер: 21
@LeoLeo-nx5gi
@LeoLeo-nx5gi Жыл бұрын
Loved watching this video you made it so easy, definitely waiting for distributed consensus, thanks!!
@jordanhasnolife5163
@jordanhasnolife5163 Жыл бұрын
Glad to hear, thanks Leo!
@bokistotel
@bokistotel 3 ай бұрын
Great explanation for a Lamport counter. You have a gift for teaching. I have two questions. 1. At @11:07, isn't Leader DB used just for writes ? 2. Is there a use case where software engineer will use this in real life? Mostly everybody is using some kind of cloud infrastructure where user does not have to worry about implementation details (but one has to learn how to operate the cloud). I am interested what does "distributed" engineer do? It looks to me that this is a job that is mostly needed in developing cloud infrastructure behind the scenes.
@jordanhasnolife5163
@jordanhasnolife5163 3 ай бұрын
Nope, you can read from leaders too. This is more theoretical, and I imagine that the only software engineers using this IRL are the ones developing databases that use it IRL
@Luzkan
@Luzkan 8 ай бұрын
Yoo, Jordan. At the 8:12 I'm wondering what about the final counter count? In total those two dudes have incremented the clocks 5 times in total, but ultimatelly we ended up with 4, due to the initial first increment that happend concurrently and left both DB's at 1, instead of going for the max(A1, B0) + 1 = 2, or max(A0, B1) = 2 (...) Aha, you explained it right after I started having my question. Nice, I'm going to leave a comment for the algorithm anyway, thanks!
@jordanhasnolife5163
@jordanhasnolife5163 8 ай бұрын
Hahaha
@ariali2067
@ariali2067 7 ай бұрын
Thanks for making all these insightful videos! One question -> in this new series of videos, you mentioned that linearizability is mainly about reads never go back in time. For example, x = 10 is written to the replica1, x = 5 (old value) in replica2. Before new value 10 is populated to replica2, user read 5 from replica2 and that's okay. The only issue is that if they read 5 from replica2, and then 10 from replica1 and again 5 from replica2 (go back). (i.e okay to read not the most recent value, but once we read newer values we can never read old ones again). I also checked out the old series video for this concept. There it mentioned that no stale reads, which my understanding is that user should never read 5 after 10 is written to any of the replicas which is linearizability. I am a bit confused now, curious which one is more accurate?
@jordanhasnolife5163
@jordanhasnolife5163 7 ай бұрын
I'd say the first definition is more accurate. The second one would moreso define "strong consistency", but it's very easy to build strong consistency from linearizable storage. In linearizable storage, each write has a sequence number, so we can easily tell when our write is going back in time and disregard it.
@kevinburke3941
@kevinburke3941 3 ай бұрын
Hi Jordan! Love your videos. I look forward to them. Just one question. At the end of your video around 12:10 you said, "if you're holding a lock... and then all of a sudden the system thinks the previous owner of the lock is the one holding it, you're in trouble." What does this mean exactly? I'm pretty sure you're referring to the idea where a previously failed leader comes back up and becomes the leader again, and that holds older values. But what does this have to do with locking?
@jordanhasnolife5163
@jordanhasnolife5163 3 ай бұрын
I'm referring to a situation where grabbing a distributed lock allows you to write to some external data store. If someone who previously grabbed it goes down, comes up, and thinks they still have it, that could lead to multiple concurrent writes to the external store.
@Anonymous-ym6st
@Anonymous-ym6st 8 ай бұрын
thanks for the great explanation! Finally understand the lamport! Curious what's the pros and cons between version vector and lamport clock?
@jordanhasnolife5163
@jordanhasnolife5163 8 ай бұрын
Lamport clock: fewer bytes to store Version vectors: tell us when writes are concurrent as opposed to ordering them arbitrarily
@yunfu518
@yunfu518 2 ай бұрын
Hi Jodan, great video! For the version vector concurrent situation, why don't we merge the updates as [3, 2], instead of arbitrary choose left/right node version?
@jordanhasnolife5163
@jordanhasnolife5163 2 ай бұрын
How do you merge x = 6 and x = 12? The gist is, we want a total ordering, and in a total ordering you can't have concurrent writes.
@yunfu518
@yunfu518 2 ай бұрын
@@jordanhasnolife5163 Yea, I was kind of confused why don't we take the latest version of each of the replica for concurrent writes.
@jordanhasnolife5163
@jordanhasnolife5163 2 ай бұрын
@@yunfu518 I don't understand what you mean here - we need to agree between all the nodes which one of these writes came before another, which is the definition of linearizability
@yunfu518
@yunfu518 2 ай бұрын
@@jordanhasnolife5163 Nvm, i get it now. I was stuck with the idea of merging. But you are right, without knowing the order, we can't really merge.
@ganesansanthanam-5896
@ganesansanthanam-5896 4 ай бұрын
I would love to be mentored by you. I am an international student who's struggling to find a job
@jordanhasnolife5163
@jordanhasnolife5163 4 ай бұрын
Hey man! Wishing you the best - unfortunately unlike my time at google, I'm now a bit short on time, so I don't think I have the availability to mentor at the moment :(
@cricket4671
@cricket4671 Жыл бұрын
Plugin your ipad charger 😛
Kubernetes Explained
10:59
IBM Technology
Рет қаралды 627 М.
小丑家的感情危机!#小丑#天使#家庭
00:15
家庭搞笑日记
Рет қаралды 37 МЛН
Sigma baby, you've conquered soap! 😲😮‍💨 LeoNata family #shorts
00:37
Life hack 😂 Watermelon magic box! #shorts by Leisi Crazy
00:17
Leisi Crazy
Рет қаралды 81 МЛН
Intel Core Ultra 9 285K Review, It's A Mess.... Probably A Flop
38:23
Hardware Unboxed
Рет қаралды 174 М.
Distributed Systems 7.2: Linearizability
18:44
Martin Kleppmann
Рет қаралды 37 М.
30 Programming Truths I know at 30 that I Wish I Knew at 20
17:41
Learn System design : Distributed datastores | RDBMS scaling problems | CAP theorem
21:08
Multi Leader Replication - chaos | Systems Design 0 to 1 with Ex-Google SWE
13:38
Can I Unlock My Tesla With a Google Nest Mini?? 😳👀
0:31
Tesla Flex
Рет қаралды 2,3 МЛН
Как изменилась цена этого ПК за 3 года?
0:36
Tesla Coil Testing #experiment #shorts
0:29
Light K
Рет қаралды 13 МЛН
Apple-Designer aktualisieren das iPhone-Design 😂
0:13
Abuloris
Рет қаралды 4,8 МЛН
😱ЧТО? В Айфоне ПРО нет 120 герц? 🤯
0:44
Не шарю!
Рет қаралды 1,1 МЛН
Did you know you can test a battery like this? 🪫🔋😳
0:13
scottsreality
Рет қаралды 1,5 МЛН
Гравировка на iPhone, iPad и Apple Watch
0:40
Romancev768
Рет қаралды 379 М.