trachten / cpisync

A library for synchronizing remote data with minimum communication.
GNU General Public License v3.0
26 stars 11 forks source link

TryMe with CuckooSync fails for "large" sync #75

Closed arorashu closed 4 years ago

arorashu commented 4 years ago

TryMe with CuckooSync fails for "large" no of items in sync. I created an updated TryMe in a cuckoo-sync-tryme branch, while debugging PR#73.

How to replicate

  1. checkout and build branch cuckoo-sync-tryme
  2. In terminal1, run $ TryMe client CuckooSync
  3. In terminal2, run $ TryMe server CuckooSync

Output

... list of elements
server elements final end, size: 198
sync succeeded.

Expected Output

... list of elements
server elements final end, size: 200
sync succeeded.

Description The modified TryMe adds 100 strings from "1001" to "1100" to client and 100 strings from "1" to "100" to server. Expected client and server to reconcile to 200 strings.

novakboskov commented 4 years ago

@arorashu CuckooSync is in essence probabilistic. You need to set the cuckoo filter parameters to support 1) your maximal cardinal of each set, and 2) your target probability of success. I'd suggest trying tweaking up filterSize (keeping it a power of two).

arorashu commented 4 years ago

Thanks! tweaking filter size helped. I changed it from 256 to 512.