[pycrypto] synchronisation 2 computers'databases
James A. Donald
jamesd at echeque.com
Fri Jan 30 23:12:29 CST 2009
Bill Broadley wrote:
> So server A says:
> server B, send me all records updated since X
> Then server B says:
> server A, send me all records updated since X
But if something goes wrong - if B incorrectly thinks it
has an accurate account of A's records up to time Y, and
it does not, situation will never be corrected.
I suggest a patricia hash tree of transactions with the
time of update of the transaction creating or changing a
record being the high order part of the patricia key.
Then a small number of hashes near the root of the tree
will guarantee that the past of A's tree agrees with the
past of B's tree. So A and B can guarantee that they
agree on a very large database by exchanging a very
small number of hashes - and if any discrepancy shows
up, can ask for hashes further from the root and closer
to the leaves, eventually leading to the discrepant
leaves of the tree.
More information about the pycrypto