(1) Backend-independent; Can be measured with examples/boost-asio/ping-pong-single-simple, examples/ev/ping-pong-ev.
(2) Does not apply to wx-backend; can be measured with examples/thread/ping-pong-thread, examples/boost-asio/ping-pong-2-theads, examples/ev/ping-pong-ev-2-threads.
(3) Backend-independent inter-thread messaging when build with BUILD_THREAD_UNSAFE=True. rotor objects (messages and actors) cannot be accessed from different threads, cross-thread message sending facility cannot be used. This option is mainly targeted for single-threaded apps.
license
MIT
documentation
Please read tutorial, design principles and manual here
embedded
Looking for something actor-flawored, but suiteable for embedded applications? Take a look into my rotor-light project.
Changelog
0.25 (26-Dec-2022)
[bugfix] avoid response messages loose their order relative to regular message
[bugfix, example] add missing header
0.24 (04-Jun-2022)
[feature] improve inter-thread messaging performance up to 15% by using boost::unordered_map instead of std::unordered_map
[bugfix, breaking] avoid introducing unnecessary event loops latency by intensive polling of rotor queues; affects asio and ev loops
[bugfix] registry_plugin_t, allow to discover aliased services (#46)
0.23 (23-Apr-2022)
[bugfix] fix compilation issues of messages.cpp on some platforms
[bugfix, msvc] fix compilation issues of registry plugin for shared library on msvc-16+
[bugfix] requests do not outlive actors (i.e. they are cancelled on shutdown_finish)
[example] there is my another open-source project syncspirit, which uses rotor under hood. I recommend to look at it, if the shipped examples are too-trivial, and don't give you an architectural insight of using rotor.
0.21 (25-Mar-2022)
[improvement] preliminary support of conan package manager
[bugfix] fix compilation warnings on Windows/MSVC
[bugfix] add missing header for rotor::thread installation
0.20 (20-Feb-2022)
[improvement] superviser can create spawner, which has a policy to auto-spawns new actor instance if previous instance has been shutdown. This is similar to escalate_failure supervising in erlang, see dedicated article
[improvement] actor can now autoshutdown_supervisor(), when it shutdown
[improvement] actor can now escalate_failure(), i.e. trigger shutdown own supervisor when it finished with failure
[improvement] messages delivery order is preseverd per-locality (see issue #41)
[example] examples/thread/ping-pong-spawner (new)
[example] examples/autoshutdown (new)
[example] examples/escalate-failure (new)
[documentation] updated Design principes
[documentation] updated Examples
[documentation] updated Introduction
0.19 (31-Dec-2021)
[improvement] performance improvement in inter-thread (+20%) and cross-thread messaging
[bugfix] supervisor does not shut self down in rare conditions, when it fails to initialize self
[bugfix] link_server plugin should ignore unlink_notifications
[bugfix] avoid cycle (i.e. memleak) in rare cases when supervisor is shutdown, but an external message arrives for processing
0.18 (03-Dec-2021)
[improvement] add static_assert for noexcept check of a hanler signature
[improvement/breaking] instead of using std::error_code the extended_error class is used. It wraps std::error_code, provides string context and pointer to the next extended_error cause. This greatly simplfies error tracking of errors. Every response now contains ee field instead of ec.
[improvement] actor has shutdown reason (in form of extended_error pointer)
[improvement] delivery plugin in debug mode it dumps shutdown reason in shutdown trigger messages
[improvement] actor identity has on_unlink method to get it know, when it has been unlinked from server actor
[improvement] add resources plugin for supervisor
[breaking] all responses now have extended_error pointer instread of std::error_code
[breaking] shutdown_request_t and shutdown_trigger_t messages how have shutdown reason (in form of extended_error pointer)
[bugfix] link_client_plugin_t do not invoke custom callback, before erasing request in case of failure
[bugfix] child_manager_plugin_t reactivate self if a child was created from other plugin.
[bugfix] registy actor incorrectly resolves postponed requests to wrong addresses
0.13 (26-Dec-2020)
[improvement] delivery plugin in debug mode dumps discarded messages
[breaking] state_response_t has been removed
[bugfix] allow to acquire & release resources in via resources_plugin_t, during other plugin configuration
[bugfix] foreigners_support_plugin_t did not deactivated self properly, caused assertion fail on supervisor shutdown, when there was foreign subscriptions
[bugfix] link_client_plugin_t did not notified linked server-actors, if its actor is going to shutdown; now server-actors are requested to unlink
[bugfix] starter_plugin_t sometimes crashed when subscription confirmation message arrives when actor is in non-initializing phase (i.e. shutting down)
[bugfix] root supervisor is not shutdown properly when it is linked as "server"
[improvement/breaking] plugin system where introduced for actors instead of behaviors
[improvement] actor_config_t was introduced, which now holds pointer to supervisor, init and shutdown timeouts
[improvement] builder pattern was introduced to simplify actors construction
[breaking] supervisor_config_t was changed (inherited from actor_config_t)
[breaking] actor_base_t and supervisor_t constructors has changed - now appropriate config is taken as single parameter. All descendant classes should be changed
[breaking] if a custom config type is used for actors/supervisors, they should define config_t inside the class, and templated config_builder_t.
[breaking] supervisor in actor is now accessibe via pointer instead of refence
[bugfix] supervisor_ev_t not always correctly released EV-resources, which lead to leak
[bugfix] actor_base_t can be shutted down properly even if it did not started yet
0.08 (12-Apr-2020)
[bugfix] message's arguments are more correctly forwarded
[bugfix] actor's arguments are more correctly forwarded in actor's creation inrotor::supervisor_t and rotor::asio::supervisor_asio_t
[bugfix] rotor::asio::forwarder_t now more correctly dispatches boost::asio events to actor methods; e.g. it works correctly now with async_accept method of socket_acceptor
0.07 (02-Apr-2020)
[improvement] more modern cmake usage
0.06 (09-Nov-2019)
[improvement] registy actor was added to allow via name/address runtime matching do services discovery
[improvement, breaking] minor changes in supervisor behavior: now it is considered initialied when all its children confirmed initialization
[improvement] supervisor_policy_t was introduced to control supervisor behavior on a child-actor startup failure
[example] examples/ev/pong-registry.cpp how to use registry
[doc] patterns/Registry was added
0.05 (22-Sep-2019)
[improvement] response can be inherited from rotor::arc_base, to allow forwarding requests without copying it (i.e. just intrusive pointer is created)
[example] examples/boost-asio/beast-scrapper.cpp has been added; it demonstrates an app with pool of actor workers with request-response forwarding
0.04 (14-Sep-2019)
[improvement] the request-response approach is integrated to support basic reliable messaging: response notification failure will be delivered, if the expected response will not arrive in-time
[improvement] lambda subscribiers are supported
[improvement] actor behavior has been introduced to offload actor's interface
[breaking] supervisor is constructed with help of supervisor_config_t, which contains shutdown timeout value
[breaking] supervisor does not spawns timeout timer for overall shutdown procedure, instead per-child timers are spawned. The root supervisor the same way monitors child-supervisor shut down
[breaking] supervisor create_actor method now takes child max init time value. If it does not confirm, the child actor will be asked for shut down.
[breaking] shutdown request sent to an child actor now timeout-tracked by supervisor. The message type has changed to message::shutdown_request_t
[breaking] init request sent to an child actor now timeout-tracked by supervisor. The message type has changed to message::init_request_t
[breaking] actor's state request message type now message::state_request_t, which follows the generic request/response pattern. The response type is now message::state_response_t.
[breaking] {asio, ev, ws} supervisor configs are renamed to have corresponding suffix.
0.03 (25-Aug-2019)
[improvement] locality notion was introduced, which led to possibilty to build superving trees, see blog-cpp-supervisors
[breaking] the outbound field in rotor::supervisor_t was renamed just to queue
[breaking] rotor::address_t now contains const void* locality
[breaking] rotor::asio::supervisor_config_t now contains std::shared_ptr to strand, instead of creating private strand for each supervisor
[bugfix] redundant do_start() method in rotor::supervisor_t was removed, since supervisor now is able to start self after compliting initialization.
[bugfix] rotor::supervisor_t sends initialize_actor_t to self to advance own state to INITIALIZED via common actor mechanism, instead of changeing state directly on early initialization phase (do_initialize)
[bugfix] rotor::asio::forwarder_t now more correctly dispatches boost::asio events to actor methods