HeadlinesBriefing favicon HeadlinesBriefing.com

FoundationDB launches Flow for actor‑based C++ concurrency

Hacker News •
×

FoundationDB unveiled Flow, a compiler that adds actor‑based concurrency to C++11 while preserving native performance. The tool introduces new keywords and control‑flow primitives, turning asynchronous functions into callback‑driven classes that compile to standard C++ binaries. By generating ordinary C++11 code, Flow lets developers keep existing toolchains and IDE support.

Flow’s core abstractions are Promise<T> and Future<T>, enabling actors to exchange messages without blocking. An actor pauses with wait() only when it truly needs a value, allowing other actors to run concurrently. Additional constructs like state, PromiseStream, and the choose/when syntax simplify complex coordination patterns that would otherwise require manual callback scaffolding.

Beyond productivity, Flow feeds deterministic simulations of the entire system, including network interfaces and failure modes. This tight integration lets FoundationDB verify reliability at scale while still delivering high‑throughput, low‑latency operations. The result is a maintainable, extensible concurrency model that meets the database’s original goals of speed, scalability, and testability.