Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
23efb520
Commit
23efb520
authored
Feb 18, 2020
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Integrate review feedback
parent
e1f57de6
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
28 deletions
+26
-28
manual/Actors.rst
manual/Actors.rst
+1
-1
manual/Brokers.rst
manual/Brokers.rst
+1
-1
manual/ConfiguringActorApplications.rst
manual/ConfiguringActorApplications.rst
+7
-8
manual/GroupCommunication.rst
manual/GroupCommunication.rst
+4
-4
manual/Messages.rst
manual/Messages.rst
+6
-6
manual/Scheduler.rst
manual/Scheduler.rst
+7
-8
No files found.
manual/Actors.rst
View file @
23efb520
...
...
@@ -167,7 +167,7 @@ statically and dynamically typed event-based actors as well as brokers
+-------------------------------+--------------------------------------------------------------------------+
| **Special-purpose Handlers** | |
+-------------------------------+--------------------------------------------------------------------------+
| ``set_exception_handler(F f)``| Installs ``f`` for converting exceptions to errors (see :ref
`error`).
|
| ``set_exception_handler(F f)``| Installs ``f`` for converting exceptions to errors (see :ref
:`error`).
|
+-------------------------------+--------------------------------------------------------------------------+
| ``set_down_handler(F f)`` | Installs ``f`` to handle down messages (see :ref:`down-message`). |
+-------------------------------+--------------------------------------------------------------------------+
...
...
manual/Brokers.rst
View file @
23efb520
...
...
@@ -11,7 +11,7 @@ the middleman, implementations should be careful to consume as little time as
possible in message handlers. Brokers should outsource any considerable amount
of work by spawning new actors or maintaining worker actors.
*Note that all UDP-related functionality is still
:sup:`experimental`
.*
*Note that all UDP-related functionality is still
experimental
.*
Spawning Brokers
----------------
...
...
manual/ConfiguringActorApplications.rst
View file @
23efb520
...
...
@@ -120,7 +120,7 @@ adds three options to the ``global`` category.
:language: C++
:lines: 206-218
We create a new ``global`` category in ``custom_options_
}
``.
We create a new ``global`` category in ``custom_options_``.
Each following call to ``add`` then appends individual options to the
category. The first argument to ``add`` is the associated variable. The
second argument is the name for the parameter, optionally suffixed with a
...
...
@@ -128,13 +128,12 @@ comma-separated single-character short name. The short name is only considered
for CLI parsing and allows users to abbreviate commonly used option names. The
third and final argument to ``add`` is a help text.
The custom ``config`` class allows end users to set the port for the
application to 42 with either ``-p 42`` (short name) or
``--port=42`` (long name). The long option name is prefixed by the
category when using a different category than ``global''. For example, adding
the port option to the category ``foo`` means end users have to type
``--foo.port=42`` when using the long name. Short names are unaffected
by the category, but have to be unique.
The custom ``config`` class allows end users to set the port for the application
to 42 with either ``-p 42`` (short name) or ``--port=42`` (long name). The long
option name is prefixed by the category when using a different category than
``global``. For example, adding the port option to the category ``foo`` means
end users have to type ``--foo.port=42`` when using the long name. Short names
are unaffected by the category, but have to be unique.
Boolean options do not require arguments. The member variable
``server_mode`` is set to ``true`` if the command line contains
...
...
manual/GroupCommunication.rst
View file @
23efb520
...
...
@@ -66,7 +66,7 @@ denotes the port, while the second (optional) parameter can be used to
whitelist IP addresses.
After publishing the group at one node (the server), other nodes (the clients)
can get a handle for that group by using the ``remote
''
module:
``system.groups().get("remote", "<group>@<host>:<port>")``. This
implementation uses N-times unicast underneath and the group is only availabl
e
as long as the
hosting server is alive.
can get a handle for that group by using the ``remote
``
module:
``system.groups().get("remote", "<group>@<host>:<port>")``. This
implementation
uses N-times unicast underneath and the group is only available as long as th
e
hosting server is alive.
manual/Messages.rst
View file @
23efb520
...
...
@@ -169,12 +169,12 @@ Class ``message_builder``
Extracting
----------
The member function ``message::extract`` removes matched elements from
a message. x Messages are filtered by repeatedly applying a message handler to
the greatest remaining slice, whereas slices are generated in the sequence $[0,
size)$, $[0, size-1)$, $...$, $[1, size-1)$, $...$, $[size-1, size)$. Whenever
a slice is matched, it is removed from the message and the next slice starts at
the same index on the reduced message.
The member function ``message::extract`` removes matched elements from
a
message. x Messages are filtered by repeatedly applying a message handler to the
greatest remaining slice, whereas slices are generated in the sequence
``[0, size)``, ``[0, size-1)``, ``...``, ``[1, size-1)``, ``...``,
``[size-1, size)``. Whenever a slice is matched, it is removed from the message
and the next slice starts at
the same index on the reduced message.
For example:
...
...
manual/Scheduler.rst
View file @
23efb520
...
...
@@ -13,14 +13,13 @@ Amdahl's law.
Decomposing tasks implies that actors are often short-lived. Assigning a
dedicated thread to each actor would not scale well. Instead, CAF includes a
scheduler that dynamically assigns actors to a pre-dimensioned set of worker
threads. Actors are modeled as lightweight state machines. Whenever a
*waiting* actor receives a message, it changes its state to *ready*
and is scheduled for execution. CAF cannot interrupt running actors because it
is implemented in user space. Consequently, actors that use blocking system
calls such as I/O functions can suspend threads and create an imbalance or lead
to starvation. Such ``uncooperative'' actors can be explicitly detached by the
programmer by using the ``detached`` spawn option, e.g.,
``system.spawn<detached>(my_actor_fun)``.
threads. Actors are modeled as lightweight state machines. Whenever a *waiting*
actor receives a message, it changes its state to *ready* and is scheduled for
execution. CAF cannot interrupt running actors because it is implemented in user
space. Consequently, actors that use blocking system calls such as I/O functions
can suspend threads and create an imbalance or lead to starvation. Such
"uncooperative" actors can be explicitly detached by the programmer by using the
``detached`` spawn option, e.g., ``system.spawn<detached>(my_actor_fun)``.
The performance of actor-based applications depends on the scheduling algorithm
in use and its configuration. Different application scenarios require different
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment