Skip to content
forked from alibaba/hiactor

Hiactor is an open-source hierarchical actor framework for building high-performance, concurrent and scalable event-driven systems using C++.

License

Notifications You must be signed in to change notification settings

balusch/hiactor

 
 

Repository files navigation

Hiactor

What is Hiactor

Hiactor is an open-source hierarchical actor framework for building high-performance,concurrent and scalable event-driven systems using C++. Hiactor features a light-weight and ease-of-use distributed implementation of the actor model with concepts like object, reference and future/promise. With Hiactor, developers familiar with single-server programming can experience a seamless transition to the distributed environments.

Building Hiactor

Requirements:

  • A compiler with good C++17 support (e.g. gcc >= 9.0). This was tested successfully on g++ 9.4.0.
  • A higher version linux system is recommended. This was tested successfully on Ubuntu 20.04.
  • CMake >= 3.13.1

Hiactor has a dependency of Seastar. Before building Hiactor, update the project submodules and install dependencies for Seastar:

$ git submodule update --init
$ sudo ./seastar/seastar/install-dependencies.sh

Next, build Hiactor as follows:

$ mkdir build
$ cd build
$ cmake [OPTIONS] ..
$ make
$ make install

The following cmake options can be specified:

  • Hiactor_DEBUG: Build Hiactor with debug mode. Default is OFF.
  • Hiactor_INSTALL: Enable installing Hiactor targets. Default is ON.
  • Hiactor_DEMOS: Enable demos of Hiactor. Default is ON.
  • Hiactor_TESTING: Enable tests of Hiactor. Default is ON.
  • Hiactor_GPU_ENABLE: Enable gpu devices for Hiactor (Cuda environments required!) Default is OFF.
  • Hiactor_CXX_DIALECT: Specify the C++ dialect for Hiactor. Default is gnu++17.
  • Hiactor_CXX_FLAGS: Specify other compilation flags for Hiactor.
  • Hiactor_CPU_STALL_REPORT: Enable warning reports at cpu stalls. Default is OFF.
  • Hiactor_UNUSED_RESULT_ERROR: Make [[nodiscard]] violations an error (instead of a warning). Default is OFF.

Seastar is embedded with add_subdirectory in hiactor, you can add cmake options of Seastar directly when configuring. Note that the apps, demos, docs and tests of Seastar are disabled in its embedding mode, and the Seastar_CXX_DIALECT is overridden by the Hiactor_CXX_DIALECT.

An example cmake options:

$ cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DHiactor_CXX_DIALECT=gnu++17 \
    -DHiactor_TESTING=OFF -DSeastar_CXX_FLAGS="-DSEASTAR_DEFAULT_ALLOCATOR" ..

Getting started

Follow the tutorial to understand how to use Hiactor.

About

Hiactor is an open-source hierarchical actor framework for building high-performance, concurrent and scalable event-driven systems using C++.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 84.4%
  • Python 9.0%
  • CMake 5.6%
  • Other 1.0%