3 ms·
Not at all - in fact, the problem described in the article is a typical pitfall of the causal ordering system. In a simplified version: A -1-> B
by ivanbakel 6y ago
Not at all - in fact, the problem described in the article is a typical pitfall of the causal ordering system.
In a simplified version:
A -1-> B
B -2-> C
A ---3------> C
The human expectation is that 2 happens "before" 3, because that's how it looks. The reality is that 1 happens before 3, and 1 happens before 2, but 2 and 3 have no causal relation - and the runtime is free to rearrange them in any order.
That's why the solution is essentially
A -1-> B
B -2-> C
B -3-> C
Because then 2 really happens before 3.
- mratsim 6y agoEveryone dealing with actors, multithreading, distributed systems should read about Vector Clocks: - https://en.wikipedia.org/wiki/Vector_clock https://en.wikipedia.org/wiki/Vector_clock - Detecting Causal Relationships in Distributed Computations:In Search of the Holy Grail, Schwarz et al - http://www.vs.inf.ethz.ch/publ/papers/holygrail.pdf http://www.vs.inf.ethz.ch/publ/papers/holygrail.pdf
- hugey010 6y agoNow that's some CS I wasn't even aware of! Although, I'm confused why those process clocking topics are considered specific to distributed systems and not computation in general.
- grogers 6y agoThe article was explicit about this. The A->C message was initiated from thread A before the A->B message. So causally the B->C message is after the A->C message, because it's after the A->B message (which itself is after the A->C message). But in this case causality was broken. It wouldn't be confusing if the A->B message was sent first, because then the B->C message would be unordered relative to the A->C message. Depending on the processing at B it would be totally normal that one or the other would reach C first.