bastion/src/bastion-executor
o0Ignition0o 2703b5280d prepare for bastion publish 2022-01-07 21:32:09 +01:00
..
benches wip, allow to run tokio based futures in the bastion executor (#299) 2021-02-01 19:49:54 +01:00
examples Miri and clippy fixes. 2020-06-22 17:08:57 +02:00
scripts Reorg PR 2020-04-14 15:35:04 +02:00
src bump dependencies (#324) 2021-04-13 14:29:27 +02:00
tests wip, allow to run tokio based futures in the bastion executor (#299) 2021-02-01 19:49:54 +01:00
Cargo.toml prepare for bastion publish 2022-01-07 21:32:09 +01:00
README.md Reorg PR 2020-04-14 15:35:04 +02:00

README.md

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(),
    );
}