Distributed Bridging
In previous chapters, we focused on concurrency on a single machine: threads, locks, atomic operations, lock-free data structures, coroutines, and Actor/Channel models. These form the foundation of concurrent programming. In reality, however, when a single machine is no longer enough, we must face distributed environments—where networks are unreliable, clocks are inaccurate, and partial failures are inevitable.
In this chapter, we shift our perspective from intra-process to network-level, exploring how single-machine concurrency knowledge transfers to distributed scenarios. We discuss the fundamental differences of distributed systems, the spectrum of consistency models, the core ideas behind consensus protocols, and practical approaches to distributed communication using gRPC combined with C++20 coroutines. The goal here isn't to make you a distributed systems expert—rather, it's to help you build a cognitive bridge from "single-machine concurrency" to "distributed systems," so you know where the boundaries lie, which past experiences still apply, and which ones require rethinking.