An optimal CO algorithm stores in local message logs and propagates on messages, information of the form “d is a destination of M” about a message M sent in the causal past, as long as and only as long as:(Propagation Constraint I) it is not known that the message M is delivered to d, and(Propagation Constraint II) it is not known that a message has been sent to d in the causal future of Send(M), and hence it is not guaranteed using a reasoning based on transitivity that the message M will be delivered to d in CO.The Propagation Constraints also imply that if either (I) or (II) is false, the information “d ∈ M.Dests” must not be stored or propagated, even toremember that (I) or (II) has been falsified. Stated differently, the information “d ∈ Mi,a.Dests” must be available in the causal future of event ei,a, but:• not in the causal future of Deliverd(Mi,a), and• not in the causal future of ek,c, where d ∈ Mk,c.Dests and there is no othermessage sent causally between Mi,a and Mk,c to the same destination d.In the causal future of Deliverd(Mi,a), and Send(Mk,c), the information is redundant; elsewhere, it is necessary. Additionally, to maintain optimality, no other information should be stored, including information about what messages have been delivered. As information about what messages have been delivered (or are guaranteed to be delivered without violating causal order) is necessary for the Delivery Condition, this information is inferred using a set-operation based logic.The Propagation Constraints are illustrated with the help of Figure 6.12. The message M is sent by process i at event e to process d. The information“d ∈ M.Dests”:• must exist at e1 and e2 because (I) and (II) are true;• must not exist at e3 because (I) is false;• must not exist at e4, e5, e6 because (II) is false;• must not exist at e7, e8 because (I) and (II) are false.Information about messages (i) not known to be delivered and (ii) not guaranteed to be delivered in CO, is explicitly tracked by the algorithm using (source, timestamp, destination) information. The information must be deleted as soon as either (i) or (ii) becomes false. The key problem in designing an optimal CO algorithm is to identify the events at which (i) or (ii) becomes false. Information about messages already delivered and messages guaranteed to be delivered in CO is implicitly tracked without storing or propagating it, and is derived from the explicit information. Such implicit information is used for determining when (i) or (ii) becomes false for the explicit information being stored or carried in messages. Figure 6.12 Illustrating the necessary and sufficientconditions for causal dordering [21].iMessage sent to dBorder of causal future of corresponding eventEvent at which message is sent to d, and there is no such event on any causal path between event e and this eventInfo "d is a dest. of M" must exist for correctnessInfo "d is a dest. of M" must not exist for optimalityThe algorithm is given in Algorithm 6.3. Procedure SND is executed atomi- cally. Procedure RCV is executed atomically except for a possible interruption in line 2a where a non-blocking wait is required to meet the Delivery Condi- tion. Note that the pseudo-code can be restructured to complete the processing of each invocation of SND and RCV procedures in a single pass of the data structures, by always maintaining the data structures sorted row–major and then column–major.1. Explicit tracking Tracking of (source, timestamp, destination) informa- tion for messages (i) not known to be delivered and (ii) not guaranteed to be delivered in CO, is done explicitly using the l.Dests field of entries in local logs at nodes and o.Dests field of entries in messages. Sets li,a.Dests and oi,a.Dests contain explicit information of destinations to which Mi,ais not guaranteed to be delivered in CO and is not known to be delivered. The information about “d ∈ Mi,a.Dests” is propagated up to the earliestevents on all causal paths from (i, a) at which it is known that Mi,a is delivered to d or is guaranteed to be delivered to d in CO.2. Implicit tracking Tracking of messages that are either (i) already deliv- ered, or (ii) guaranteed to be delivered in CO, is performed implicitly. The information about messages (i) already delivered or (ii) guaranteed to be delivered in CO is deleted and not propagated because it is redundant as far as enforcing CO is concerned. However, it is useful in determining what information that is being carried in other messages and is being stored in logs at other nodes has become redundant and thus can be purged. The semantics are implicitly stored and propagated. This information about messages that are (i) already delivered or (ii) guaranteed to be delivered in
đang được dịch, vui lòng đợi..
