  We provide the first deterministic distributed synchronizer with near-optimal
time complexity and message complexity overheads. Concretely, given any
distributed algorithm $\mathcal{A}$ that has time complexity $T$ and message
complexity $M$ in the synchronous message-passing model (subject to some care
in defining the model), the synchronizer provides a distributed algorithm
$\mathcal{A}'$ that runs in the asynchronous message-passing model with time
complexity $T \cdot poly(\log n)$ and message complexity $(M+m)\cdot poly(\log
n)$. Here, $n$ and $m$ denote the number of nodes and edges in the network,
respectively. The synchronizer is deterministic in the sense that if algorithm
$\mathcal{A}$ is deterministic, then so is algorithm $\mathcal{A}'$.
Previously, only a randomized synchronizer with near-optimal overheads was
known by seminal results of Awerbuch, Patt-Shamir, Peleg, and Saks [STOC 1992]
and Awerbuch and Peleg [FOCS 1990]. We also point out and fix some inaccuracies
in these prior works.
  As concrete applications of our synchronizer, we resolve some longstanding
and fundamental open problems in distributed algorithms: we get the first
asynchronous deterministic distributed algorithms with near-optimal time and
message complexities for leader election, breadth-first search tree, and
minimum spanning tree computations: these all have message complexity
$\tilde{O}(m)$ message complexity. The former two have $\tilde{O}(D)$ time
complexity, where $D$ denotes the network diameter, and the latter has
$\tilde{O}(D+\sqrt{n})$ time complexity. All these bounds are optimal up to
logarithmic factors. Previously all such near-optimal algorithms were either
restricted to the synchronous setting or required randomization.
