Coder Social home page Coder Social logo

alibaba / hiactor Goto Github PK

View Code? Open in Web Editor NEW
94.0 9.0 12.0 167 KB

Hiactor is a distributed C++ actor framework.

License: Apache License 2.0

CMake 7.72% Python 9.90% C++ 81.47% C 0.37% Cuda 0.55%
actor-framework actor-model async distributed event-driven seastar c-plus-plus

hiactor's Issues

Fail to compile on `arm64`

截屏2023-12-18 13 54 20

When building multi-platform docker image with Hiactor v0.1.1 installed, error occurred on arm64 arch.

docker buildx build --platform linux/amd64,linux/arm64 -f interactive-base.Dockerfile -t registry.cn-hongkong.aliyuncs.com/graphscope/interactive-base --push .
# install hiactor
RUN cd /tmp && git clone https://github.com/alibaba/hiactor.git -b v0.1.1 --single-branch && cd hiactor && \
    git submodule update --init --recursive && ./seastar/seastar/install-dependencies.sh && mkdir build && cd build && \
    cmake -DCMAKE_INSTALL_PREFIX=/opt/flex -DHiactor_DEMOS=OFF -DHiactor_TESTING=OFF -DHiactor_DPDK=OFF -DHiactor_CXX_DIALECT=gnu++17 -DSeastar_CXX_FLAGS="-DSEASTAR_DEFAULT_ALLOCATOR -mno-avx512" .. && \
    make -j && make install && rm -rf /tmp/hiactor

building error in gcc7

building with gcc7 will result in the following error:

[  4%] Building CXX object build/seastar/CMakeFiles/seastar.dir/src/core/future.cc.o
/opt/hiactor/build/seastar/src/core/future.cc:105:50: error: explicit qualification in declaration of 'seastar::future<> seastar::internal::current_exception_as_future()'
 future<> internal::current_exception_as_future() noexcept;
                                                  ^~~~~~~~
build/seastar/CMakeFiles/seastar.dir/build.make:245: recipe for target 'build/seastar/CMakeFiles/seastar.dir/src/core/future.cc.o' failed
make[2]: *** [build/seastar/CMakeFiles/seastar.dir/src/core/future.cc.o] Error 1
CMakeFiles/Makefile2:670: recipe for target 'build/seastar/CMakeFiles/seastar.dir/all' failed
make[1]: *** [build/seastar/CMakeFiles/seastar.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2

[BUG] Create two `hqps_actor_autogen` targets cause cmake error

As I create two hqps_actor_autogen targets in my CMakeLists.txt, cmake error occurs

CMake Error at /usr/local/bin/hiactor_codegen/ActorAutoGen.cmake:42 (add_custom_target):
  add_custom_target cannot create target "installed_libclang" because another
  target with the same name already exists.  The existing target is a custom
  target created in source directory
  "/root/GraphScope/balabala/graph_db".  See documentation for policy
  CMP0002 for more details.
Call Stack (most recent call first):
  engines/balabala/CMakeLists.txt:39 (include)

There are some limitations to the distributed network connection

Currently, when a hiactor cluster needs to be started, the order in which the nodes are started must be strictly in accordance with their machine id order. The reason is: The current connection rule is that a node with a larger machine id will act as a client to connect to a node with a smaller machine id. If the node with a smaller machine id has not been started at this time, a connection error will occur.

image

[BUG] Calling the same actor method across machines cannot be guaranteed to be executed in the FIFO order

At present, when it is necessary to call an actor method across machines, hiactor will look for a local shard connected to the target machine on the current machine to forward it on its behalf.
However, the calculation of this proxy shard adopts a round-robin method, so multiple calls to an actor's method may be forwarded by different shards, which leads to an inconsistency at the dataflow level and cannot guarantee that the actor method called first will be certain executed first.

The content length of seastar http request to be read is undefined

in seastar/core/httpd.cc

195   static future<std::unique_ptr<httpd::request>>
196   read_request_body(input_stream<char>& buf, std::unique_ptr<httpd::request> req) {
197     if (!req->content_length) {
198          return make_ready_future<std::unique_ptr<httpd::request>>(std::move(req));
199     }
200      return buf.read_exactly(req->content_length).then([req = std::move(req)] (temporary_buffer<char> body) mutable {
201         req->content = seastar::to_sstring(std::move(body));
202          return make_ready_future<std::unique_ptr<httpd::request>>(std::move(req));
203     });
204   }

the req->content_length is undefined at line 200, as req has been moved.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.