#bus #rt #ipc #pubsub

bin+lib busrt

Local and network IPC bus

16 releases

new 0.4.7 Sep 14, 2023
0.4.6 Jul 5, 2023
0.4.5 May 2, 2023
0.4.1 Mar 9, 2023
0.3.6 Nov 6, 2022

#2 in #bus

Download history 110/week @ 2023-05-30 52/week @ 2023-06-06 51/week @ 2023-06-13 71/week @ 2023-06-20 54/week @ 2023-06-27 171/week @ 2023-07-04 56/week @ 2023-07-11 40/week @ 2023-07-18 47/week @ 2023-07-25 21/week @ 2023-08-01 56/week @ 2023-08-08 54/week @ 2023-08-15 19/week @ 2023-08-22 48/week @ 2023-08-29 53/week @ 2023-09-05 51/week @ 2023-09-12

172 downloads per month
Used in 6 crates

Apache-2.0

255KB
7K SLoC

Rust 5K SLoC // 0.0% comments Python 1.5K SLoC // 0.0% comments JavaScript 637 SLoC // 0.0% comments Shell 14 SLoC

BUS/RT - Rust-native IPC broker

What is BUS/RT

BUS/RT® is a Rust-native IPC broker, written in Rust/Tokio, inspired by NATS, ZeroMQ and Nanomsg. BUS/RT is fast, flexible and very easy to use.

The library can be embedded in any Rust project or be used as a standalone server.

BUS/RT is the core bus of EVA ICS v4.

Inter-process communication

The following communication patterns are supported out-of-the-box:

  • one-to-one messages
  • one-to-many messages
  • pub/sub

The following channels are supported:

  • async channels between threads/futures (Rust only)
  • UNIX sockets (local machine, Linux/BSD)
  • TCP sockets (Linux/BSD/Windows)

In addition to Rust, BUS/RT has also bindings for the following languages:

Rust crate: https://crates.io/crates/busrt

Technical documentation

The full documentation is available at: https://info.bma.ai/en/actual/busrt/

Some numbers

Benchmarks

CPU: i7-7700HQ

Broker: 4 workers, clients: 8, payload size: 100 bytes, local IPC (single unix socket), totals:

stage iters/s
rpc.call 126_824
rpc.call+handle 64_694
rpc.call0 178_505
send+recv.qos.no 1_667_131
send+recv.qos.processed 147_812
send.qos.no 2_748_870
send.qos.processed 183_795

About the authors

Bohemia Automation / Altertech is a group of companies with 15+ years of experience in the enterprise automation and industrial IoT. Our setups include power plants, factories and urban infrastructure. Largest of them have 1M+ sensors and controlled devices and the bar raises higher and higher every day.

Dependencies

~5–23MB
~366K SLoC