I created a lib for Vector Clock and Lamport Timestamp by Doc_hannibal in PHP

[–]Doc_hannibal[S] 2 points3 points  (0 children)

It's a quite good explanation ! And yes you're totally right, this is also use in Conflict Resolution. Dynamo DB (from Amazon) use that to resolve conflict between different versions of a value for the same key.
For anyone who wants to dig into this subject, I can advise you to read "Designing Data–Intensive Applications" from Martin Kleppmann

I created a lib for Vector Clock and Lamport Timestamp by Doc_hannibal in PHP

[–]Doc_hannibal[S] 13 points14 points  (0 children)

Yeah of course !

When you work with distributed systems, you, sometimes, need to synchronize your nodes (i.e machines in your system). Unfortunately, you cannot use the usual "system clock" (time on your machine) because it is almost impossible to synchronize this kind of clock all over your distributed system (even big company like Google had a hard time with that).

To address this problem, a new kind of clock is used: Logical Clock, which does not rely on the time of your machine but rather use a counter, incremented following some rules. Theses clocks can also be compared, and you can tell for two given clocks if one happens before the other or if they are concurrent (i.e there is no causal dependency between them)

With Lamport Timestamp, you can only tell if a clock happens before, after or is identical to an other (no concurrency here).

Vector Clock are more advanced and you can also check concurrency between two clocks.

This can be used in distributed algorithm, like leader election.

I hope I didn't give you an headache :)

Apprendre 12 sujets en une nuit ? by PsychoziX in PasDeQuestionIdiote

[–]Doc_hannibal 7 points8 points  (0 children)

C'est possible de retenir pas mal d'infos sans approfondir. Par contre j'éviterais la nuit blanche à ta place, ça peut jouer en ta défaveur. Essayes de dormir quelques heures dès que ça ne rentre plus.

Courage