12 releases

0.4.2 Jan 7, 2022
0.4.1 Feb 1, 2021
0.4.0 Sep 24, 2020
0.3.5 Jul 21, 2020
0.3.0 Nov 13, 2019

#373 in Concurrency

Download history 165/week @ 2023-11-04 150/week @ 2023-11-11 182/week @ 2023-11-18 207/week @ 2023-11-25 92/week @ 2023-12-02 165/week @ 2023-12-09 172/week @ 2023-12-16 164/week @ 2023-12-23 90/week @ 2023-12-30 150/week @ 2024-01-06 169/week @ 2024-01-13 144/week @ 2024-01-20 151/week @ 2024-01-27 104/week @ 2024-02-03 185/week @ 2024-02-10 306/week @ 2024-02-17

764 downloads per month
Used in 11 crates (3 directly)

Apache-2.0/MIT

200KB
3.5K SLoC

Bastion Executor

Latest Release Crates.io
License Crates.io
Build Status Build Status
Downloads Crates.io
Discord

Bastion Executor is NUMA-aware SMP based Fault-tolerant Executor

Bastion Executor is a highly-available, fault-tolerant, async communication oriented executor. Bastion's main idea is supplying a fully async runtime with fault-tolerance to work on heavy loads.

Main differences between other executors are:

  • Uses SMP based execution scheme to exploit cache affinity on multiple cores and execution is equally distributed over the system resources, which means utilizing the all system.
  • Uses NUMA-aware allocation for scheduler's queues and exploit locality on server workloads.
  • Tailored for creating middleware and working with actor model like concurrency and distributed communication.

NOTE: Bastion Executor is independent of it's framework implementation. It uses lightproc to encapsulate and provide fault-tolerance to your future based workloads. You can use your futures with lightproc to run your workloads on Bastion Executor without the need to have framework.

Example Usage

use bastion_executor::prelude::*;
use lightproc::proc_stack::ProcStack;

fn main() {
    let pid = 1;
    let stack = ProcStack::default()
        .with_pid(pid)
        .with_after_panic(move || println!("after panic {}", pid.clone()));

    let handle = spawn(
        async {
            panic!("test");
        },
        stack,
    );

    let pid = 2;
    let stack = ProcStack::default().with_pid(pid);

    run(
        async {
            handle.await;
        },
        stack.clone(),
    );
}

Dependencies

~2.5–4.5MB
~84K SLoC