All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

FoundationDB Flow Tutorial: Asynchronous Programming with Promises and Futures

By

SchwKatze

5mo ago· 16 min readenCode

Summary

This article is a tutorial on Flow, a programming framework used in FoundationDB (Apple's open-source distributed transactional key-value store). It explains Flow's asynchronous message-passing system built around Promise<> and Future<> data types, which enable components to communicate without blocking. The tutorial covers Flow's new keywords, flow controls, and design patterns for C++ programmers working with FoundationDB's distributed architecture.

Key quotes

· 4 pulled
The essence of Flow is the capability of passing messages asynchronously between components.
The basic data types that connect asynchronous senders and receivers are Promise<> and Future<>.
The sender holds a Promise<X> to, sometime in the future, deliver a value of type X to the holder of the Future<X>.
Flow introduces some new keywords and flow controls. Combining these into workable units also introduces some new design patterns to C++ programmers.
Snippet from the RSS feed
FoundationDB - the open source, distributed, transactional key-value store - apple/foundationdb

You might also wanna read