An Open Source Implementation of the Actor Model in C++

Overview

CAF: C++ Actor Framework

CAF is an open source implementation of the actor model for C++ featuring lightweight & fast actor implementations, pattern matching for messages, network transparent messaging, and more.

Gitter Jenkins Documentation Status Coverity

Online Resources

Report Bugs / Get Help

Community

Get CAF

FreeBSD Ports

We maintain a port for CAF, which you can install as follows:

pkg install caf

Alternatively, you can go to /usr/ports/devel/caf and tweak a few configuration options before installing the port:

make config
make install clean

Homebrew

You can install the latest stable release with:

brew install caf

Alternatively, you can use the current development version by using:

brew install caf --HEAD

Conan

A Conan recipe for CAF along with pre-built libraries for most platforms are available at Conan Center.

VCPKG

You can build and install CAF using vcpkg dependency manager with a single command:

vcpkg install caf

The caf port in vcpkg is kept up to date by Microsoft team members and community contributors.

Get the Sources

Build CAF from Source

The easiest way to build CAF is to use the configure script. Other available options are using CMake directly or SNocs.

Using the configure Script

The script is a convenient frontend for CMake. See configure -h for a list of available options or read the online documentation.

./configure
cd build
make
make test
make install [as root, optional]

Using CMake

All available CMake variables are available online. CAF also can be included as CMake submodule or added as dependency to other CMake-based projects. The latter can be achieved by calling

find_package(CAF REQUIRED)

in respective project's CMake file. CAF's install location (e.g. by providing the CMAKE_PREFIX_PATH option) has to be known.

Using SNocs

A SNocs workspace is provided by GitHub user osblinnikov and documented online.

Dependencies

  • CMake
  • Pthread (until C++11 compilers support the new thread_local keyword)

Supported Compilers

  • GCC >= 7
  • Clang >= 4
  • MSVC >= 2019

Supported Operating Systems

  • Linux
  • Mac OS X
  • FreeBSD 10
  • Windows >= 7 (currently static builds only)

Build Documentation Locally

  • Building an offline version of the manual requires Sphinx:
    cd manual
    sphinx-build . html
  • Building an offline version of the API reference documentation requires Doxygen (simply run the doxygen command at the root directory of the repository).

Scientific Use

If you use CAF in a scientific context, please use one of the following citations:

@inproceedings{cshw-nassp-13,
  author = {Dominik Charousset and Thomas C. Schmidt and Raphael Hiesgen and Matthias W{\"a}hlisch},
  title = {{Native Actors -- A Scalable Software Platform for Distributed, Heterogeneous Environments}},
  booktitle = {Proc. of the 4rd ACM SIGPLAN Conference on Systems, Programming, and Applications (SPLASH '13), Workshop AGERE!},
  pages = {87--96},
  month = {Oct.},
  year = {2013},
  publisher = {ACM},
  address = {New York, NY, USA}
}

@article{chs-rapc-16,
  author = {Dominik Charousset and Raphael Hiesgen and Thomas C. Schmidt},
  title = {{Revisiting Actor Programming in C++}},
  journal = {Computer Languages, Systems \& Structures},
  volume = {45},
  year = {2016},
  month = {April},
  pages = {105--131},
  publisher = {Elsevier}
}

You can find the papers online at http://dx.doi.org/10.1145/2541329.2541336 and http://dx.doi.org/10.1016/j.cl.2016.01.002.

Comments
  • VC 2015 Support

    VC 2015 Support

    I tried compiling the core library on VC 2015 RC. It seems that the only remaining build issue is the following struct containing a variadic template.

    I can't parse what this is doing, but I'm wondering if there is a simple way to replace it with something similar - even if that's just a few expanded out templates....

    template <class What, typename With, class... IfStmt> struct replace_type { static constexpr bool do_replace = disjunctionIfStmt::value...::value; using type = typename replace_type_impl<do_replace, What, With>::type; };

    refactoring 
    opened by cmaughan 32
  • New stateful actors

    New stateful actors

    That's something I'm thinking of implementing for a while now and I would like to get some feedback on the idea.

    The only benefit the "old" sb_actor did provide was saving 1-2 lines of code: behavior init_behavior = ... instead of behavior make_behavior() override { ... }. It would make more sense to focus on viability of non-class based actors instead, which I personally almost always prefer anyways. The new stateful_actor could have an interface like this:

    using inc_and_fetch_atom = atom_constant<atom("IncFetch")>;
    
    struct counter_state {
      int counter = 0;
    };
    
    behavior counter(stateful_actor<counter_state>* self) {
      [](inc_and_fetch_atom) {
        return *self->counter += 1;
      }
    }
    
    int main() {
      auto cntr = spawn(counter);
    }
    

    Note the *self-> syntax. This is how a stateful actor could access its state. The more verbose version would be self->state.counter += 1. Since accessing the state is expected to be a very common operation, some syntactic sugar might be in order (even though it's a bit hacky).

    A huge benefit of this design is the following:

    struct slave_state {
      actor master;
    };
    
    struct master_state {
      actor slave;
    };
    
    behavior master(stateful_actor<master_state>* self) {
      *self->slave = spawn<monitored>(slave, self);
      // ... more stuff ...
    }
    

    When modeling the same with event_based_actors, killing the master is a memory leak. The slave keeps a reference to the master and vice versa. Actors have to actively break the cycle by setting references to invalid_actor in on_exit. Decoupling the state in this way allows the runtime to safely run the destructor for the state once the actor has finished execution!

    Opinions?

    refactoring 
    opened by Neverlord 32
  • Fix and improve response promise

    Fix and improve response promise

    1. Fix issue that promise doesn't get invalidated after delivering in non-chained cases
    2. Fix issue that typed promise delivers error response message to non-request senders
    3. Add move semantics to typed promise
    4. Add typed_response_promise::valid()
    5. Add local_actor::make_ready_response_promise()
    6. Improve unit test

    IMHO, pending() would be a better name than valid(). I also thought about the name make_fulfilled_response_promise(). But then, I realised that the standard library has been using the term ready (see here), and we should follow existing practice. There is std::future::valid(), but no similar things for std::promise. The name valid() seems a little bit odd and counter-intuitive on response promise. A fulfilled promise should be a valid promise. It's just closed an no longer pending. Users are even tempted to expect a valid promise to be a fulfilled promise, given the semantics of std::future::valid().

    Relates to #353

    improvement bugfix 
    opened by Lingxi-Li 29
  • Add datagram/UDP abstraction for brokers

    Add datagram/UDP abstraction for brokers

    The broker is currently limited to TCP-like backends. A new datagram backend for connectionless networking would significantly broaden its usefulness.

    refactoring 
    opened by Neverlord 29
  • Find better name for config_value_map

    Find better name for config_value_map

    The alias config_value_map has a very misleading name. One would expect std::map<config_value> or something similar. However, it's defined as dictionary<dictionary<config_value>>. CAF's dictionary<T> is similar to std::map<string, T> but with a string_view-based interface for more efficient access.

    The reason config_value_map is defined in this way is that this type is supposed to store the content of an .ini file. In other words, this type associates categories to a map of settings.

    Here are my current ideas for new aliases:

    using settings_map = dictionary<config_value>;
    using configuration_map = dictionary<settings_map>;
    

    This allows for intuitively named variables:

    void fill_settings(settings_map& settings, ...);
    void parse_config(configuration_map& configuration, ...);
    

    I'm not sure if configuration_map signals "this is a map over settings" clearly enough. Thoughts?

    refactoring help wanted 
    opened by Neverlord 21
  • Fix compound Boolean expressions in unit tests

    Fix compound Boolean expressions in unit tests

    It turns out that the CAF unit testing framework does not support compound Boolean expressions like x && y and x || y. The tricky part is that no diagnostic was ever issued for such use. So, you are doing it wrong, and you don't know it. I've seen such use in several unit test suits. So I fixed them and re-ran the tests. Guess what? The once-OK io_dynamic_remote_actor test suite failed. The mis-use did cover up problems! To prevent future mis-use, I modified the testing framework a bit, so that code with compound Boolean expressions is rejected.

    bugfix 
    opened by Lingxi-Li 21
  • Add thead to core affinity

    Add thead to core affinity

    This pull request adds the ability to use the thread to core affinity in CAF. Pinning threads to specific cores can, in general, improve performances and can also permit the isolation of different threads in order to avoid performance degradation (e.g., worker threads and blocking actors)

    The patch adds the Affinity Manager which is called by the Actor System every time a new thread is created and manages the affinity setting for each of them. There is the possibility to set the affinity for the different types of threads with the following configurations:

    • affinity.worker-cores for the Run-time threads
    • affinity.blocking-cores for the blocking actors
    • affinity.detached-cores for the detached actors
    • affinity.other-cores for other threads

    Each configuration supports a string that specifies a set of groups of cores in which each thread must be pinned. For instance, the string "<0,3><4-7>" specifies two groups of cores, the first is composed by the cores 0, 3 and the second by the cores 4, 5, 6, 7. Thus the first thread spawned will be restricted to the threads 0 and 3 and the second thread to the cores 4, 5, 6, and 7. Then the third thread will be pinned on the first group again and so on.

    The patch supports both Linux and Windows, macOS, instead, does not support thread to core affinity. Right now I only test it with g++ on Linux and with the Microsoft C++ compiler on Windows 10.

    I am available for any clarification.

    rejected new feature 
    opened by lucarin91 20
  • New `report_unexpected` feature

    New `report_unexpected` feature

    Almost all event-based actors have an others >> handler to discard unexpected messages, usually printing the message.

    This is quite clumsy and repetitive. We could either provide a default handler (e.g. others >> report_unexpected) or allow actors to specify a handler for unexpected messages separately. If defined, this handler would be used to consume all uncaught messages, essentially overriding the default of leaving the message in the mailbox.

    refactoring 
    opened by Neverlord 19
  • Segmentation fault in cppa::memory_managed constructor

    Segmentation fault in cppa::memory_managed constructor

    I haven't really changed my code other than updating libcppa to recent master. Now I am getting the following segfault upon program start. The program dies in the constructor of cppa::memory_managed for some to me unclear reason.

    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 0x7fffe8ff1700 (LWP 27069)]
    0x00007ffff6b68511 in cppa::memory_managed::memory_managed() () at /home/matthias/src/libcppa/./cppa/memory_managed.hpp:36
    36      class memory_managed {
    (gdb) bt
    #0  0x00007ffff6b68511 in cppa::memory_managed::memory_managed() () at /home/matthias/src/libcppa/./cppa/memory_managed.hpp:36
    #1  0x00007ffff6b8bbb8 in cppa::ref_counted::ref_counted() () at /home/matthias/src/libcppa/src/ref_counted.cpp:36
    #2  0x00007ffff6b01532 in cppa::channel::channel() () at /home/matthias/src/libcppa/./cppa/channel.hpp:70
    #3  0x00007ffff6b01313 in cppa::actor::actor() () at /home/matthias/src/libcppa/src/actor.cpp:59
    #4  0x00007ffff6b676a2 in cppa::local_actor::local_actor(bool) () at /home/matthias/src/libcppa/src/local_actor.cpp:74
    #5  0x00007ffff6b8e887 in cppa::scheduled_actor::scheduled_actor(bool) () at /home/matthias/src/libcppa/src/scheduled_actor.cpp:37
    #6  0x00007ffff6b35c5c in _ZN4cppa6detail19abstract_actor_baseINS_15scheduled_actorELb1EEC2IJbEEEDpOT_ ()
        at /home/matthias/src/libcppa/./cppa/detail/abstract_actor.hpp:78
    #7  0x00007ffff6b34cb7 in _ZN4cppa6detail14abstract_actorINS_15scheduled_actorEEC2IJbEEEDpOT_ ()
        at /home/matthias/src/libcppa/./cppa/detail/abstract_actor.hpp:198
    #8  0x00007ffff6b340a0 in cppa::detail::abstract_scheduled_actor::abstract_scheduled_actor(int) ()
        at /home/matthias/src/libcppa/./cppa/detail/abstract_scheduled_actor.hpp:120
    #9  0x00007ffff6b3315e in cppa::event_based_actor::event_based_actor() () at /home/matthias/src/libcppa/src/event_based_actor.cpp:39
    #10 0x00007ffff79cc234 in cppa::sb_actor<vast::event_source>::sb_actor() () at /home/matthias/opt/gcc/include/cppa/sb_actor.hpp:45
    #11 0x00007ffff79ba6fc in vast::event_source::event_source(cppa::intrusive_ptr<cppa::actor>, cppa::intrusive_ptr<cppa::actor>) ()
        at /home/matthias/vast/src/vast/event_source.cc:108
    
    bug 
    opened by mavam 18
  • Parallelize deserialization of incoming BASP messages

    Parallelize deserialization of incoming BASP messages

    Summary

    This set of changes addresses performance issues when distributing CAF applications.

    The BASP broker is currently bottlenecked by deserializing incoming messages. For evaluating the performance, I've used the simple_streaming benchmark, which runs a trivial streaming source that produces short strings endlessly and a sink that drops everything it receives.

    Baseline

    The baseline deploys both actors in the same process:

    $ simple_streaming -m both
    975586 messages/s
    924538 messages/s
    1088718 messages/s
    976075 messages/s
    994920 messages/s
    1095617 messages/s
    789944 messages/s
    782430 messages/s
    825262 messages/s
    848951 messages/s
    

    Distributed

    Deploying each actor in its own process (connected via localhost) drops the performance to roughly half on current master (with the source already running in the background):

    $ simple_streaming -m sink -p 4242
    538069 messages/s
    557683 messages/s
    566474 messages/s
    556036 messages/s
    537674 messages/s
    568108 messages/s
    559711 messages/s
    547152 messages/s
    550078 messages/s
    542460 messages/s
    

    Looking at the bandwidth via iftop -i lo reveals that CAF only utilizes 46 mbits.

    Distributed after the Patch

    With this patch, performance doubles:

    $ ./build/release/bin/simple_streaming --middleman.workers=2 -m sink -p 4242
    1125932 messages/s
    1254350 messages/s
    1258735 messages/s
    1285260 messages/s
    1289829 messages/s
    1215599 messages/s
    1326506 messages/s
    1274993 messages/s
    1239853 messages/s
    1388835 messages/s
    

    Looking at the bandwidth via iftop -i lo again shows that CAF utilizes about 100 mbits now.

    And yeah, this is now faster than the baseline. I don't know how that's possible. 🤷‍♂️

    The single-process setup is a topic for another day, though.

    performance 
    opened by Neverlord 17
  • Use epoll on Linux (epoll entries reused; O(log n))

    Use epoll on Linux (epoll entries reused; O(log n))

    Here's the epoll patch. Note that it avoids the linear channels scanning in the event handling section by using map(fd)->function. The patch seems to work (have seen a bit of testing in production environment).

    new feature 
    opened by ArtemGr 17
  • Improve test coverage for the flow API

    Improve test coverage for the flow API

    Most unit tests for the new flow API currently sit between 75-90% code coverage for their tested components. There are also some components that fall below 75%. For a key API like this, we should strive for >= 95% (line) test coverage for everything under caf::flow.

    testing 
    opened by Neverlord 0
  • Flow API does not integrate properly into the typed API

    Flow API does not integrate properly into the typed API

    At least these things are currently lacking:

    • Response handles lack an as_single and as_observable overload when working with typed actors
    • Typed actor views have no make_observable member function

    If we start digging, we may find more.

    bug 
    opened by Neverlord 0
  • Actors reading from SPSC buffers may end up in a loop

    Actors reading from SPSC buffers may end up in a loop

    Actors that read from an SPSC buffer with a non-stop writer at the other end can end up in a loop where each pull action immediately causes another pull action.

    Here's a potential patch:

    diff --git a/libcaf_core/caf/scheduled_actor.hpp b/libcaf_core/caf/scheduled_actor.hpp
    index dcea886fd..7a735a938 100644
    --- a/libcaf_core/caf/scheduled_actor.hpp
    +++ b/libcaf_core/caf/scheduled_actor.hpp
    @@ -807,6 +807,10 @@ private:
       /// message.
       std::vector<action> actions_;
     
    +  /// Flag that tells delay() to push actions to the mailbox if we are already
    +  /// in run_actions.
    +  bool running_actions_ = false;
    +
       /// Stores resources that block the actor from terminating.
       std::vector<disposable> watched_disposables_;
     };
    diff --git a/libcaf_core/src/scheduled_actor.cpp b/libcaf_core/src/scheduled_actor.cpp
    index 6bc9ecd64..96b5576df 100644
    --- a/libcaf_core/src/scheduled_actor.cpp
    +++ b/libcaf_core/src/scheduled_actor.cpp
    @@ -606,7 +606,12 @@ void scheduled_actor::schedule(action what) {
     }
     
     void scheduled_actor::delay(action what) {
    -  actions_.emplace_back(std::move(what));
    +  // If we are already in run_actions, we force the action through the mailbox
    +  // in order to break hot loops that would otherwise starve any other activity.
    +  if (!running_actions_)
    +    actions_.emplace_back(std::move(what));
    +  else
    +    schedule(std::move(what));
     }
     
     disposable scheduled_actor::delay_until(steady_time_point abs_time,
    @@ -1242,6 +1247,8 @@ void scheduled_actor::watch(disposable obj) {
     }
     
     void scheduled_actor::run_actions() {
    +  running_actions_ = true;
    +  auto guard = detail::make_scope_guard([this] { running_actions_ = false; });
       if (!actions_.empty()) {
         // Note: can't use iterators here since actions may add to the vector.
         for (auto index = size_t{0}; index < actions_.size(); ++index) {
    
    bug 
    opened by Neverlord 0
  • Scheduled and delayed send could return a disposable

    Scheduled and delayed send could return a disposable

    Currently, there's no way to cancel a delayed or scheduled message. However, both internally use the actor clock, which already supports that. So it should be straightforward to re-implement these function on top of actor_clock::schedule and then simply return the disposable from that call.

    feature request 
    opened by Neverlord 0
  • All inheritance graphs and collaboration graphs in doxygen documentation are broken links

    All inheritance graphs and collaboration graphs in doxygen documentation are broken links

    The CAF homepage (https://www.actor-framework.org/) links to the CAF doxygen documentation page (https://codedocs.xyz/actor-framework/actor-framework/).

    On the doxygen documentation page, it appears that all inheritance graphs and collaboration graphs are broken links.

    See for example:

    • https://codedocs.xyz/actor-framework/actor-framework/classcaf_1_1actor.html
    • https://codedocs.xyz/actor-framework/actor-framework/classcaf_1_1callback.html
    documentation 
    opened by brunorijsman 2
  • Debugging which message handlers are unresponsive

    Debugging which message handlers are unresponsive

    When designing a responsive application with an actor system (or any other concurrency framework), it is usually important for message handlers to yield control frequently, e.g., by cutting large amounts of work into smaller batches.

    One of the main challenges during development for me in this regard is to actually identify the handlers that are currently running for an actor, how long they took, and whether they sometimes take longer than expected. Now I could, in theory, add logic to the beginning and end of every actor handler for debugging purposes, which would allow for runtime extrapolation from the log, but this would be much easier to implement in CAF directly. The log approach doesn't scale well, and it doesn't work on production systems depending on the minimum log level enabled.

    I think there's an easy way to make this easier to debug that isn't even a breaking change to CAF: Introducing optionally named message handlers.

    // before
    using my_actor_handle = caf::typed_actor<
      caf::result<R1>(T...),
      caf::result<R2>(U...)
    >;
    
    // after
    using my_actor_handle = caf::typed_actor<
      caf::named_mpi<"foo", caf::result<R1>(T...)>,
      caf::named_mpi<"bar", caf::result<R2>(U...)>
    >; 
    

    This name could be used in log messages and metrics in various places:

    • Actor metrics that include how much time is spent in actor handlers compared to the total, or on average for a given handler, or even show percentiles for runtimes for individual handlers.
    • Exception handlers that show which handler they originated in, because they can retrieve the last executed handler's name.
    • Compile failures for typed actor interface mismatches that show exactly which behavior is mismatching by name.
    • Fancy debug consoles for all CAF applications similar to tokio console.

    String literal NTTPs should be possible with C++17 with some template trickery, so I think this should be implementable for current CAF.

    This is somewhere between a feature request and an unstructured brainstorming session I'd like to start; please move this over into a discussion if that format is better suited than an issue. I just wanted to get this idea written down as I think it'd make developing and maintaining CAF applications much easier.

    feature request 
    opened by dominiklohmann 2
Releases(0.19.0-rc.1)
  • 0.19.0-rc.1(Oct 31, 2022)

    Added

    • CAF now ships an all-new "flow API". This allows users to express data flows at a high level of abstraction with a ReactiveX-style interface. Please refer to new examples and the documentation for more details, as this is a large addition that we cannot cover in-depth here.
    • CAF has received a new module: caf.net. This module enables CAF applications to interface with network protocols more directly than caf.io. The new module contains many low-level building blocks for implementing bindings to network protocols. However, CAF also ships ready-to-use, high-level APIs for WebSocket and HTTP. Please have a look at our new examples that showcase the new APIs!
    • To complement the flow API as well as the new networking module, CAF also received a new set of async building blocks. Most notably, this includes asynchronous buffers for the flow API and futures / promises that enable the new HTTP request API. We plan on making these building blocks more general in the future for supporting a wider range of use cases.
    • JSON inspectors now allow users to use a custom type_id_mapper to generate and parse JSON text that uses different names for the types than the C++ API.

    Fixed

    • Passing a response promise to a run-delayed continuation could result in a heap-use-after-free if the actor terminates before the action runs. The destructor of the promise now checks for this case.
    • Accessing URI fields now always returns the normalized string.
    • The JSON parser no longer chokes when encountering null as last value before the closing parenthesis.
    • The JSON reader now automatically widens integers to doubles as necessary.
    • Module options (e.g. for the middleman) now show up in --long-help output.
    • Fix undefined behavior in the Qt group chat example (#1336).
    • The ..._instance convenience functions on the registry metric now properly support double metrics and histograms.
    • Parsing deeply nested JSON inputs no longer produces a stack overflow. Instead, the parser rejects any JSON with too many nesting levels.
    • The spinlock-based work-stealing implementation had severe performance issues on Windows in some cases. We have switched to a regular, mutex-based approach to avoid performance degradations. The new implementation also uses the mutexes for interruptible waiting on the work queues, which improves the responsiveness of the actor system (#1343).

    Changed

    • Remote spawning of actors is no longer considered experimental.
    • The output of --dump-config now prints valid config file syntax.
    • When starting a new thread via CAF, the thread hooks API now receives an additional tag that identifies the component responsible for launching the new thread.
    • Response promises now hold a strong reference to their parent actor to avoid broken_promise errors in some (legitimate) edge cases (#1361).
    • The old, experimental stream API in CAF has been replaced by a new API that is based on the new flow API.

    Deprecated

    • The obsolete meta-programming utilities replies_to and reacts_to no longer serve any purpose and are thus deprecated.
    • The types caf::byte, caf::optional and caf::string_view became obsolete after switching to C++17. Consequently, these types are now deprecated in favor of their standard library counterpart.
    • The group-based pub/sub mechanism never fit nicely into the typed messaging API and the fact that group messages use the regular mailbox makes it hard to separate regular communication from multi-cast messages. Hence, we decided to drop the group API and instead focus on the new flows and streams that can replace group-communication in many use cases.
    • The "actor-composition operator" was added as a means to enable the first experimental streaming API. With that gone, there's no justification to keep this feature. While it has some neat niche-applications, the prevent some optimization we would like to apply to the messaging layer. Hence, we will remove this feature without a replacement.

    Removed

    • The template type caf::variant also became obsolete when switching to C++17. Unfortunately, the implementation was not as standalone as its deprecated companions and some of the free functions like holds_alternative were too greedy and did not play nicely with ADL when using std::variant in the same code base. Since fixing caf::variant does not seem to be worth the time investment, we remove this type without a deprecation cycle.
    Source code(tar.gz)
    Source code(zip)
  • 0.18.6(Mar 24, 2022)

    Added

    • When adding CAF with exceptions enabled (default), the unit test framework now offers new check macros:
      • CAF_CHECK_NOTHROW(expr)
      • CAF_CHECK_THROWS_AS(expr, type)
      • CAF_CHECK_THROWS_WITH(expr, str)
      • CAF_CHECK_THROWS_WITH_AS(expr, str, type)

    Fixed

    • The DSL function run_until miscounted the number of executed events, also causing run_once to report a wrong value. Both functions now return the correct result.
    • Using allow(...).with(...) in unit tests without a matching message crashed the program. By adding a missing NULL-check, allow is now always safe to use.
    • Passing a response promise to a run-delayed continuation could result in a heap-use-after-free if the actor terminates before the action runs. The destructor of the promise now checks for this case.
    • Fix OpenSSL 3.0 warnings when building the OpenSSL module by switching to newer EC-curve API.
    • When working with settings, put, put_missing, get_if, etc. now gracefully handle the global category when explicitly using it.
    • Messages created from a message_builder did not call the destructors for their values, potentially causing memory leaks (#1321).

    Changed

    • Since support of Qt 5 expired, we have ported the Qt examples to version 6. Hence, building the Qt examples now requires Qt in version 6.
    • When compiling CAF with exceptions enabled (default), REQUIRE* macros, expect and disallow no longer call abort(). Instead, they throw an exception that only stops the current test instead of stopping the entire test program.
    • Reporting of several unit test macros has been improved to show correct line numbers and provide better diagnostic of test errors.
    Source code(tar.gz)
    Source code(zip)
  • 0.18.5(Jul 16, 2021)

    Fixed

    • 0.18.4 introduced a potential crash when using the OpenSSL module and encountering SSL_ERROR_WANT_READ. The crash manifested if CAF resumed a write operation but failed to fully reset its state. The state management (and consequently the crash) has been fixed.
    • CAF now clears the actor registry before calling the destructors of loaded modules. This fixes undefined behavior that could occur in rare cases where actor cleanup code could run after loaded modules had been destroyed.
    Source code(tar.gz)
    Source code(zip)
  • 0.18.4(Jul 7, 2021)

    Added

    • The new class caf::telemetry::importer::process allows users to get access to process metrics even when not configuring CAF to export metrics to Prometheus via HTTP.

    Changed

    • Message views now perform the type-check in their constructor. With this change, the make_* utility functions are no longer mandatory and users may instead simply construct the view directly.

    Fixed

    • Printing a config_value that contains a zero duration timespan now properly prints 0s instead of 1s (#1262). This bug most notably showed up when setting a timespan parameter such as caf.middleman.heartbeat-interval via config file or CLI to 0s and then printing the config parameter, e.g., via --dump-config.
    • Blocking actors now release their private thread before decrementing the running-actors count to resolve a race condition during system shutdown that could result in the system hanging (#1266).
    • When using the OpenSSL module, CAF could run into a state where the SSL layer wants to read data while CAF is trying to send data. In this case, CAF did not properly back off, causing high CPU load due to spinning and in some scenarios never recovering. This issue has been resolved by properly handling SSL_ERROR_WANT_READ on the transport (#1060).
    • Scheduled actors now accept default handlers for down messages etc. with non-const apply operator such as lambda expressions declared as mutable.

    Removed

    • Dropped three obsolete (and broken) macros in the unit_test.hpp header: CAF_CHECK_FAILED, CAF_CHECK_FAIL and CAF_CHECK_PASSED.
    Source code(tar.gz)
    Source code(zip)
  • 0.18.3(May 21, 2021)

    Added

    • The actor_system_config now has an additional member called config_file_path_alternatives. With this, users can configure fallback paths for locating a configuration file. For example, an application my-app on a UNIX-like system could set config_file_path to my-app.conf and then add /etc/my-app.conf to config_file_path_alternatives in order to follow the common practice of looking into the current directory first before looking for a system-wide configuration file.

    Changed

    • Counters in histogram buckets are now always integers, independently on the value type of the histogram. Buckets can never increase by fractional values.

    Deprecated

    • All parse function overloads in actor_system_config that took a custom configuration file path as argument were deprecated in favor of consistently asking users to use the config_file_path and config_file_path_alternatives member variables instead

    Fixed

    • For types that offer implicit type conversion, trying to construct a result<T> could result in ambiguity since compilers could construct either T itself or expected<T> for calling a constructor of result<T>. To fix the ambiguity, result<T> now accepts any type that allows constructing a T internally without requiring a type conversion to T as an argument (#1245).
    • Fix configuration parameter lookup for the work-stealing scheduler policy.
    • Applications that expose metrics to Prometheus properly terminate now.
    Source code(tar.gz)
    Source code(zip)
  • 0.18.2(Mar 26, 2021)

    Added

    • CAF includes two new inspector types for consuming and generating JSON-formatted text: json_writer and json_reader.

    Changed

    • Setter functions for fields may now return either bool, caf::error or void. Previously, CAF only allowed bool.

    Fixed

    • Passing a getter and setter pair to an inspector via apply produced a compiler error for non-builtin types. The inspection API now recursively inspects user-defined types instead, as was the original intend (#1216).
    • The handle type typed_actor now can construct from a typed_actor_pointer. This resolves a compiler error when trying to initialize a handle for my_handle from a self pointer of type my_handle::pointer_view (#1218).
    • Passing a function reference to the constructor of an actor caused a compiler error when building with logging enabled. CAF now properly handles this edge case and logs such constructor arguments as <unprintable> (#1229).
    • The CLI parser did not recognize metrics filters. Hence, passing --caf.metrics-filters.actors.includes=... to a CAF application resulted in an error. The includes and excludes filters are now consistently handled and accepted in config files as well as on the command line (#1238).
    • Silence a deprecated-enum-conversion warning for std::byte (#1230).
    • Fix heap-use-after-free when accessing the meta objects table in applications that leave the main function while the actor system and its worker threads are still running (#1241).
    • The testing DSL now properly accounts for the message prioritization of actors (suspending regular behavior until receiving the response) when using request.await (#1232).
    Source code(tar.gz)
    Source code(zip)
  • 0.18.1(Mar 19, 2021)

    Fixed

    • Version 0.18.0 introduced a regression on the system parameter caf.middleman.heartbeat-interval (#1235). We have addressed the issue by porting the original fix for CAF 0.17.5 (#1095) to the 0.18 series.
    Source code(tar.gz)
    Source code(zip)
  • 0.18.0(Jan 25, 2021)

    Added

    • The enum caf::sec received an additional error code: connection_closed.
    • The new byte_span and const_byte_span aliases provide convenient definitions when working with sequences of bytes.
    • The base metrics now include four new histograms for illuminating the I/O module: caf.middleman.inbound-messages-size, caf.middleman.outbound-messages-size, caf.middleman.deserialization-time and caf.middleman.serialization-time.
    • The macro CAF_ADD_TYPE_ID now accepts an optional third parameter for allowing users to override the default type name.
    • The new function pair get_as and get_or model type conversions on a config_value. For example, get_as<int>(x) would convert the content of x to an int by either casting numeric values to int (with bound checks) or trying to parse the input of x if it contains a string. The function get_or already existed for settings, but we have added new overloads for generalizing the function to config_value as well.
    • The typed_response_promise received additional member functions to mirror the interface of the untyped response_promise.
    • Configuration files now allow dot-separated notation for keys. For example, users may write caf.scheduler.max-threads = 4 instead of the nested form caf { scheduler { max-threads = 4 } }.

    Deprecated

    • The new get_as and get_or function pair makes type conversions on a config_value via get, get_if, etc. obsolete. We will retain the STL-style interface for treating a config_value as a variant-like type.

    Changed

    • When using CAF_MAIN, CAF now looks for the correct default config file name, i.e., caf-application.conf.
    • Simplify the type inspection API by removing the distinction between apply_object and apply_value. Instead, inspectors only offer apply and users may now also call map, list, and tuple for unboxing simple wrapper types. Furthermore, CAF no longer automatically serializes enumeration types using their underlying value because this is fundamentally unsafe.
    • CAF no longer parses the input to string options on the command line. For example, my_app '--msg="hello"' results in CAF storing "hello" (including the quotes) for the config option msg. Previously, CAF tried to parse any string input on the command-line that starts with quotes in the same way it would parse strings from a config file, leading to very unintuitive results in some cases (#1113).
    • Response promises now implicitly share their state when copied. Once the reference count for the state reaches zero, CAF now produces a broken_promise error if the actor failed to fulfill the promise by calling either dispatch or delegate.

    Fixed

    • Setting an invalid credit policy no longer results in a segfault (#1140).
    • Version 0.18.0-rc.1 introduced a regression that prevented CAF from writing parameters parsed from configuration files back to variables. The original behavior has been restored, i.e., variables synchronize with user input from configuration files and CLI arguments (#1145).
    • Restore correct functionality of middleman::remote_lookup (#1146). This fixes a regression introduced in version 0.18.0-rc.1
    • Fixed an endless recursion when using the default_inspector from inspect overloads (#1147).
    • CAF 0.18 added support for make_behavior in state classes. However, CAF erroneously picked this member function over running the function body when spawning function-based actors (#1149).
    • When passing nullptr or custom types with implicit conversions to const char* to deep_to_string, CAF could run into a segfault in the former case or do unexpected things in the latter case. The stringification inspector now matches precisely on pointer types to stop the compiler from doing implicit conversions in the first place.
    • Building executables that link to CAF on 32-bit Linux versions using GCC failed due to undefined references to __atomic_fetch symbols. Adding a CMake dependency for caf_core to libatomic gets executables to compile and link as expected (#1153).
    • Fixed a regression for remote groups introduced in 0.18.0-rc.1 (#1157).
    • CAF 0.18 introduced the option to set different excluded-components filters for file and console log output. However, CAF rejected all events that matched either filter. The new implementation uses the intersection of both filters to reject log messages immediately (before enqueueing it to the logger's queue) and then applies the filters individually when generating file or console output.
    • Fix memory leaks when deserializing URIs and when detaching the content of messages (#1160).
    • Fix undefined behavior in string_view::compare (#1164).
    • Fix undefined behavior when passing --config-file= (i.e., without actual argument) to CAF applications (#1167).
    • Protect against self-assignment in a couple of CAF classes (#1169).
    • Skipping high-priority messages resulted in CAF lowering the priority to normal. This unintentional demotion has been fixed (#1171).
    • Fix undefined behavior in the experimental datagram brokers (#1174).
    • Response promises no longer send empty messages in response to asynchronous messages.
    • CAF_ADD_TYPE_ID now works with types that live in namespaces that also exist as nested namespace in CAF such as detail or io (#1195).
    • Solved a race condition on detached actors that blocked ordinary shutdown of actor systems in some cases (#1196).
    Source code(tar.gz)
    Source code(zip)
  • 0.18.0-rc.1(Sep 9, 2020)

    Added

    • The new fan_out_request function streamlines fan-out/fan-in work flows (see the new example in examples/message_passing/fan_out_request.cpp as 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_code as 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 error.
    • Tracing messages in distributed systems is a common practice for monitoring and debugging message-based systems. The new tracing_data abstraction 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 CAF_ENABLE_ACTOR_PROFILER (#981).
    • Add compact from..to..step list notation in configuration files. For example, [1..3] expands to [1, 2, 3] and [4..-4..-2] expands to [4, 2, 0, -2, -4] (#999).
    • Allow config keys to start with numbers (#1014).
    • The fan_out_request function got an additional policy for picking just the fist result: select_any (#1012).
    • Run-time type information in CAF now uses 16-bit type IDs. Users can assign this ID by specializing type_id manually (not recommended) or use the new API for automatically assigning ascending IDs inside CAF_BEGIN_TYPE_ID_BLOCK and CAF_END_TYPE_ID_BLOCK code blocks.
    • The new typed view types typed_message_view and const_typed_message_view make working with message easier by providing a std::tuple-like interface (#1034).
    • The class exit_msg finally got its missing operator== (#1039).
    • The class node_id received an overload for parse to allow users to convert the output of to_string back to the original ID (#1058).
    • Actors can now monitor and demonitor CAF nodes (#1042). Monitoring a CAF node causes the actor system to send a node_down_msg to the observer when losing connection to the monitored node.
    • In preparation of potential future API additions/changes, CAF now includes an RFC4122-compliant uuid class.
    • The new trait class is_error_code_enum allows users to enable conversion of custom error code enums to error and error_code.
    • 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 more.

    Deprecated

    • The to_string output for error now renders the error code enum by default. This renders the member functions actor_system::render and actor_system_config::render obsolete.
    • Actors that die due to an unhandled exception now use sec::runtime_error consistently. This makes exit_reason::unhandled_exception obsolete.

    Changed

    • 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_processor got removed. The two classes for binary serialization no longer extend the generic interfaces serializer and deserializer in order to avoid the overhead of dynamic dispatching as well as the runtime cost of error return values. This set of changes leads so some code duplication, because many CAF types now accept a generic (de)serializer as well as a binary_(de)serializer but significantly boosts performance in the hot code paths of CAF (#975).
    • With C++17, we no longer support compilers without support for thread_local. Consequently, we removed all workarounds and switched to the C++ keyword (#996).
    • Our manual now uses reStructuredText instead of LaTeX. We hope this makes extending the manual easier and lowers the barrier to entry for new contributors.
    • A stateful_actor now forwards excess arguments to the State rather than to the 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, calling spawn<stateful_actor<State>>(xs...) now initializes the State with the argument pack xs... (plus optionally a self pointer as first argument). Furthermore, the state class can now provide a make_behavior member function to initialize the actor (this has no effect for function-based actors).
    • In order to stay more consistent with naming conventions of the standard library, we have renamed some values of the pec enumeration:
      • illegal_escape_sequence => invalid_escape_sequence
      • illegal_argument => invalid_argument
      • illegal_category => invalid_category
    • CAF no longer automagically flattens tuple, optional, or expected when 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.
    • A caf::result can no longer represent skip. Whether a message gets skipped or not is now only for the default handler to decide. Consequently, default handlers now return skippable_result instead of result<message>. A skippable result is a variant over delegated<message>, message, error, or 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 partial_behavior_init as first 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 result<T>. For example: typed_actor<result<double>(double)>. We have reimplemented the metaprogramming facilities racts_to<...> and replies_to<...>::with<...> as an alternative way of writing the function signature.
    • All parsing functions in actor_system_config that 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 actor. Hence, stateful_actor now only considers static name members in its State for 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 inspect functions 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.

    Removed

    • 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 opencl module.
    • The old duration type is now superseded by timespan (#994).
    • The enum match_result became 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_actor for adding stream managers (such as make_source) were removed in favor their free-function equivalent, e.g., attach_stream_source
    • The configuration format of CAF has come a long way since first starting to allow user-defined configuration via .ini files. 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 caf-application.conf.

    Fixed

    • Fix uninstall target when building CAF as CMake subdirectory.
    • Using inline_all_enqueues in 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 demonitor falsely 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 monitor already did.
    • The typed_actor_view decorator lacked several member functions such as link_to, send_exit, etc. These are now available.
    • Constructing a typed_actor handle 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 infinity and NaN to 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:8080 returns an IP address when calling authority().host.
    Source code(tar.gz)
    Source code(zip)
  • 0.17.6(Jul 24, 2020)

    Fixed

    • 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.
    Source code(tar.gz)
    Source code(zip)
  • 0.17.5(May 13, 2020)

    Added

    • In order to allow users to start migrating towards upcoming API changes, CAF 0.17.5 includes a subset of the CAF 0.18 type_id API. Listing all user-defined types between CAF_BEGIN_TYPE_ID_BLOCK and CAF_END_TYPE_ID_BLOCK assigns ascending type IDs. Only one syntax for CAF_ADD_ATOM exists, since the atom text is still mandatory. Assigning type IDs has no immediate effect by default. However, the new function actor_system_config::add_message_types accepts an ID block and adds runtime-type information for all types in the block.
    • In order to opt into the compile-time checks for all message types, users can set the CAF_ENABLE_TYPE_ID_CHECKS CMake flag to ON (pass --enable-type-id-checks when using the configure script). Building CAF with this option causes compiler errors when sending a type without a type ID. This option in conjunction with the new add_message_types function removes a common source of bugs: forgetting to call add_message_type<T> for all types that can cross the wire.

    Changed

    • Our manual now uses reStructuredText instead of LaTeX (backport from 0.18).

    Fixed

    • Fix handling of OS-specific threading dependency in CMake.
    • Fix uninstall target when building CAF as CMake subdirectory (backport from 0.18).
    • Fix potential deadlock with inline_all_enqueues (backport from 0.18).
    • Exceptions while handling requests now trigger error messages (backport from 0.18).
    • Fix build on GCC 7.2
    • Fix build error in the OpenSSL module under some MSVC configurations
    • Serializer and deserializer now accept std::chrono::time_point for all clock types instead of hard-wiring std::system_clock.
    • In some edge cases, actors failed to shut down properly when hosting a stream source (#1076). The handshake process for a graceful shutdown has been fixed.
    • Fixed a compiler error on Clang 10 (#1077).
    • Setting lists and dictionaries on the command line now properly overrides default values and values from configuration files instead of appending to them (#942).
    • Using unquoted strings in command-line arguments inside lists now works as expected. For example, --foo=abc,def is now equivalent to --foo=["abc", "def"].
    • Fixed a type mismatch in the parameter middleman.heartbeat-interval (#1095). CAF consistently uses timespan for this parameter now.
    Source code(tar.gz)
    Source code(zip)
  • 0.17.4(Feb 8, 2020)

    • Accept numbers as keys in the config syntax (#1014)
    • Fix behavior of inline_all_enqueues in the testing DSL (#1016)
    • Make sure actors that receive stream input shut down properly (#1019)
    • Fix undesired function hiding in fused_downstream_manager (#1020)
    • Improve to_string output for caf::error (#1021)
    • Fix path recognition in the URI parser, e.g., file:/// is now valid (#1013)
    • Properly report errors to users while connecting two CAF nodes (#1023)
    • Simplify crosscompilation: remove build dependency on code generators (#1026)
    • Leave CXX settings to the (CMake) parent when building as subdirectory (#1032)
    • Build without documentation in subdirectory mode (#1037)
    • Allow parents to set OPENSSL_INCLUDE_DIR in subdirectory mode (#1037)
    • Add -pthread flag on UNIX when looking for libc++ support (#1038)
    • Add missing operator== for exit_msg (#1039)
    • Avoid producing unexpected log files (#1024)
    Source code(tar.gz)
    Source code(zip)
  • 0.17.3(Nov 11, 2019)

    • Add support for OpenBSD (#955)
    • Provide uniform access to actor properties (#958)
    • Fix bug in stream managers that caused finalizers to get called twice (#937)
    • Fix verbosity level with disabled console output (#953)
    • Fix excessive buffering in stream stages (#952)
    • Add missing to_string(pec) (#940)
    Source code(tar.gz)
    Source code(zip)
  • 0.16.5(Nov 11, 2019)

  • 0.17.2(Oct 20, 2019)

    • Add scheduled_send for delayed sends with absolute timeout (#901)
    • Allow actors based on composable behaviors to use the streaming API (#902)
    • Fix memory leak when deserializing node_id (#905)
    • Fix composition of statically typed actors using streams (#908)
    • Reduce stack usage of serializers (#912)
    • Fix several warnings on GCC and Clang (#915)
    • Use default installation directories on GNU/Linux (#917)
    • Fix holds_alternative and get_if for settings (#920)
    • Support arbitrary list and map types in config_value (#925)
    • Allow users to extend config_value API (#929, #938)
    • Fix silent dropping of errors in response handlers (#935)
    • Fix stall in remote_group on error (#933)
    Source code(tar.gz)
    Source code(zip)
  • 0.16.4(Nov 11, 2019)

  • 0.17.1(Aug 31, 2019)

    • Fix endless loop in config parser (#894)
    • Fix debug build with Clang 7 on Linux (#861)
    • Fix type-specific parsing of config options (#814)
    • Improve CMake setup when building CAF as subfolder (#866)
    • Fix potential deadlock in proxy registry (#880)
    • Fix output of --dump-config (#876)
    • Fix potential segfault when using streams with trace logging enabled (#878)
    • Properly set CLI remainder (#871)
    • Support nesting of group names in .ini files (#870)
    • Support all alphanumeric characters in config group names (#869)
    • Fix handling of containers with user-defined types (#867)
    • Fix defaulted_function_deleted warning on Clang (#859)
    Source code(tar.gz)
    Source code(zip)
  • 0.15.8(Aug 7, 2019)

  • 0.17.0(Jul 27, 2019)

    • Parallelize deserialization of messages received over the network (#821). Moving the deserialization out of the I/O loop significantly increases performance. In our benchmark, CAF now handles twice as many messages per second.
    • Add marker to make categories optional on the CLI: Categories are great at organizing program options. However, on the CLI they get in the way quickly. This change allows developers to prefix category names with ? to make it optional on the CLI.
    • Fix performance of thread-safe actor clock (#849). This clock type is used whenever sending requests, delayed messages, receive timeouts etc. CAF can handle about 10x more timeouts per second after the patch.
    • Relax ini syntax for maps by making = for defining maps and , for separating key-value pairs optional. For example, this change allows to rewrite an entry like this:
      logger = {
        console-verbosity='trace',
        console='colored'
      }
      

      to a slightly less noisy version such as this:

      logger {
        console-verbosity='trace'
        console='colored'
      }
      
    • Allow apps to always use the caf::logger, whether or not CAF was compiled with logging enabled.
    • Fix over- and underflow checks in number parser (#852).
    • Fix multicast address detection in caf::ipv4_address.cpp (#853).
    • Fix disconnect issue / WSAGetLastError usage on Windows (#846).
    • Fix --config-file option (#841).
    • Fix parsing of CLI arguments for strings and atom values.
    • Add conversion from nullptr to intrusive and COW pointer types.
    • Streamline direct node-to-node communication and support multiple app identifiers.
    • Reimplement binary_serializer and binary_deserializer without STL-style stream buffers for better performance.
    • Support move-only behavior functions.
    • Allow users to omit global in config files.
    • Allow IPO on GCC/Clang (#824).
    Source code(tar.gz)
    Source code(zip)
  • 0.16.3(Dec 27, 2018)

    • Fix linker issue with socket_guard
    • Add copy-on-write tuple implementation
    • Add missing function overload to caf::dictionary
    • Implement graceful shutdown of TCP connections
    • Consitently use ISO 8601 for printing timestamps
    • Fix logger output for class names
    • Fix deserializing into non-empty vectors
    • Add to_lowercase convenience function for atoms
    • Use bounded queue for the logger
    • Fix caf::split algorithm
    • Add --libs-only convenience option to configure script
    • Fix several compiler warnings
    • Improve error reporting on function-based actors
    • Fix subtle bug in actor destruction
    • Dequeue high-priority messages first
    Source code(tar.gz)
    Source code(zip)
  • 0.16.2(Nov 3, 2018)

  • 0.16.1(Oct 31, 2018)

    Changes:

    • Add an example for the streaming API
    • Make build_config.hpp part of the build
    • Implement noexcept-correctness for variant
    • Fix potential deadlock in the thread-safe clock
    • Implement graceful shutdown of streams after quit
    • Integrate manual into the main repository
    • Give CAF threads recognizable names for debugging
    • Demote internal messages from INFO to DEBUG level
    • Fix dictionary emplace with char array
    • Set CLOEXEC flag on socket/accept/pipe calls
    • Add non-overriding receive timouts to actor clock
    • Use insert for faster appending in xsputn
    • Allow different log levels for file and console
    • Add --extra-flags= option to configure script
    • Make COW pointer implementation publicly available
    • Fix various missing includes and forward declarations
    Source code(tar.gz)
    Source code(zip)
  • 0.16.0(Sep 3, 2018)

    Changes:

    • Revise config value API
      • Deprecate all individual members of actor_system_config
      • Add get_or(name, default) API for accessing settings
    • Implement CE-0002
    • Add experimental streaming feature
    • Add C++17-compatible string_view class
    • Remove legacy ASIO-based multiplexer
    • Add IP address and subnet classes for v4 and v6
    • Add URI abstraction according to RFC 3986
    • Improve testing DSLs for deterministic testing
    • Fix the "quiet" log level and output to uncolored terminals
    Source code(tar.gz)
    Source code(zip)
  • 0.15.7(Mar 21, 2018)

  • 0.15.6(Mar 10, 2018)

    Changes:

    • Fix behavior of result<unit_t> (#652)
    • Fix compilation errors on Windows (#644)
    • Fix build with OpenSSL <= 1.0.1 (#629)
    • Fix bulid for MinGW (#643)
    • Fix compilation error with the Python module
    • Fix compilation error with MSVC v140_clang_c2
    • Add experimental support for UDP brokers
    • New actor clock abstraction that allows actors to cancel timeouts
    • Implement C++17-compatible n-ary visit for variant
    Source code(tar.gz)
    Source code(zip)
  • 0.15.5(Oct 19, 2017)

    Changes:

    • Fix a connection issue caused by re-used socket IDs (#606)
    • Fix memory issues when linking to many actors (#605)
    • Fix potential deadlock in network backend (#604)
    • Add hooks for running code whenever CAF starts/terminates a thread (#603)
    • Fix default value for config parameter that could freeze the system (#599)
    Source code(tar.gz)
    Source code(zip)
  • 0.15.4(Sep 29, 2017)

    Changes:

    • Add experimental OpenSSL module
    • Add (very) experimental support for streams using micro batching
    • Fix parse issue with XCode (#551)
    • Fix a bug with nested request(...).await(...) statements (#550)
    • Fix FreeBSD 12 build with Clang 4.0 (#545)
    • Fix serialization of std::vector<bool> (#540)
    • Fix potential deadlock when linking actors (#536)
    • Fix to_string unit test on Raspbian (#534)
    • Add reuse flag to publish_local_groups (#526)
    • Adopt C++17 API for caf::variant (#525)
    Source code(tar.gz)
    Source code(zip)
  • 0.14.6(May 24, 2017)

  • 0.15.3(Jan 10, 2017)

    Changes:

    • Allow calling set_down_handler from within a down handler
    • Fix race condition when spawning blocking actors
    • Implement colored output of caf-test on Windows
    • Improve logger component
    • Enable removal of all workers at once in an actor_pool
    Source code(tar.gz)
    Source code(zip)
  • 0.15.2(Nov 24, 2016)

    Changes:

    • Fix timeout handling in blocking actors
    • Add delegate function to response_promise
    • Add ccache build option
    • Make variant comparable and serializable
    • Make logger configurable
    • Add new timestamp type representing UNIX time
    Source code(tar.gz)
    Source code(zip)
Owner
CAF: C++ Actor Framework
An Open Source Implementation of the Actor Model in C++
CAF: C++ Actor Framework
✔️The smallest header-only GUI library(4 KLOC) for all platforms

Welcome to GUI-lite The smallest header-only GUI library (4 KLOC) for all platforms. 中文 Lightweight ✂️ Small: 4,000+ lines of C++ code, zero dependenc

null 6.5k Nov 24, 2022
An implementation of Actor, Publish-Subscribe, and CSP models in one rather small C++ framework. With performance, quality, and stability proved by years in the production.

What is SObjectizer? What distinguishes SObjectizer? SObjectizer is not like TBB, taskflow or HPX Show me the code! HelloWorld example Ping-Pong examp

Stiffstream 308 Nov 15, 2022
Laughably simple Actor concurrency framework for C++20

Light Actor Framework Concurrency is a breeze. Also a nightmare, if you ever used synchronization techniques. Mostly a nightmare, though. This tiny li

Josip Palavra 93 Sep 11, 2022
Event loop friendly C++ actor micro-framework

Rotor rotor is event loop friendly C++ actor micro framework, github gitee features minimalistic loop agnostic core erlang-like hierarchical superviso

Ivan Baidakou 231 Oct 27, 2022
ESP32-Skid-Steer - Bruder Catepillar Skid Steer model converted to RC, controlled by an ESP32 with 2 analog joysticks and a receiver that is an ESP32 on the model.

ESP32-Skid-Steer Bruder Catepillar Skid Steer model converted to RC, controlled by an ESP32 with 2 analog joysticks and a receiver that is an ESP32 on

null 6 Oct 27, 2022
MySQL Server, the world's most popular open source database, and MySQL Cluster, a real-time, open source transactional database.

Copyright (c) 2000, 2021, Oracle and/or its affiliates. This is a release of MySQL, an SQL database server. License information can be found in the

MySQL 8.5k Nov 24, 2022
This is a list of different open-source video games and commercial video games open-source remakes.

This is a list of different open-source video games and commercial video games open-source remakes.

Ivan Bobev 152 Nov 28, 2022
Open Source Cheat for Apex Legends, designed for ease of use. Made to understand reversing of Apex Legends and respawn's modified source engine as well as their Easy Anti Cheat Implementation.

Apex-Legends-SDK Open Source Cheat for Apex Legends, designed for ease of use. Made to understand reversing of Apex Legends and respawn's modified sou

null 107 Nov 20, 2022
Open-source and open-hardware scientific RPN calculator

OpenRPNCalc Open-source and open-hardware scientific RPN calculator Introduction OpenRPNCalc is a scientific calculator based on STM32 microcontroller

Anton Poluektov 145 Nov 10, 2022
OpenMW is an open-source open-world RPG game engine that supports playing Morrowind.

OpenMW is an open-source open-world RPG game engine that supports playing Morrowind.

null 4.5k Nov 30, 2022
A fully-functional open source and open hardware mechanical USB computer keyboard with only three keys!

threeboard threeboard is a fully-functional open source and open hardware mechanical USB computer keyboard with only three keys. It supports multiple

Conor Taylor 97 Nov 15, 2022
An open-source implementation of Autodesk's FBX

SmallFBX An open-source implementation of Autodesk's FBX that is capable of import & export mesh, blend shape, skin, and animations. Mainly intended t

Seiya Ishibashi 42 Oct 13, 2022
An open source re-implementation of RollerCoaster Tycoon 2 🎢

An open source re-implementation of RollerCoaster Tycoon 2 ??

OpenRCT2 11.2k Dec 1, 2022
An open source re-implementation of LEGO Rock Raiders 🪨⛏

OpenLRR An open source re-implementation of LEGO Rock Raiders (PC). This is created by slowly implementing and replacing game functionality, while rel

Robert Jordan 39 Oct 9, 2022
An open source implementation of the dark souls 3 game server.

What is this project? An open source implementation of the dark souls 3 game server. Idealistically made for the purpose of allow better alternatives

Tim Leonard 539 Nov 29, 2022
An open source re-implementation of Final Alert 1.0.2 written in C++.

Motivation The project is a rewrite of Final Alert 2, a map editor for Command and Conquer: Red Alert 2 and Command and Conquer: Yuri's Revenger and t

SEC-SOME 3 Nov 17, 2022
An open source implementation of the dark souls 2 game server.

WARNING: This is non-functional, its an initial branch from ds3os. What is this project? An open source implementation of the dark souls 2 game server

Tim Leonard 42 Oct 8, 2022
An open source UI re-implementation based on GTA:V, built for GTA: San Andreas.

V Hud: A work-in-progress user interface overhaul, for Grand Theft Auto: San Andreas, based on Grand Theft Auto: V. Project has been made in order to

_AG 104 Nov 29, 2022