Skip to content

Commit f6f9bc9

Browse files
committed
docs: update README with neutral technical framing and TF-Tech NV ownership
1 parent 4936777 commit f6f9bc9

1 file changed

Lines changed: 63 additions & 80 deletions

File tree

README.md

Lines changed: 63 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,102 @@
11
[![Rust](https://github.com/threefoldtech/rmb-rs/actions/workflows/rust.yaml/badge.svg)](https://github.com/threefoldtech/rmb-rs/actions/workflows/rust.yaml)
22

3-
# Reliable Message Bus
3+
# Reliable Message Bus (RMB)
44

5-
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.
5+
Reliable Message Bus is a secure peer-to-peer messaging protocol that enables services and nodes to communicate reliably, even when running behind NAT. It provides message authenticity guarantees, end-to-end encryption, and support for federated third-party relays.
66

7-
Out of the box RMB provides the following:
7+
## What this is
88

9-
- Guarantee authenticity of the messages. You are always sure that the received message is from whoever is pretending to be
10-
- End to End encryption
11-
- Support for 3rd party hosted relays. Anyone can host a relay and people can use it safely since there is no way messages can be inspected while using e2e. That's similar to `home` servers by `matrix`
9+
RMB is a messaging system designed for machine-to-machine communication. It allows bots (automated services) to send and receive messages in a chat-like pattern, with the following properties:
1210

13-
## Why
11+
- **Message authenticity**: Messages are cryptographically signed so the receiver can verify the sender's identity.
12+
- **End-to-end encryption**: Messages are encrypted so that relays cannot inspect content.
13+
- **Federated relays**: Anyone can host a relay; users are protected by encryption even when using third-party infrastructure.
1414

15-
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:
15+
## What this repository contains
1616

17-
- Communication needed to be reliable
18-
- Minimize and completely eliminate message loss
19-
- Reduce downtime
20-
- Node need to authenticate and authorize calls
21-
- Guarantee identity of the other peer so only owners of data can see it
22-
- Fast request response time
17+
- **`rmb-peer`** — A gateway binary that connects to a relay on behalf of your identity, handling reconnection, verification, decryption, and exposing a simple Redis-based plain-text API
18+
- **Relay server** — The message routing infrastructure that forwards messages between peers
19+
- **Protocol libraries** — Rust crates implementing the RMB protocol (signing, verification, encryption, message formats)
20+
- **Protocol specification** — Detailed protocol documentation in the [docs](docs/readme.md) directory
2321

24-
Starting from this we came up with a more detailed requirements:
22+
## Role in the stack
2523

26-
- User (or rather bots) need their identity maintained by `tfchain` (a blockchain) hence each bot needs an account on tfchain to be able to use `rmb`
27-
- Then each message then can be signed by the `bot` keys, hence make it easy to verify the identity of the sender of a message. This is done both ways.
28-
- To support federation (using 3rd party relays) we needed to add e2e encryption to make sure messages that are surfing the public internet can't be sniffed
29-
- e2e encryption is done by deriving an encryption key from the same identity seed, and share the public key on `tfchain` hence it's available to everyone to use
24+
RMB serves as the messaging backbone for the infrastructure stack. Nodes, users, and services use it to exchange commands, status updates, and responses. Identities are maintained on a blockchain (each peer needs an account), and public encryption keys are published there for anyone to use. The `rmb-peer` gateway abstracts the cryptographic complexity, allowing clients to interact via simple Redis queue operations using plain JSON.
3025

31-
## Specification
26+
## Mycelium
3227

33-
For details about protocol itself please check the [docs](docs/readme.md)
28+
Mycelium is the network layer used to provide secure, peer-to-peer connectivity between nodes, services, and users. It enables decentralized networking across the infrastructure stack and is used as part of the ThreeFold Grid deployment.
3429

35-
## How to use
30+
## ZOS / Zero-OS
31+
32+
ZOS, also known as Zero-OS, is the operating system layer used to run and manage nodes. It provides the low-level runtime environment for workloads, networking, storage, and automation. RMB is the primary communication channel used by ZOS nodes to receive commands and report status.
33+
34+
## Relation to ThreeFold
35+
36+
This technology is used within the ThreeFold ecosystem and was first deployed on the ThreeFold Grid. The component itself is designed as reusable infrastructure technology and should be understood by its technical function first, independent of any specific deployment.
3637

37-
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.
38+
## Ownership
3839

39-
Or you can keep the connection forever to answer other bots requests if you are providing a service.
40+
This repository is owned and maintained by TF-Tech NV, a Belgian company responsible for the development and maintenance of this technology.
4041

41-
### If there is a library in your preferred language
42+
## Specification
43+
44+
For details about the protocol itself, see the [docs](docs/readme.md).
4245

43-
Then you are in luck, follow the library documentations to implement a service bot, or to make requests to other bots.
46+
## How to use
4447

45-
#### known libraries
48+
RMB is built for bots and software to communicate, not for human chat. There is no mobile app; instead, libraries are provided for connecting to the network and exchanging messages with other bots.
4649

47-
- Golang [rmb-sdk-go](https://github.com/threefoldtech/tfgrid-sdk-go/tree/development/rmb-sdk-go)
48-
- Typescript [rmb-sdk-ts](https://github.com/threefoldtech/tfgrid-sdk-ts)
50+
### Using an existing library
4951

50-
### Well, I am not that lucky
52+
If a library exists for your language, follow its documentation to implement a service bot or make requests to other bots.
5153

52-
In that case:
54+
#### Known libraries
5355

54-
- Implement a library in your preferred language
55-
- If it's too much to do all the signing, verification, e2e in your language then use `rmb-peer`
56+
- Go: [rmb-sdk-go](https://github.com/threefoldtech/tfgrid-sdk-go/tree/development/rmb-sdk-go)
57+
- TypeScript: [rmb-sdk-ts](https://github.com/threefoldtech/tfgrid-sdk-ts)
5658

57-
## What is rmb-peer
59+
### Using `rmb-peer`
5860

59-
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
61+
If no library is available for your language, you can use `rmb-peer` as a gateway. `rmb-peer` uses your mnemonic (identity secret key) to assume your identity and connects to the relay on your behalf. It maintains the connection indefinitely and handles:
6062

61-
- reconnecting if connection was lost
62-
- verifying received messages
63-
- decrypting received messages
64-
- sending requests on your behalf, taking care of all crypto heavy lifting.
63+
- Reconnecting if the connection is lost
64+
- Verifying received messages
65+
- Decrypting received messages
66+
- Sending requests on your behalf, handling all cryptographic operations
6567

66-
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.
68+
It exposes a simple plain-text API over Redis. To send messages or handle requests, you only need to push and pop messages from Redis queues. Messages are simple plain-text JSON.
6769

68-
> More details about the structure of the messages are also in the [docs](docs/readme.md) page
70+
> More details about the structure of the messages are also in the [docs](docs/readme.md).
6971
7072
## Download
7173

72-
Please check the latest [releases](https://github.com/threefoldtech/rmb-rs/releases) normally you only need the `rmb-peer` binary, unless you want to host your own relay.
74+
Please check the latest [releases](https://github.com/threefoldtech/rmb-rs/releases). Normally you only need the `rmb-peer` binary, unless you want to host your own relay.
7375

7476
## Build from source
7577

76-
### Perquisites
78+
### Prerequisites
7779

78-
- download Rustup and install Rust, run the following in your terminal, then follow the on-screen instructions:
80+
- Download Rustup and install Rust:
7981

8082
```bash
8183
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
8284
```
8385

84-
- Install the standard library for the target `x86_64-unknown-linux-musl`, which is a Linux platform that uses the musl `libc` implementation instead of the `glibc` one.
85-
This allows you to compile Rust programs that can run on Linux systems that do not have glibc installed, or to create fully static binaries that do not depend on any shared libraries.
86+
- Install the standard library for the target `x86_64-unknown-linux-musl`:
8687

8788
```bash
8889
rustup target add x86_64-unknown-linux-musl
8990
```
9091

91-
- To use this target, you also need to install a linker that supports musl, such as `musl-gcc`.
92+
- Install a linker that supports musl, such as `musl-gcc`:
9293

9394
```bash
9495
sudo apt update
9596
sudo apt install musl-tools
9697
```
9798

98-
You can then pass the `--target=x86_64-unknown-linux-musl` option to `cargo build` or `cargo run` to compile and run your program for this target.
99-
100-
- Install pre-compiled `protoc` binary to ensure that you’re using the latest release of protoc.
99+
- Install a pre-compiled `protoc` binary:
101100

102101
```bash
103102
PB_REL="https://github.com/protocolbuffers/protobuf/releases"
@@ -106,26 +105,14 @@ This allows you to compile Rust programs that can run on Linux systems that do n
106105
protoc --version # Ensure compiler version is updated
107106
```
108107

109-
- Redis:
110-
- Install Redis server using the apt package manager:
111-
112-
```bash
113-
sudo apt update
114-
sudo apt install redis-server
115-
```
108+
- Redis server:
116109

117-
- Configure Redis server by editing the `/etc/redis/redis.conf` file (optional)
118-
- Enable Redis server to start automatically on boot:
119-
120-
```bash
121-
sudo systemctl enable redis-server
122-
```
123-
124-
- Start Redis server using systemd:
125-
126-
```bash
127-
sudo systemctl start redis-server
128-
```
110+
```bash
111+
sudo apt update
112+
sudo apt install redis-server
113+
sudo systemctl enable redis-server
114+
sudo systemctl start redis-server
115+
```
129116

130117
### Building
131118

@@ -137,25 +124,21 @@ cargo build --release --target=x86_64-unknown-linux-musl
137124

138125
### Troubleshooting
139126

140-
- If you encounter an error like the one below, it is likely that the `protoc` version installed by your package manager is too old.
127+
- If you encounter an error like:
141128

142-
```bash
143-
--- stderr
144-
types.proto: This file contains proto3 optional fields, but --experimental_allow_proto3_optional was not set.
145-
codegen failed: parse and typecheck
129+
```
130+
types.proto: This file contains proto3 optional fields, but --experimental_allow_proto3_optional was not set.
131+
codegen failed: parse and typecheck
146132
```
147133

148-
**Solution**: The best way to ensure that you’re using the latest release of `protoc` is installing from pre-compiled binaries. See perquisites.
134+
**Solution**: Install `protoc` from pre-compiled binaries rather than your package manager. See prerequisites above.
149135

150-
- A peer must use a unique `mnemonic` or keys. It's not correct if multiple peers uses the same mnemonic this will make it impossible to route messages correctly. It's possible for the same peer to make multiple connections to the same `relay` given that it uses different `session ids`. A session id identify the connection and hence make routing messages possible.
151-
- A single peer on the other hand can make multiple connections to multiple relays for redundancy given that his data on the tfchain must reflect that
136+
- A peer must use a unique mnemonic or keys. Multiple peers using the same mnemonic will make message routing impossible. The same peer may make multiple connections to the same relay using different session IDs. A single peer may also connect to multiple relays for redundancy.
152137

153-
> RUNNING MULTIPLE PEERS WITH THE SAME MNEMONIC MUST BE AVOIDED UNLESS FOLLOWING THE GUIDE LINES ABOVE
138+
> RUNNING MULTIPLE PEERS WITH THE SAME MNEMONIC MUST BE AVOIDED UNLESS FOLLOWING THE GUIDELINES ABOVE
154139
155140
### Running tests
156141

157-
While inside the repository
158-
159142
```bash
160143
cargo test
161144
```

0 commit comments

Comments
 (0)