Directory Reconciliation

Michael Mitzenmacher, Tom MorganarXiv 2018

Introduction

In the classic document exchange problem, two parties, Alice and Bob, hold strings $a$ and $b$ respectively. Their goal is for Bob to recover $a$ using communication proportional to the edit distance $k$ between the two strings, rather than the total length of the data. While this problem is well-studied for individual files, it does not fully capture the complexities of modern computing environments.

Real-world file systems are organized as directories: collections of documents where files are not only edited but frequently renamed or moved across folders. Current industry-standard tools, such as rsync, typically match files by their names. Consequently, if a large file (e.g., a 1GB video) is renamed, rsync may treat the event as a deletion of the old file and the creation of a new one, resulting in the redundant transfer of the entire file. This paper introduces a formal framework for directory reconciliation to address these inefficiencies, providing algorithms that synchronize collections based on total edits regardless of structural metadata changes.

The Directory Reconciliation Framework

The authors propose treating a directory as a set of documents where file names and paths are encoded as prefixes to the file content. Under this model, a rename or a move is transformed into a minor edit of a few characters. This allows the problem to be reduced to document exchange under edit distance with block moves. Moving a file is essentially taking a "block" of text and relocating it within a concatenated string representing the entire directory.

Algorithmic Innovations

The paper explores three primary algorithmic avenues to optimize the trade-off between communication volume and the number of communication rounds:

The authors develop a novel multi-round protocol for document exchange inspired by "noisy binary search" in graphs. This protocol iteratively identifies the longest common substrings between Alice and Bob. While it requires $O(k \log n)$ rounds of communication, it achieves a near-optimal communication cost of $O(k \log n)$ bits. This represents a significant theoretical improvement over previous one-round sketches, which often require additional logarithmic factors in their communication complexity.

2. One-Round Protocol: Set of Sets Reconciliation

For scenarios where high latency makes multiple rounds impractical, the paper introduces a "set of sets" approach using Invertible Bloom Lookup Tables (IBLTs). Typically used to reconcile sets of simple integers, the authors adapt IBLTs to store representations of complex documents. Alice sends sketches of her documents at various "edit-distance levels," and Bob uses his local files as hints to "peel" these tables and recover the missing data. This method is particularly effective for directories containing numerous small files.

3. Handling Unknown Differences

In many practical scenarios, the number of differences ($d$) between directories is unknown beforehand. The authors utilize CGK embeddings—a technique that maps strings from edit-distance space into Hamming-distance space. This allows the parties to estimate the scale of the differences in just four rounds, ensuring the subsequent reconciliation remains efficient.

Key Theoretical Results

The paper establishes several landmark bounds for directory reconciliation:

  • Theorem 3.2: Establishes a multi-round protocol for document exchange with block moves using only $O(k \log n)$ bits, outperforming the communication requirements of traditional one-round IMS sketches.
  • Theorem 4.1: Provides a one-round directory reconciliation protocol that outperforms direct reductions to standard document exchange, especially in file-heavy directories.
  • Theorem 4.4: Demonstrates a 4-round protocol that maintains efficient communication bounds even when the parties have no prior estimate of the distance $d$.

Limitations and Future Work

Despite the theoretical advancements, the paper identifies several hurdles for practical implementation. The $O(k \log n)$ round protocol, while communication-efficient, may be unsuitable for high-latency internet connections where the time cost of each round outweighs the savings in bits. Additionally, some "set of sets" protocols face computational bottlenecks with a running time of $\Omega(nd)$, which could hinder performance in massive directories.

A primary open question remains: can the $O(k \log n)$ communication bound achieved in the multi-round protocol ever be reached in a single round? Solving this would bridge the gap between theoretical optimality and practical utility in network synchronization tools.

Summary updated

BibTeX
@misc{mitzenmacher2018directory,
  author = {Michael Mitzenmacher and Tom Morgan},
  title = {{Directory Reconciliation}},
  year = {2018},
  eprint = {1807.09686},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1807.09686},
}
Figure