I was wondering if someone could explain in layman's terms what partial ordering of events are in a distributed system? Also, what is total ordering?
I would really appreciate this. I've looked all over the web and all I can find are mathematical equations defining partial and total ordering, but not in the context of a distributed system.
开发者_运维问答Thanks very much
Total ordering is an ordering that defines the exact order of every element in the series.
Partial ordering of elements in a series is an ordering that doesn't specify the exact order of every item, but only defines the order between certain key items that depend on each other.
The meaning of these words is exactly the same in the context of distributed computing. The only significance of distributed computing to these terms is the fact that partial ordering of events is much commoner than total ordering. In a local, single-threaded application, the order in which events happen is totally ordered, implicitly, since the CPU can only do one thing at a time. In a distributed system, you generally only coordinate a partial ordering of those events that have a dependency on one another, and let other events happen in whatever order they happen.
Example, taken from the comments: If you have three events {A, B, C}
, then they are totally ordered if they always have to happen in the order A > B > C
. However, if A
must happen before C
, but you don't care when B
happens, then they are partially ordered. In this case we would say that the sequences A > B > C
, A > C > B
, and B > A > C
all satisfy the partial ordering
精彩评论