Merkle Trees are used as an anti-entropy mechanism in several distributed, replicated key/value stores:
No doubt an anti-entropy mechanism is A Good Thing - transient failures just happen, in production. I m just not sure I understand why Merkle Trees are the popular approach.
Sending a complete Merkle tree to a peer involves sending the local key-space to that peer, along with hashes of each key value, stored in the lowest levels of the tree.
Diffing a Merkle tree sent from a peer requires having a Merkle tree of your own.
Since both peers must already have a sorted key / value-hash space on hand, why not do a linear merge to detect discrepancies?
I m just not convinced that the tree structure provides any kind of savings when you factor in upkeep costs, and the fact that linear passes over the tree leaves are already being done just to serialize the representation over the wire.
To ground this out, a straw-man alternative might be to have nodes exchange arrays of hash digests, which are incrementally updated and bucketed by modulo ring-position.
What am I missing?