Boost logo

Boost :

Subject: Re: [boost] Is there any interest in a library for actor programming?
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2013-05-18 17:54:51

Le 17/05/13 23:26, Charousset, Dominik a écrit :
> Hi,
> is there any interest in a library for actor programming?
> The library we've developed is a C++11 open source library named "libcppa". It is currently released under LGPL2, but re-releasing the library under the boost license is not an issue. You'll find all important links and ressources either under or on the GitHub project page:, including a user manual as HTML or PDF. We've also submitted a paper to the C++Now conference.
> What is actor programming? For those of you who aren't yet familiar with the actor model: actors basically represent tasks or services that communicate via message passing. In libcppa, actors are very lightweight (you can spawn literally millions of them) and scheduled cooperatively using a thread pool (although actors are allowed to opt-out of the cooperative scheduling). Some of the main strengths of this programming paradigm are: (1) network transparency, (2) race conditions are avoided by design, (3) a strong failure model that enables developers to build reliable distributed systems, and (4) the actor model addresses both concurrency (multiple actors on one host) and distribution (any number of actors on any number of hosts).
> A message is simply a tuple of values that is pattern matched at the receiver. For example, " on_arg_match >> [](const string& what) {...}" defines a message handler that is called whenever a tuple with one single string element arrives. "on_arg_match" simply defines a pattern that matches the signature of the given lambda.
> Please have a look at the examples folder on GitHub ( or at the user manual ( if you want to see more examples.

This is really a lot of good and interesting work on your library.

Moving all the library to the Boost standards would be quite a lot of
work however. Replacing some classes by the corresponding Boost ones.

I would see already several Boost libraries in your libcppa library:
* Atoms
* CowTuples
* Dynamically Typed Tuples - type erased tuples
* Tuples Pattern matching
* Actors

There is something that I would like to see on the Actors architecture.
The interface of an actor is not really defined other than by their
behavior. It can receive any dynamic tuple. This is a lot. I would like
a more statically typed interface. An actor could define statically the
kind of messages/signals it is allowed to handle and make it part of the

While I find your tuple pattern matching quite interesting I'm looking
for a more low level interface for the Actors part, that doesn't force
to use tuples. It provides just a way to identify uniquely the message
type and the associated data.

on<messageType> >> [](associatedDateType const& data) { /*...*/},

Of course the user could already use {atom("messageName"),
associatedDataType()}, but this forces the user to use a cow data type
that could be too costly for some applications. As most the
communications are point to point, the ownership of the message is quite
clear in these cases, so no need for COW.

Last but not least your library works only on some C++11 compilers. I
have nothing against having C++11 specific libraries in Boost, even the
opposite (I proposed it long time ago) but the fact is that currently,
the Boost libraries provide at least a minimal interface on C++98
compilers. I don't know what the Boost community thinks about this point

Welcome, keep up the good work and good luck with your library,

Boost list run by bdawes at, gregod at, cpdaniel at, john at