C++ Actor Framework v0.18.0-rc.1 Release NotesRelease Date: 2020-09-09 // 6 months ago
- The new
fan_out_requestfunction streamlines fan-out/fan-in work flows (see
the new example in
examples/message_passing/fan_out_request.cppas well as
👍 the new manual entry). The policy-based design further allows us to support
more use cases in the future (#932, #964).
- We introduced the lightweight template class
error_codeas an alternative to
the generic but more heavyweight class
error. The new error code abstraction
simply wraps an enumeration type without allowing users to add additional
context such as error messages. However, whenever such information is
unneeded, the new class is much more efficient than using
- Tracing messages in distributed systems is a common practice for monitoring
and debugging message-based systems. The new
tracing_dataabstraction in CAF
enables users to augment messages between actors with arbitrary meta data.
🏗 This is an experimental API that requires building CAF with the CMake option
- ➕ Add compact
from..to..steplist notation in configuration files. For
[1, 2, 3]and
[4, 2, 0, -2, -4](#999).
- 👍 Allow config keys to start with numbers (#1014).
fan_out_requestfunction got an additional policy for picking just the
- ⚙ Run-time type information in CAF now uses 16-bit type IDs. Users can assign
this ID by specializing
type_idmanually (not recommended) or use the new
API for automatically assigning ascending IDs inside
- The new typed view types
👉 make working with
messageeasier by providing a
- The class
exit_msgfinally got its missing
- 📜 The class
node_idreceived an overload for
parseto allow users to convert
the output of
to_stringback to the original ID (#1058).
- Actors can now
demonitorCAF nodes (#1042). Monitoring a CAF
node causes the actor system to send a
node_down_msgto the observer when
losing connection to the monitored node.
- In preparation of potential future API additions/changes, CAF now includes an
- The new trait class
is_error_code_enumallows users to enable conversion of
custom error code enums to
- CAF now enables users to tap into internal CAF metrics as well as adding their
own instrumentation! Since this addition is too large to cover in a changelog
entry, please have a look at the new Metrics Section of the manual to learn
- 0️⃣ The
errornow renders the error code enum by default.
This renders the member functions
- 👻 Actors that die due to an unhandled exception now use
consistently. This makes
- 🏗 CAF now requires C++17 to build.
- On UNIX, CAF now uses visibility hidden by default. All API functions and
types that form the ABI are explicitly exported using module-specific macros.
🏁 On Windows, this change finally enables building native DLL files.
- 💅 We switched our coding style to the C++17 nested namespace syntax.
- CAF used to generate the same node ID when running on the same machine and
only differentiates actors systems by their process ID. When running CAF
instances in a container, this process ID is most likely the same for each
⚙ run. This means two containers can produce the same node ID and thus
equivalent actor IDs. In order to make it easier to use CAF in a containerized
environment, we now generate unique (random) node IDs (#970).
- We did a complete redesign of all things serialization. The central class
data_processorgot removed. The two classes for binary serialization no
longer extend the generic interfaces
to avoid the overhead of dynamic dispatching as well as the runtime cost of
errorreturn values. This set of changes leads so some code duplication,
because many CAF types now accept a generic
(de)serializeras well as a
binary_(de)serializerbut significantly boosts performance in the hot code
paths of CAF (#975).
- 👍 With C++17, we no longer support compilers without support for
🚚 Consequently, we removed all workarounds and switched to the C++ keyword
- Our manual now uses
LaTeX. We hope this makes
extending the manual easier and lowers the barrier to entry for new
stateful_actornow forwards excess arguments to the
Staterather than to
Base. This enables states with non-default constructors. When using
stateful_actor<State>as pointer type in function-based actors, nothing
🔄 changes (i.e. the new API is backwards compatible for this case). However,
spawn<stateful_actor<State>>(xs...)now initializes the
the argument pack
xs...(plus optionally a
selfpointer as first
argument). Furthermore, the state class can now provide a
member function to initialize the actor (this has no effect for function-based
- In order to stay more consistent with naming conventions of the standard
library, we have renamed some values of the
- CAF no longer automagically flattens
returning these types from message handlers. Users can simply replace
std::tuple<A, B, C>with
caf::result<A, B, C>for returning more than one
value from a message handler.
caf::resultcan no longer represent
skip. Whether a message gets skipped
0️⃣ or not is now only for the default handler to decide. Consequently, default
🖐 handlers now return
skippable result is a variant over
skip_t. The only good use case for message handlers that skip a message
in their body was in typed actors for getting around the limitation that a
typed behavior always must provide all message handlers (typed behavior assume
a complete implementation of the interface). This use case received direct
support: constructing a typed behavior with
argument suppresses the check for completeness.
- In order to reduce complexity of typed actors, CAF defines interfaces as a set
of function signatures rather than using custom metaprogramming facilities.
Function signatures must always wrap the return type in a
typed_actor<result<double>(double)>. We have reimplemented the
as an alternative way of writing the function signature.
- All parsing functions in
actor_system_configthat take an input stream
🔧 exclusively use the new configuration syntax (please consult the manual for
🔧 details and examples for the configuration syntax).
- The returned string of
name()must not change during the lifetime of an
stateful_actornow only considers static
namemembers in its
Statefor overriding this function. CAF always assumed names belonging to
types, but did not enforce it because the name was only used for logging.
Since the new metrics use this name for filtering now, we enforce static names
in order to help avoid hard-to-find issues with the filtering mechanism.
- The type inspection API received a complete overhaul. The new DSL for writing
inspectfunctions exposes the entire structure of an object to CAF. This
enables inspectors to read and write a wider range of data formats. In
🔧 particular human-readable, structured data such as configuration files, JSON,
XML, etc. The inspection API received too many changes to list them here.
Please refer to the manual section on type inspection instead.
- A vendor-neutral API for GPGPU programming sure sounds great. Unfortunately,
OpenCL did not catch on in the way we had hoped. At this point, we can call
👍 OpenCL dead and gone. There is only legacy support available and recent
🔖 versions of the standard were never implemented in the first place.
Consequently, we've dropped the
- The old
durationtype is now superseded by
- The enum
match_resultbecame obsolete. Individual message handlers can no
longer skip messages. Hence, message handlers can only succeed (match) or not.
Consequently, invoking a message handler or behavior now returns a boolean.
- ⏱ All member functions of
scheduled_actorfor adding stream managers (such as
make_source) were removed in favor their free-function equivalent, e.g.,
- 🔧 The configuration format of CAF has come a long way since first starting to
👍 allow user-defined configuration via
.inifiles. Rather than sticking with
the weird hybrid that evolved over the years, we finally get rid of the last
pieces of INI syntax and go with the much cleaner, scoped syntax. The new
🔧 default file name for configuration files is
- 🛠 Fix uninstall target when building CAF as CMake subdirectory.
inline_all_enqueuesin deterministic unit tests could result in
deadlocks when calling blocking functions in message handlers. This function
now behaves as expected (#1016).
- Exceptions while handling requests now trigger error messages (#1055).
- The member function
demonitorfalsely refused typed actor handles. Actors
could monitor typed actors but not demonitoring it again. This member function
is now a template that accepts any actor handle in the same way
typed_actor_viewdecorator lacked several member functions such as
send_exit, etc. These are now available.
- Constructing a
typed_actorhandle from a pointer view failed du to a missing
constructor overload. This (explicit) overload now exists and the conversion
should work as expected.
- Sending floating points to remote actors changed
🛠 garbage values (#1107). The fixed packing / unpacking routines for IEEE 754
values keep these non-numeric values intact now. It is worth mentioning that
⬇️ the new algorithm downgrades signaling NaN values to silent NaN values,
because the standard API does not provide predicates to distinguish between the
two. This should have no implications for real-world applications, because
🚦 actors that produce a signaling NaN trigger trap handlers before sending
the result to another actor.
- 📜 The URI parser stored IPv4 addresses as strings (#1123). Users can now safely
📜 assume that the parsed URI for
tcp://127.0.0.1:8080returns an IP address
- The new
Previous changes from v0.17.6
- Trying to connect to an actor published via the OpenSSL module with the I/O
module no longer hangs indefinitely (#1119). Instead, the OpenSSL module
immediately closes the socket if initializing the SSL session fails.
- Trying to connect to an actor published via the OpenSSL module with the I/O