Loading…
CppCon 2021 has ended
Back To Schedule
Monday, October 25 • 11:00am - 12:00pm
From Eager Futures/Promises to Lazy Continuations: Evolving an Actor Library Based on Lessons Learned from Large-Scale Deployments

Log in to save this to your schedule, view media, leave feedback and see who's attending!

Feedback form is now closed.
To meet the performance demands of a large-scale container orchestrator (Apache Mesos) we built a pre-C++11 library that, in 2009, was the first library we knew of that combined an actor programming model with futures/promises. In the first part of this talk we'll discuss why we chose to use futures/promises to build a large-scale distributed system and why actors are the perfect complementary programming model. The library served us well, helping to scale Mesos to clusters larger than 75,000 physical machines, but not without numerous bouts of optimizations and introductions of new, more efficient, constructs. We'll discuss what we learned along the way, in particular that while the intention and interface of the library was good, the underlying implementation of the library performed tons of unnecessary synchronization and dynamic memory allocation.

Now 10 years later we've rebuilt the library from scratch as part of ongoing research into distributed systems at UC Berkeley. We'll discuss how the new library focuses on *continuations* rather than futures/promises while providing the same simplicity as before when composing code. We'll walk through how programmers can use low-level constructs of the library to explicitly compose continuations together, or how they can use higher-level constructs that they can compose without using continuations at all.

The library is coroutine friendly and has some overlap with 'A Unified Executors Proposal for C++' (P0443R13), in particular that both approaches are lazy vs the eager approach of futures/promises. However, our library has a particular focus on supporting actors. This has some important design implications with respect to scheduling and memory allocation that we'll discuss in depth during this presentation, highlighting some of the differences with outstanding proposals.

ALL TALK SESSIONS CAN BE ACCESSED FROM THE MAIN LOBBY: https://cppcon.digital-medium.co.uk/

Speakers
avatar for Benjamin Hindman

Benjamin Hindman

Twitter
Benjamin Hindman is one of the creators of Apache Mesos. He began working on the project as a PhD student at UC Berkeley, and it followed him to Twitter where he is currently employed. Mesos now runs on thousands of machines at Twitter, Airbnb, etc. -- even when Ben is away skiing... Read More →


Monday October 25, 2021 11:00am - 12:00pm MDT