Home > On-Demand Archives > Talks >

ActiveCpp: Active Objects for Modern C++

Amir Alavi - Watch Now - EOC 2025 - Duration: 31:58

ActiveCpp: Active Objects for Modern C++
Amir Alavi

The Active Object design pattern is a concurrency pattern that decouples method execution from method invocation to enhance the responsiveness and scalability of an application. This pattern is particularly useful in scenarios where multiple operations need to be performed concurrently without blocking the main thread of execution.

This talk presents modern methods for the Active Object design pattern, also known as Actor objects, in C++ and introduces activecpp (https://github.com/samiralavi/activecpp), a useful single-header templated library to implement this pattern effectively. Key features of the Active Object design pattern, alongside best practices for low-power embedded systems, are discussed, and the activecpp library is showcased for a typical IoT application on an ESP32-S3 SoC-based devkit.

1 / 4
Please log in or create an account to test your knowledge and see the answers.

What did the speaker identify as the primary advantage of the Active Object (actor) design pattern in embedded C++ systems?

A It decouples method execution from method invocation, letting public APIs be called safely while execution runs in the actor's thread.
B It eliminates the need for any threads — everything runs on a single main loop so concurrency is unnecessary.
C It requires all actors to share a global state protected by mutexes to coordinate behavior.
D It guarantees zero-copy mutable messages so receivers can modify messages in-place across threads.
E It replaces message passing with synchronous RPC to simplify communication.
M↓ MARKDOWN HELP
italicssurround text with
*asterisks*
boldsurround text with
**two asterisks**
hyperlink
[hyperlink](https://example.com)
or just a bare URL
code
surround text with
`backticks`
strikethroughsurround text with
~~two tilde characters~~
quote
prefix with
>

datamstr
Score: 0 | 9 months ago | no reply

Excellent presentation!

Miro
Score: 0 | 9 months ago | no reply

Thank you for your presentation of the Active Object model of computation and the ActiveCpp framework. Having worked with Active Objects for a very long time, I'm really glad to see the interest and appreciation for Active Objects/Actors, especially in embedded systems.

One great benefit of Active Objects that I would add to your summary is the non-blocking, RTC (run-to-completion) event processing model. This is perhaps the most consequential departure from the traditional "shared-state concurrency with blocking" based on the traditional RTOS because blocking is technical debt.

Also, have you considered adding explicit support fo state machines to the ActiveCpp framework? Active Objects and state machines beautifully complement each other. Without state machines, the event-driven code inside Active Objects tends to quickly degenerate into "spaghetti code". At the same time, event-driven state machines precisely need the RTC model of execution.

OUR SPONSORS & PARTNERS