All Projects → sunli829 → Xactor

sunli829 / Xactor

Licence: mit
Xactor is a rust actors framework based on async-std

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Xactor

Sobjectizer
An implementation of Actor, Publish-Subscribe, and CSP models in one rather small C++ framework. With performance, quality, and stability proved by years in the production.
Stars: ✭ 172 (+17.81%)
Mutual labels:  actor-model, actor
Qpc
QP/C real-time embedded framework/RTOS for embedded systems based on active objects (actors) and hierarchical state machines
Stars: ✭ 379 (+159.59%)
Mutual labels:  actor-model, actor
Actor Framework
An Open Source Implementation of the Actor Model in C++
Stars: ✭ 2,637 (+1706.16%)
Mutual labels:  async, actor-model
Fibry
The first Java Actor System supporting fibers from Project Loom
Stars: ✭ 146 (+0%)
Mutual labels:  actor-model, actor
Actix
Actor framework for Rust.
Stars: ✭ 6,764 (+4532.88%)
Mutual labels:  actor-model, actor
Coerce Rs
Coerce - an asynchronous (async/await) Actor runtime and cluster framework for Rust
Stars: ✭ 231 (+58.22%)
Mutual labels:  async, actor-model
dogactor
Distributed Systems,Based on Actor Model
Stars: ✭ 70 (-52.05%)
Mutual labels:  actor-model, actor
Coobjc
coobjc provides coroutine support for Objective-C and Swift. We added await method、generator and actor model like C#、Javascript and Kotlin. For convenience, we added coroutine categories for some Foundation and UIKit API in cokit framework like NSFileManager, JSON, NSData, UIImage etc. We also add tuple support in coobjc.
Stars: ✭ 3,921 (+2585.62%)
Mutual labels:  actor-model, actor
Riker
Easily build efficient, highly concurrent and resilient applications. An Actor Framework for Rust.
Stars: ✭ 745 (+410.27%)
Mutual labels:  async, actor-model
Akka.net
Port of Akka actors for .NET
Stars: ✭ 4,024 (+2656.16%)
Mutual labels:  actor-model, actor
Qpn
QP-nano real-time embedded framework/RTOS for embedded systems based on active objects (actors) and hierarchical state machines
Stars: ✭ 107 (-26.71%)
Mutual labels:  actor-model, actor
Actor4j Core
Actor4j is an actor-oriented Java framework. Useful for building lightweighted microservices (these are the actors themselves or groups of them). Enhanced performance of message passing.
Stars: ✭ 48 (-67.12%)
Mutual labels:  actor-model, actor
Qpcpp
QP/C++ real-time embedded framework/RTOS for embedded systems based on active objects (actors) and hierarchical state machines
Stars: ✭ 124 (-15.07%)
Mutual labels:  actor-model, actor
Redux Most
Most.js based middleware for Redux. Handle async actions with monadic streams & reactive programming.
Stars: ✭ 137 (-6.16%)
Mutual labels:  async
Functional Promises
Write code like a story w/ a powerful Fluent (function chaining) API
Stars: ✭ 141 (-3.42%)
Mutual labels:  async
Futures Intrusive
Synchronization primitives for Futures and async/await based on intrusive collections
Stars: ✭ 137 (-6.16%)
Mutual labels:  async
Cppcoro
A library of C++ coroutine abstractions for the coroutines TS
Stars: ✭ 2,118 (+1350.68%)
Mutual labels:  async
Aint Queue
🚀 An async-queue library built on top of swoole, flexable multi-consumer, coroutine supported. 基于 Swoole 的一个异步队列库,可弹性伸缩的工作进程池,工作进程协程支持。
Stars: ✭ 143 (-2.05%)
Mutual labels:  async
Mobc
A generic connection pool for Rust with async/await support
Stars: ✭ 141 (-3.42%)
Mutual labels:  async
Nim Chronos
Chronos - An efficient library for asynchronous programming
Stars: ✭ 136 (-6.85%)
Mutual labels:  async

Xactor is a rust actors framework based on async-std

Documentation

Features

  • Async actors.
  • Actor communication in a local context.
  • Using Futures for asynchronous message handling.
  • Typed messages (No Any type). Generic messages are allowed.

Examples

use xactor::*;

#[message(result = "String")]
struct ToUppercase(String);

struct MyActor;

impl Actor for MyActor {}

#[async_trait::async_trait]
impl Handler<ToUppercase> for MyActor {
    async fn handle(&mut self, _ctx: &mut Context<Self>, msg: ToUppercase) -> String {
        msg.0.to_uppercase()
    }
}

#[xactor::main]
async fn main() -> Result<()> {
    // Start actor and get its address
    let mut addr = MyActor.start().await?;

    // Send message `ToUppercase` to actor via addr
    let res = addr.call(ToUppercase("lowercase".to_string())).await?;
    assert_eq!(res, "LOWERCASE");
    Ok(())
}

Performance

https://github.com/sunli829/xactor-benchmarks

Installation

Xactor requires async-trait on userland.

With cargo add installed, run:

$ cargo add xactor
$ cargo add async-trait

We also provide the tokio runtime instead of async-std. To use it, you need to activate runtime-tokio and disable default features.

You can edit your Cargo.toml as follows:

xactor = { version = "x.x.x", features = ["runtime-tokio"], default-features = false }

References

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].