duckstax / actor-zeta Goto Github PK
View Code? Open in Web Editor NEWLibrary that provides an actor style message-passing programming model (in C++).
License: BSD 3-Clause "New" or "Revised" License
Library that provides an actor style message-passing programming model (in C++).
License: BSD 3-Clause "New" or "Revised" License
message(memory_resource* resource,address_t /*sender*/, std::string /*name*/);
message(memory_resource* resource,address_t /*sender*/, std::string /*name*/, detail::any /*body*/);
response action::operator()(request &&request_){
///nop
}
case 1:
void action::operator()(const request &,request_&){
///nop
}
case 2:
struct context {
response response_;
const request request_;
}
void action::operator()(context&){
///nop
}
message(actor::actor_address sender_, const std::string& name, message_body &&body);
message(actor::actor_address sender_, const std::string &name, message_body &&body, actor::actor_address address);
message(actor::actor_address sender_, const std::string &name, message_body &&body, message_priority priority);
message(actor::actor_address sender_, const std::string &name, message_body &&body, message_priority priority, actor::actor_address address);
pimpl in messages needed ?
Now the reaction is stored in a std::unordered_map .
Reactions should be stored in a flat hash map .
Tests are required without them the issues is not accepted.
Support for GCC 4.8 compilers if possible.
auto unpack the body of the message.
The first stage of support for coroutines from C++ 20(#99) and fibers (C++11/14/17).
Updating components of executor.
The executor will later redo the scheduler.
Creating test tools.
now after building the project two targets: actor-zetta-core , actor-zeta-io .
There should be one target actor-zeta.
Add checkboxes that tell cmake which components to include in the final build of the library.
By default, all library components are enabled.
Add build options:
Continuous integration configure for mac and windows.
Propose a to consider.
CI for windows : AppVeyor
CI for mac os x : CircleCI
Travis CI as the main CI we do not remove.
https://github.com/google/benchmark
Check
look at boost.serialization
class message final {
public:
template<class Archive>
void serialize(Archive & ar, const unsigned int version){
}
};
class message final {
public:
template<class Archive>
void save(Archive & ar, const unsigned int version) const {
}
template<class Archive>
void load(Archive & ar, const unsigned int version){
}
};
Rework tests with google-test framework
Add google-benchmark
Support coroutines:
C++ 20 : native coroutines
http://blog.think-async.com/2010/04/system-error-support-in-c0x-part-1.html
http://blog.think-async.com/2010/04/system-error-support-in-c0x-part-2.html
http://blog.think-async.com/2010/04/system-error-support-in-c0x-part-3.html
http://blog.think-async.com/2010/04/system-error-support-in-c0x-part-4.html
http://blog.think-async.com/2010/04/system-error-support-in-c0x-part-5.html
https://akrzemi1.wordpress.com/2017/07/12/your-own-error-code/
https://akrzemi1.wordpress.com/examples/error_condition-example/
https://akrzemi1.wordpress.com/examples/error_code-example/
https://akrzemi1.wordpress.com/examples/error_code-example-2/
intrusive_list + spinlock
Update readme.md
Create documentation for actor
Create documentation for example
actor traits
supervisor traits
message traits
boost.dll
ubuntu clang
template <class Sender >
inline auto send(const Sender& actor,message msg) -> void {
actor->enqueue(std::move(msg));
}
Add support for timeouts in actors
message(actor::actor_address sender_, const std::string& name, message_body &&body);
message(actor::actor_address sender_, const std::string &name, message_body &&body, actor::actor_address address);
message(actor::actor_address sender_, const std::string &name, message_body &&body, message_priority priority);
message(actor::actor_address sender_, const std::string &name, message_body &&body, message_priority priority, actor::actor_address address);
os: linux
dist: trusty
language: cpp
cache:
- apt
- ccache
matrix:
include:
##########################################################################
# Clang on OSX
##########################################################################
# XCode 7.3
- os: osx
osx_image: xcode7.3
env: BUILD_TYPE=Debug
- os: osx
osx_image: xcode7.3
env: BUILD_TYPE=Release
# XCode 8
- os: osx
osx_image: xcode8
env: BUILD_TYPE=Debug
- os: osx
osx_image: xcode8
env: BUILD_TYPE=Release
# XCode 8.2
- os: osx
osx_image: xcode8.2
env: BUILD_TYPE=Debug
- os: osx
osx_image: xcode8.2
env: BUILD_TYPE=Release
# XCode 8.3
- env: COMPILER=clang++ BUILD_TYPE=Debug
os: osx
osx_image: xcode8.3
compiler: clang
- env: COMPILER=clang++ BUILD_TYPE=Release
os: osx
osx_image: xcode8.3
compiler: clang
# XCode 9.1
- env: COMPILER=clang++ BUILD_TYPE=Debug
os: osx
osx_image: xcode9.1
compiler: clang
- env: COMPILER=clang++ BUILD_TYPE=Release
os: osx
osx_image: xcode9.1
compiler: clang
##########################################################################
# GCC on Linux
##########################################################################
# GCC 4.9
- env: COMPILER=g++-4.9 BUILD_TYPE=Debug
addons: &gcc49
apt:
packages:
- g++-4.9
sources:
- ubuntu-toolchain-r-test
- env: COMPILER=g++-4.9 BUILD_TYPE=Release
addons: *gcc49
# GCC 5
- env: COMPILER=g++-5 BUILD_TYPE=Debug
addons: &gcc5
apt:
packages:
- g++-5
sources:
- ubuntu-toolchain-r-test
- env: COMPILER=g++-5 BUILD_TYPE=Release
addons: *gcc5
# GCC 6
- env: COMPILER=g++-6 BUILD_TYPE=Debug
addons: &gcc6
apt:
packages:
- g++-6
sources:
- ubuntu-toolchain-r-test
- env: COMPILER=g++-6 BUILD_TYPE=Release
addons: *gcc6
# GCC 7
- env: COMPILER=g++-7 BUILD_TYPE=Debug
addons: &gcc7
apt:
packages:
- g++-7
sources:
- ubuntu-toolchain-r-test
- env: COMPILER=g++-7 BUILD_TYPE=Release
addons: *gcc7
# GCC 8
- env: COMPILER=g++-8 BUILD_TYPE=Debug
addons: &gcc8
apt:
packages:
- g++-8
sources:
- ubuntu-toolchain-r-test
- env: COMPILER=g++-8 BUILD_TYPE=Release
addons: *gcc8
##########################################################################
# Clang on Linux
##########################################################################
# Clang 3.6
- env: C_COMPILER=clang-3.6 CXX_COMPILER=clang++-3.6 BUILD_TYPE=Debug
addons: &clang36
apt:
packages:
- clang-3.6
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.6
- env: C_COMPILER=clang-3.6 CXX_COMPILER=clang++-3.6 BUILD_TYPE=Release
addons: *clang36
# Clang 3.7
- env: C_COMPILER=clang-3.7 CXX_COMPILER=clang++-3.7 BUILD_TYPE=Debug
addons: &clang37
apt:
packages:
- clang-3.7
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.7
- env: C_COMPILER=clang-3.7 CXX_COMPILER=clang++-3.7 BUILD_TYPE=Release
addons: *clang37
# Clang 3.8
- env: C_COMPILER=clang-3.8 CXX_COMPILER=clang++-3.8 BUILD_TYPE=Debug
addons: &clang38
apt:
packages:
- clang-3.8
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.8
- env: C_COMPILER=clang-3.8 CXX_COMPILER=clang++-3.8 BUILD_TYPE=Release
addons: *clang38
# Clang 3.9
- env: C_COMPILER=clang-3.9 CXX_COMPILER=clang++-3.9 BUILD_TYPE=Debug
addons: &clang39
apt:
packages:
- clang-3.9
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.9
- env: C_COMPILER=clang-3.9 CXX_COMPILER=clang++-3.9 BUILD_TYPE=Release
addons: *clang39
# Clang 4
- env: C_COMPILER=clang-4.0 CXX_COMPILER=clang++-4.0 BUILD_TYPE=Debug
addons: &clang40
apt:
packages:
- clang-4.0
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-4.0
- env: C_COMPILER=clang-4.0 CXX_COMPILER=clang++-4.0 BUILD_TYPE=Release
addons: *clang40
# Clang 5
- env: C_COMPILER=clang-5.0 CXX_COMPILER=clang++-5.0 BUILD_TYPE=Debug
addons: &clang50
apt:
packages:
- clang-5.0
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-5.0
- env: C_COMPILER=clang-5.0 CXX_COMPILER=clang++-5.0 BUILD_TYPE=Release
addons: *clang50
# Clang 6.0
- env: C_COMPILER=clang-6.0 CXX_COMPILER=clang++-6.0 BUILD_TYPE=Debug
addons: &clang60
apt:
packages:
- clang-6.0
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-6.0
- env: C_COMPILER=clang-6.0 CXX_COMPILER=clang++-6.0 BUILD_TYPE=Release
addons: *clang60
# Clang 7.0
- env: C_COMPILER=clang-7 CXX_COMPILER=clang++-7 BUILD_TYPE=Debug
addons: &clang70
apt:
packages:
- clang-7
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-7
- env: C_COMPILER=clang-7 CXX_COMPILER=clang++-7 BUILD_TYPE=Release
addons: *clang70
# Clang 8.0
- env: C_COMPILER=clang-8 CXX_COMPILER=clang++-8 BUILD_TYPE=Debug
addons: &clang80
apt:
packages:
- clang-8
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-8
- env: C_COMPILER=clang-8 CXX_COMPILER=clang++-8 BUILD_TYPE=Release
addons: *clang80
script:
- mkdir build && cd build
- cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_CXX_COMPILER=$COMPILER -DDEV_MODE=ON
- cmake --build . -- VERBOSE=1
executor is to update from the repository : https://github.com/kotbegemot/smart_executor .
Project should simply call on the entire project clang-tidy.
Task should be started to fix everything that will be found clang-tidy.
Replace custom flag SHARED with standard flag BUILD_SHARED_LIBS
https://cmake.org/cmake/help/v2.8.12/cmake.html#command:add_library
https://cmake.org/cmake/help/v2.8.12/cmake.html#variable:BUILD_SHARED_LIBS
Add install section
https://cmake.org/cmake/help/v2.8.12/cmake.html#command:install
stop using actor-zeta/core.hpp
I got this warning/error if I try to send something to an actor that doesn't have such method:
Service | WARNING
Service | Skip : callback
Service | WARNING
goblin_engineer::send(addresses("service"), self(), "callback", request.session_id_,
std::move(timestamp), std::move(timestamp_to), std::move(page), std::move(count));
It would be nice to have a more informative error, something like "actor 'service' doesn't have a callback named 'callback'
"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.