LWWRegister Map
Overall presentation of the code:
- I don't think that code requires exhaustive comments, but I had some doubts reading the merge (lines 65-66).
- Move PutOp, DelOp to begin or end of code.
- My preference is that interface methods do not expose details about the underlying metadata. They should receive a context instead of a timestamp.
Design
- Is it really necessary to have DeltaOperations and DeltaState? Couldn't we represent Operations as state and have a single merge case? LWWMap could implement the exec method.
- I would like that the state accepts the delta instead of delta accepting a state (if previous comment cannot be addressed)
Semantics
- What happens in the following case: State: k: {a, 1}. put(k,a,2) || del(k, 3).
- I assume that the result will be that k is deleted. That is not correct because in AddWins delete only affects seen puts, but this delete is concurrent with the put, despite they have different timestamps. The result should be K -> a.
- Support Nesting (after fixing previous issues)
Edited by balegas