Rembus¶
Rembus is both a cross-language protocol specification and a middleware for distributed applications using RPC and Pub/Sub communication styles.
The standard setup requires a broker that links and decouples components. The fastest way is to pull and run a docker image for the broker:
docker pull rembus/broker:1.2.3
docker run --rm \
-p 8000:8000 \
-e REMBUS_DIR=/etc/rembus \
-v $HOME/.config/rembus:/etc/rembus \
-t rembus/broker
docker pull rembus/broker:1.2.3
docker run --rm \
-p 8000:8000 \
-e REMBUS_DIR=/etc/rembus \
-v $HOME/.config/rembus:/etc/rembus \
-t rembus/broker -s
The Rembus broker expects the private key and certificate to be named rembus.key and rembus.crt respectively and to be in the host directory $HOME/.config/rembus/keystore.
Otherwise, if you have Julia installed, you may download the Rembus.jl package and run caronte:
git clone https://github.com/cardo-org/Rembus.jl
cd Rembus.jl
bin/broker
Rembus provides both a synchronous and an asynchronous API.
import rembus as rb
cli = rb.node("mynode")
cli.rpc("version")
import rembus as rb
async main():
cli = await rb.component("mynode")
await cli.rpc("version")
rembus.component returns a coroutine object and rembus.node returns a blocking handle for interacting with the broker.