threefoldtech / rmb-rs

RMB implementation in rust
Apache License 2.0
3 stars 1 forks source link

Rust

Reliable Message Bus

Reliable message bus is a secure communication panel that allows bots to communicate together in a chat like way. It makes it very easy to host a service or a set of functions to be used by anyone, even if your service is running behind NAT.

Out of the box RMB provides the following:

Why

RMB is developed by ThreefoldTech to create a global network of nodes that are available to host capacity. Each node will act like a single bot where you can ask to host your capacity. This enforced a unique set of requirements:

Starting from this we came up with a more detailed requirements:

Specification

For details about protocol itself please check the docs

How to use

There are many ways to use rmb because it was built for bots and software to communicate. Hence, there is no mobile app for it for example, but instead a set of libraries where you can use to connect to the network, make chitchats with other bots then exit.

Or you can keep the connection forever to answer other bots requests if you are providing a service.

If there is a library in your preferred language

Then you are in luck, follow the library documentations to implement a service bot, or to make requests to other bots.

known libraries

Well, I am not that lucky

In that case:

What is rmb-peer

think of rmb-peer as a gateway that stands between you and the relay. rmb-peer uses your mnemonics (your identity secret key) to assume your identity and it connects to the relay on your behalf, it maintains the connection forever and takes care of

Then it provide a simple (plain-text) api over redis. means to send messages (or handle requests) you just need to be able to push and pop messages from some redis queues. Messages are simple plain text json.

More details about the structure of the messages are also in the docs page

Download

Please check the latest releases normally you only need the rmb-peer binary, unless you want to host your own relay.

Build from source

Perquisites

Building

git clone git@github.com:threefoldtech/rmb-rs.git
cd rmb-rs
cargo build --release --target=x86_64-unknown-linux-musl

Troubleshooting

RUNNING MULTIPLE PEERS WITH THE SAME MNEMONIC MUST BE AVOIDED UNLESS FOLLOWING THE GUIDE LINES ABOVE

Running tests

While inside the repository

cargo test